|
@@ -194,7 +194,8 @@ void BattleAction::setTarget(const battle::Target & target_)
|
|
|
|
|
|
bool BattleAction::isUnitAction() const
|
|
|
{
|
|
|
- static const std::array<EActionType, 9> actions = {
|
|
|
+ static const std::array<EActionType, 109> actions = {
|
|
|
+ EActionType::NO_ACTION,
|
|
|
EActionType::WALK,
|
|
|
EActionType::WAIT,
|
|
|
EActionType::DEFEND,
|
|
@@ -205,7 +206,6 @@ bool BattleAction::isUnitAction() const
|
|
|
EActionType::BAD_MORALE,
|
|
|
EActionType::STACK_HEAL
|
|
|
};
|
|
|
-
|
|
|
return vstd::contains(actions, actionType);
|
|
|
}
|
|
|
|
|
@@ -215,7 +215,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 +235,6 @@ bool BattleAction::isTacticsAction() const
|
|
|
EActionType::RETREAT,
|
|
|
EActionType::SURRENDER
|
|
|
};
|
|
|
-
|
|
|
return vstd::contains(actions, actionType);
|
|
|
}
|
|
|
|