Support for ending battles when only one side has creatures that are available for battle.

This commit is contained in:
2019-12-07 21:56:29 +01:00
parent 0483e635ea
commit 262279bd2c
9 changed files with 117 additions and 6 deletions

View File

@@ -18,6 +18,8 @@ namespace CreatureLib::Battling {
std::vector<BattleSide*> _sides;
Core::Random _random;
ChoiceQueue* _currentTurnQueue = nullptr;
bool _hasEnded = false;
uint8_t _battleResult = 0;
ScriptSet _volatile;
@@ -58,6 +60,10 @@ namespace CreatureLib::Battling {
bool CanSlotBeFilled(uint8_t side, uint8_t index) const;
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override;
void ValidateBattleState();
inline bool HasEnded() const { return _hasEnded; }
inline uint8_t GetResult() const { return _battleResult; }
};
}