BattleEngine is now connected to the boss::UI so as you click it'll continually run the plan and figure out the AI actions.
This commit is contained in:
parent
a38bb5b691
commit
f839edcd56
10 changed files with 112 additions and 56 deletions
|
|
@ -20,17 +20,20 @@ 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{100, 100, 20, 6, 12};
|
||||
components::Combat host_combat{
|
||||
.hp=100, .max_hp=100, .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{100, 100, 20, 8, 12};
|
||||
components::Combat axe_combat{
|
||||
.hp=20, .max_hp=20, .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{10, 10, 2, 12, 18};
|
||||
components::Combat rat_combat{
|
||||
.hp=10, .max_hp=10, .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