Move priority scripthook to more sensible place in turn flow.
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:
@@ -30,5 +30,13 @@ public:
|
||||
};
|
||||
|
||||
void TurnOrdering::OrderChoices(std::vector<std::shared_ptr<BaseTurnChoice>>& vec, ArbUt::Random& rand) {
|
||||
for (auto item : vec) {
|
||||
if (item->GetKind() == TurnChoiceKind::Attack) {
|
||||
auto attackChoice = static_cast<AttackTurnChoice*>(item.get());
|
||||
auto priority = attackChoice->GetPriority();
|
||||
HOOK(ChangePriority, attackChoice, attackChoice, &priority);
|
||||
attackChoice->SetPriority(priority);
|
||||
}
|
||||
}
|
||||
std::sort(vec.begin(), vec.end(), ChoiceCompare());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user