Skip to content
This repository was archived by the owner on Nov 21, 2017. It is now read-only.

Commit a9c5914

Browse files
committed
Some balance
1 parent b160c46 commit a9c5914

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libs/biter/base.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ function BiterBase.create_plan(base)
256256
end
257257
end
258258

259-
if math.random(100) > 75 and base:can_afford('harrassment') and base.targets then
259+
local evo_factor = game.evolution_factor * 100
260+
261+
if evo_factor > 30 and math.random(100) > 80 and base:can_afford('harrassment') and base.targets then
260262
local active_chunk = BiterBase.is_in_active_chunk(base)
261263
if active_chunk then LogAI("Is in an active chunk: true", base) else LogAI("Is in an active chunk: false", base) end
262264

@@ -266,7 +268,7 @@ function BiterBase.create_plan(base)
266268
end
267269
end
268270

269-
if math.random(100) > (game.evolution_factor * 100) and base:can_afford('attack_area') and base.targets then
271+
if math.random(100) < evo_factor and base:can_afford('attack_area') and base.targets then
270272
local active_chunk = BiterBase.is_in_active_chunk(base)
271273
if active_chunk then LogAI("Is in an active chunk: true", base) else LogAI("Is in an active chunk: false", base) end
272274

@@ -327,7 +329,7 @@ function BiterBase.create_entity(base, surface, entity_data)
327329
if not base.entities then base.entities = {} end
328330
table.insert(base.entities, entity)
329331

330-
local evo_cost = 0.000001 * game.entity_prototypes[entity_data.name].max_health
332+
local evo_cost = 0.00000025 * game.entity_prototypes[entity_data.name].max_health
331333
game.evolution_factor = game.evolution_factor - evo_cost
332334

333335
return entity
@@ -337,7 +339,7 @@ function BiterBase.destroy_entity(entity)
337339
if not entity or not entity.valid then
338340
return
339341
end
340-
local evo_cost = 0.000001 * game.entity_prototypes[entity.name].max_health
342+
local evo_cost = 0.00000025 * game.entity_prototypes[entity.name].max_health
341343
game.evolution_factor = game.evolution_factor + evo_cost
342344
entity.destroy()
343345
end

0 commit comments

Comments
 (0)