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:
@@ -43,7 +43,7 @@ namespace CreatureLib::Battling {
|
||||
AssertNotNull(attack)
|
||||
#endif
|
||||
ResolveScript();
|
||||
HOOK(ChangePriority, this, this, &_priority);
|
||||
_priority = _attack->GetAttack()->GetPriority();
|
||||
}
|
||||
AttackTurnChoice(Creature* user, const ArbUt::BorrowedPtr<LearnedAttack>& attack, const CreatureIndex& target,
|
||||
Script* script)
|
||||
@@ -52,7 +52,7 @@ namespace CreatureLib::Battling {
|
||||
AssertNotNull(user)
|
||||
AssertNotNull(attack)
|
||||
#endif
|
||||
HOOK(ChangePriority, this, this, &_priority);
|
||||
_priority = _attack->GetAttack()->GetPriority();
|
||||
}
|
||||
|
||||
~AttackTurnChoice() = default;
|
||||
@@ -61,7 +61,8 @@ namespace CreatureLib::Battling {
|
||||
|
||||
TurnChoiceKind GetKind() const noexcept override { return TurnChoiceKind ::Attack; }
|
||||
|
||||
inline int8_t GetPriority() const { return _attack->GetAttack()->GetPriority(); }
|
||||
inline int8_t GetPriority() const noexcept { return _priority; }
|
||||
inline void SetPriority(int8_t priority) noexcept { _priority = priority; }
|
||||
|
||||
const CreatureIndex& GetTarget() const noexcept { return _target; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user