Support for ending battles when only one side has creatures that are available for battle.
This commit is contained in:
@@ -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; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user