Now have the basics of the turn based battle engine with AI rebellion working.

This commit is contained in:
Zed A. Shaw 2025-12-01 00:14:08 -05:00
parent f3b20f30c5
commit c78b2ae75e
8 changed files with 114 additions and 73 deletions

View file

@ -256,7 +256,7 @@ void System::combat(int attack_id) {
battle.dump();
while(auto act = battle.next()) {
auto [enemy, ai_action, enemy_action] = *act;
auto [enemy, enemy_action, cost, host_state] = *act;
Events::Combat result {
player_combat.attack(*enemy.combat), 0
@ -266,7 +266,7 @@ void System::combat(int attack_id) {
spawn_attack(world, attack_id, enemy.entity);
}
if(enemy_action == combat::BattleAction::ATTACK) {
if(enemy_action == "kill_enemy") {
result.enemy_did = enemy.combat->attack(player_combat);
animation::animate_entity(world, enemy.entity);
}