diff --git a/agent.cc b/agent.cc index cb06493..7a10765 100644 --- a/agent.cc +++ b/agent.cc @@ -114,6 +114,7 @@ agent::on_tick(void) if (!dead) { chenergy(world::sun_energy); + chenergy(attr.move * world::move_idle_cost); } else { energy += world::dead_decay; diff --git a/world.h b/world.h index b2266fd..a8e0687 100644 --- a/world.h +++ b/world.h @@ -6,6 +6,8 @@ struct world { const static int move_cost = -50; const static int attack_cost = -400; const static int defense_cost = -200; + + const static int move_idle_cost = -15; /* ... * attr.move */ const static int sun_energy = 10; const static int dead_body_energy = 2000;