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:
parent
586343a614
commit
fc8e65f4d6
3 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue