|
|
|
@ -231,7 +231,7 @@ void System::combat(GameLevel &level, int attack_id) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
while(auto act = battle.next()) { |
|
|
|
|
auto [enemy, action] = *act; |
|
|
|
|
auto [enemy, enemy_action] = *act; |
|
|
|
|
|
|
|
|
|
Events::Combat result { |
|
|
|
|
player_combat.attack(enemy.combat), 0 |
|
|
|
@ -242,7 +242,7 @@ void System::combat(GameLevel &level, int attack_id) { |
|
|
|
|
world.set<SpriteEffect>(enemy.entity, {100, effect}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(enemy.ai.wants_to("kill_enemy")) { |
|
|
|
|
if(enemy_action == combat::BattleAction::ATTACK) { |
|
|
|
|
result.enemy_did = enemy.combat.attack(player_combat); |
|
|
|
|
animate_entity(world, enemy.entity); |
|
|
|
|
} |
|
|
|
|