Support for failing an AttackTurnChoice.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This is handled before the actual ExecutingAttack is created, so allows for failing a move a lot earlier than before.
This commit is contained in:
@@ -134,6 +134,11 @@ void TurnHandler::ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>
|
||||
return;
|
||||
}
|
||||
|
||||
if (choice->HasFailed()) {
|
||||
FAIL_HANDLING_NO_TARGET(choice, choice->GetUser());
|
||||
return;
|
||||
}
|
||||
|
||||
auto* attack = attackScoped.TakeOwnership();
|
||||
battle.GetValue()->TriggerEventListener<AttackUseEvent>(attack);
|
||||
battle.GetValue()->RegisterHistoryElement<AttackUseHistory>(attack);
|
||||
|
||||
Reference in New Issue
Block a user