Reset choices on side when executing turn.
This commit is contained in:
parent
5fc2bf564a
commit
beac87f981
|
@ -42,7 +42,7 @@ void TurnHandler::ExecuteChoice(const BaseTurnChoice *choice) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (choiceKind){
|
switch (choiceKind){
|
||||||
case TurnChoiceKind::Pass: return;
|
case TurnChoiceKind::Pass: throw NotReachableException();
|
||||||
case TurnChoiceKind::Attack:
|
case TurnChoiceKind::Attack:
|
||||||
return ExecuteAttackChoice(dynamic_cast<const AttackTurnChoice*>(choice));
|
return ExecuteAttackChoice(dynamic_cast<const AttackTurnChoice*>(choice));
|
||||||
case TurnChoiceKind::Item:
|
case TurnChoiceKind::Item:
|
||||||
|
|
|
@ -50,6 +50,7 @@ void Battle::CheckChoicesSetAndRun() {
|
||||||
choices[i] = choice;
|
choices[i] = choice;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
side->ResetChoices();
|
||||||
}
|
}
|
||||||
TurnOrdering::OrderChoices(choices, _random);
|
TurnOrdering::OrderChoices(choices, _random);
|
||||||
auto choiceQueue = new ChoiceQueue(choices);
|
auto choiceQueue = new ChoiceQueue(choices);
|
||||||
|
|
Loading…
Reference in New Issue