mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Fixed ending of battles due to retreat/surrender
This commit is contained in:
@@ -205,7 +205,6 @@ bool BattleAction::isUnitAction() const
|
||||
EActionType::BAD_MORALE,
|
||||
EActionType::STACK_HEAL
|
||||
};
|
||||
|
||||
return vstd::contains(actions, actionType);
|
||||
}
|
||||
|
||||
@@ -215,7 +214,15 @@ bool BattleAction::isSpellAction() const
|
||||
EActionType::HERO_SPELL,
|
||||
EActionType::MONSTER_SPELL
|
||||
};
|
||||
return vstd::contains(actions, actionType);
|
||||
}
|
||||
|
||||
bool BattleAction::isBattleEndAction() const
|
||||
{
|
||||
static const std::array<EActionType, 2> actions = {
|
||||
EActionType::RETREAT,
|
||||
EActionType::SURRENDER
|
||||
};
|
||||
return vstd::contains(actions, actionType);
|
||||
}
|
||||
|
||||
@@ -227,7 +234,6 @@ bool BattleAction::isTacticsAction() const
|
||||
EActionType::RETREAT,
|
||||
EActionType::SURRENDER
|
||||
};
|
||||
|
||||
return vstd::contains(actions, actionType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user