1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-08 00:39:30 +02:00
This commit is contained in:
MewMew 2019-03-18 14:23:12 +01:00
parent 4edc185c5f
commit 629cf09879
6 changed files with 29 additions and 16 deletions

View File

@ -7,22 +7,23 @@ local info = [[
Feed the opponent's biters with science packs to increase their strength.
High tier science juice will yield stronger results.
There is no major direct pvp combat
There is no major direct pvp combat.
The horizontal border river is landfill proof.
Construction robots can not build on the other teams's side.
The random map layout is mirrored to provide a fair competition.
There is no biter evolution from pollution, time or destruction.
ONLY feeding increases their power and will lead to your teams victory.
The gui yields two different main stats for each team's biters.
- EVO -
The evolution of the biters.
The evolution of the biters, which increases when they get fed.
It can go above 100% which unlocks endgame modifiers,
granting them increased damage and evasion.
- THREAT -
Threat creates biter attacks.
Feeding gives permanent "threat-income", as well as creating instant threat.
Causes biters to attack and reduces when biters are slain.
Feeding gives permanent "threat-income", as well as creating instant threat.
A high threat value causes big attacks.
Values of zero or below will cause no attacks.
]]

View File

@ -2,20 +2,20 @@
require "on_tick_schedule"
require "modules.dynamic_landfill"
require "modules.spawners_contain_biters"
require "modules.spawners_contain_biters"
local event = require 'utils.event'
local function init_surface()
local map_gen_settings = {}
map_gen_settings.water = "0.35"
map_gen_settings.water = "0.3"
map_gen_settings.starting_area = "4.25"
map_gen_settings.cliff_settings = {cliff_elevation_interval = 12, cliff_elevation_0 = 32}
map_gen_settings.autoplace_controls = {
["coal"] = {frequency = "2", size = "1", richness = "1"},
["stone"] = {frequency = "2", size = "1", richness = "1"},
["copper-ore"] = {frequency = "2", size = "1", richness = "1"},
["iron-ore"] = {frequency = "2", size = "1", richness = "1"},
["coal"] = {frequency = "2.5", size = "1", richness = "1"},
["stone"] = {frequency = "2.5", size = "1", richness = "1"},
["copper-ore"] = {frequency = "2.5", size = "1", richness = "1"},
["iron-ore"] = {frequency = "2.5", size = "1", richness = "1"},
["uranium-ore"] = {frequency = "2", size = "1", richness = "1"},
["crude-oil"] = {frequency = "3", size = "1", richness = "1"},
["trees"] = {frequency = "1", size = "0.5", richness = "0.7"},
@ -176,4 +176,5 @@ event.add(defines.events.on_player_joined_game, on_player_joined_game)
require "maps.biter_battles_v2.on_tick"
require "maps.biter_battles_v2.terrain"
require "maps.biter_battles_v2.chat"
require "maps.biter_battles_v2.bb_map_intro"
require "maps.biter_battles_v2.bb_map_intro"
require "modules.custom_death_messages"

View File

@ -61,7 +61,7 @@ local function feed_biters(player, food)
local e = (global.bb_evolution[biter_force_name] * 100) + 1
--local diminishing_modifier = 1 / (10 ^ (e * 0.03))
local diminishing_modifier = (1 / (10 ^ (e * 0.014))) / (e * 0.5)
global.bb_threat_income[biter_force_name] = global.bb_threat_income[biter_force_name] + (food_values[food].value * diminishing_modifier * 15)
global.bb_threat_income[biter_force_name] = global.bb_threat_income[biter_force_name] + (food_values[food].value * diminishing_modifier * 12)
---SET EVOLUTION
local e = (game.forces[biter_force_name].evolution_factor * 100) + 1

View File

@ -31,11 +31,20 @@ local function get_noise(name, pos)
local noise = {}
noise[1] = simplex_noise(pos.x * 0.011, pos.y * 0.011, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise(pos.x * 0.07, pos.y * 0.07, seed)
noise[2] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed)
seed = seed + noise_seed_add
local noise = noise[1] + noise[2] * 0.2
return noise
end
if name == 3 then
local noise = {}
noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed)
seed = seed + noise_seed_add
local noise = noise[1] + noise[2] * 0.1
return noise
end
end
local function draw_smoothed_out_ore_circle(position, name, surface, radius, richness)
@ -69,7 +78,8 @@ end
local function generate_horizontal_river(surface, pos)
if pos.y < -32 then return false end
if pos.y > -3 and pos.x > -3 and pos.x < 3 then return false end
if -14 < pos.y + (get_noise(1, pos) * 5) then return true end
--if -14 < pos.y + (get_noise(1, pos) * 5) then return true end
if -12 < pos.y + (get_noise(3, pos) * 6) then return true end
return false
end

View File

@ -4,7 +4,7 @@ require "modules.teleporters"
require "modules.satellite_score"
require "modules.landfill_reveals_nauvis"
local map_functions = require "maps.tools.map_functions"
local map_functions = require "tools.map_functions"
local simplex_noise = require 'utils.simplex_noise'
simplex_noise = simplex_noise.d2
local event = require 'utils.event'

View File

@ -49,7 +49,8 @@ local function regenerate_decoratives(surface, position)
end
local function place_entity(surface, e)
if e.type == "resource" then surface.create_entity({name = e.name, position = e.position, amount = e.amount}) return end
if e.type == "resource" then surface.create_entity({name = e.name, position = e.position, amount = e.amount}) return end
if not surface.can_place_entity({name = e.name, position = e.position}) then return end
if e.type == "cliff" then surface.create_entity({name = e.name, position = e.position, force = e.force, cliff_orientation = e.cliff_orientation}) return end
if e.direction then surface.create_entity({name = e.name, position = e.position, force = e.force, direction = e.direction}) return end
surface.create_entity({name = e.name, position = e.position, force = e.force})