Implements BattleRandom class with support for Effect Chance, and script hooks to modify this.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-16 15:08:22 +01:00
parent 579ee82f02
commit 54e366fc1b
5 changed files with 45 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ void Battle::CheckChoicesSetAndRun() {
}
side->ResetChoices();
}
TurnOrdering::OrderChoices(choices, _random);
TurnOrdering::OrderChoices(choices, _random.GetRNG());
this->_currentTurnQueue = new ChoiceQueue(choices);
TurnHandler::RunTurn(this, this->_currentTurnQueue);
if (this->_currentTurnQueue->HasCompletedQueue) {
@@ -69,7 +69,7 @@ void Battle::CheckChoicesSetAndRun() {
ChoiceQueue* Battle::GetCurrentTurnQueue() const { return _currentTurnQueue; }
Core::Random& Battle::GetRandom() { return _random; }
BattleRandom& Battle::GetRandom() { return _random; }
bool Battle::CreatureInField(const Creature* creature) const {
for (auto s : _sides) {