Fix ABILITY_POPUP not respecting abilityPopupOverwrite in tests (#4423)

This commit is contained in:
kittenchilly 2024-04-22 03:49:53 -05:00 committed by GitHub
parent fa53e97f0c
commit d398b9e8e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3243,6 +3243,9 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
if (B_ABILITY_POP_UP == FALSE)
return;
if (gBattleScripting.abilityPopupOverwrite != 0)
ability = gBattleScripting.abilityPopupOverwrite;
if (gTestRunnerEnabled)
{
TestRunner_Battle_RecordAbilityPopUp(battlerId, ability);
@ -3250,9 +3253,6 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
return;
}
if (gBattleScripting.abilityPopupOverwrite != 0)
ability = gBattleScripting.abilityPopupOverwrite;
if (!gBattleStruct->activeAbilityPopUps)
{
LoadSpriteSheet(&sSpriteSheet_AbilityPopUp);