mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 09:53:38 +02:00
Attack, defense rates
This commit is contained in:
parent
ceb16277fb
commit
b80ccfdffd
5 changed files with 33 additions and 9 deletions
4
agent.h
4
agent.h
|
@ -16,6 +16,8 @@ public:
|
|||
|
||||
struct {
|
||||
double move;
|
||||
double attack;
|
||||
double defense;
|
||||
} attr;
|
||||
|
||||
int energy;
|
||||
|
@ -27,6 +29,8 @@ public:
|
|||
energy = world::newborn_energy;
|
||||
dead = false;
|
||||
attr.move = 1.0;
|
||||
attr.attack = 0.5;
|
||||
attr.defense = 0.5;
|
||||
};
|
||||
void spawn(void);
|
||||
void spawn_at(class tile &tile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue