Enemies how fight back when cornered, either by being blocked by another enemy or when at a dead end walls.

This commit is contained in:
Zed A. Shaw 2025-08-22 22:29:22 -04:00
parent 586343a614
commit fc8e65f4d6
3 changed files with 8 additions and 3 deletions

View file

@ -15,8 +15,10 @@ namespace combat {
if(enemy.ai.active()) {
if(enemy.ai.wants_to("kill_enemy")) {
fmt::println(">> enemy {} wants to KILL", entity);
pending_actions.emplace_back(enemy, BattleAction::ATTACK);
} else if(enemy.ai.wants_to("run_away")) {
fmt::println(">> enemy {} wants to RUN", entity);
pending_actions.emplace_back(enemy, BattleAction::ESCAPE);
}
}