Fully handle turn ordering
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "../TurnChoices/AttackTurnChoice.hpp"
|
||||
#include "../Flow/TurnOrdering.hpp"
|
||||
|
||||
using namespace CreatureLib;
|
||||
using namespace CreatureLib::Battling;
|
||||
|
||||
const BattleLibrary *Battle::GetLibrary() const {
|
||||
@@ -39,7 +40,7 @@ void Battle::CheckChoicesSetAndRun() {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
TurnOrdering::OrderChoices(choices);
|
||||
TurnOrdering::OrderChoices(choices, _random);
|
||||
auto choiceQueue = ChoiceQueue(choices);
|
||||
this->_currentTurnQueue = &choiceQueue;
|
||||
TurnHandler::RunTurn(choiceQueue);
|
||||
@@ -49,3 +50,7 @@ void Battle::CheckChoicesSetAndRun() {
|
||||
ChoiceQueue* Battle::GetCurrentTurnQueue() const {
|
||||
return _currentTurnQueue;
|
||||
}
|
||||
|
||||
Core::Random &Battle::GetRandom(){
|
||||
return _random;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user