You now receive damage to multiple body parts and can heal them all too.
This commit is contained in:
parent
1777a6bbf2
commit
360402cb3c
6 changed files with 61 additions and 23 deletions
|
|
@ -25,17 +25,17 @@ TEST_CASE("battle operations fantasy", "[combat-battle]") {
|
|||
|
||||
DinkyECS::Entity host = 0;
|
||||
ai::EntityAI host_ai("Host::actions", host_start, host_goal);
|
||||
components::Combat host_combat{.ap_delta=6, .max_ap=12, .damage=20};
|
||||
components::Combat host_combat{.max_hp=50, .ap_delta=6, .max_ap=12, .damage=20};
|
||||
battle.add_enemy({host, &host_ai, &host_combat, true});
|
||||
|
||||
DinkyECS::Entity axe_ranger = 1;
|
||||
ai::EntityAI axe_ai("Enemy::actions", ai_start, ai_goal);
|
||||
components::Combat axe_combat{.ap_delta=8, .max_ap=12, .damage=20};
|
||||
components::Combat axe_combat{.max_hp=50, .ap_delta=8, .max_ap=12, .damage=20};
|
||||
battle.add_enemy({axe_ranger, &axe_ai, &axe_combat});
|
||||
|
||||
DinkyECS::Entity rat = 2;
|
||||
ai::EntityAI rat_ai("Enemy::actions", ai_start, ai_goal);
|
||||
components::Combat rat_combat{.ap_delta=2, .max_ap=10, .damage=10};
|
||||
components::Combat rat_combat{.max_hp=50, .ap_delta=2, .max_ap=10, .damage=10};
|
||||
battle.add_enemy({rat, &rat_ai, &rat_combat});
|
||||
|
||||
battle.set_all("enemy_found", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue