mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 18:33:39 +02:00
world::move_idle_cost: Introduce, based on attr.move
This commit is contained in:
parent
2907cb6791
commit
ceb16277fb
2 changed files with 3 additions and 0 deletions
1
agent.cc
1
agent.cc
|
@ -114,6 +114,7 @@ agent::on_tick(void)
|
||||||
|
|
||||||
if (!dead) {
|
if (!dead) {
|
||||||
chenergy(world::sun_energy);
|
chenergy(world::sun_energy);
|
||||||
|
chenergy(attr.move * world::move_idle_cost);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
energy += world::dead_decay;
|
energy += world::dead_decay;
|
||||||
|
|
2
world.h
2
world.h
|
@ -6,6 +6,8 @@ struct world {
|
||||||
const static int move_cost = -50;
|
const static int move_cost = -50;
|
||||||
const static int attack_cost = -400;
|
const static int attack_cost = -400;
|
||||||
const static int defense_cost = -200;
|
const static int defense_cost = -200;
|
||||||
|
|
||||||
|
const static int move_idle_cost = -15; /* ... * attr.move */
|
||||||
const static int sun_energy = 10;
|
const static int sun_energy = 10;
|
||||||
|
|
||||||
const static int dead_body_energy = 2000;
|
const static int dead_body_energy = 2000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue