Fixed issue where base stats of a variant got corrupted.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-22 15:25:38 +01:00
parent 899e432271
commit 475392f9b6
8 changed files with 13 additions and 13 deletions

View File

@@ -59,6 +59,7 @@ void Battle::CheckChoicesSetAndRun() {
}
side->ResetChoices();
}
_currentTurn++;
TurnOrdering::OrderChoices(choices, _random.GetRNG());
this->_currentTurnQueue = new ChoiceQueue(choices);
TurnHandler::RunTurn(this->_currentTurnQueue);

View File

@@ -26,6 +26,7 @@ namespace CreatureLib::Battling {
bool _hasEnded = false;
BattleResult _battleResult = BattleResult::Empty();
EventHook _eventHook = EventHook();
uint32_t _currentTurn = 0;
ScriptSet _volatile;
@@ -55,6 +56,7 @@ namespace CreatureLib::Battling {
}
[[nodiscard]] const BattleLibrary* GetLibrary() const;
[[nodiscard]] uint32_t GetCurrentTurn() const noexcept { return _currentTurn; }
virtual bool CanUse(const BaseTurnChoice* choice);
virtual bool TrySetChoice(BaseTurnChoice* choice);