Use offsets from ANIM_* constants for wBattleAfterAnim (formerly wNumHits) (#1184)

This commit is contained in:
Rangi
2025-05-31 15:07:56 -04:00
committed by GitHub
parent b035d9fb89
commit efceed1338
10 changed files with 60 additions and 69 deletions

View File

@@ -415,7 +415,7 @@ HandleBerserkGene:
bit SUBSTATUS_CONFUSED, a
ret nz
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_CONFUSED
call Call_PlayBattleAnim_OnlyIfVisible
call SwitchTurnCore
@@ -1028,7 +1028,7 @@ ResidualDamage:
pop de
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
call Call_PlayBattleAnim_OnlyIfVisible
call GetEighthMaxHP
ld de, wPlayerToxicCount
@@ -1068,7 +1068,7 @@ ResidualDamage:
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_SAP
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
@@ -1093,7 +1093,7 @@ ResidualDamage:
bit SUBSTATUS_NIGHTMARE, [hl]
jr z, .not_nightmare
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_IN_NIGHTMARE
call Call_PlayBattleAnim_OnlyIfVisible
call GetQuarterMaxHP
@@ -1111,7 +1111,7 @@ ResidualDamage:
jr z, .not_cursed
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_IN_NIGHTMARE
call Call_PlayBattleAnim_OnlyIfVisible
call GetQuarterMaxHP
@@ -1253,7 +1253,7 @@ HandleWrap:
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld [wFXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
@@ -1743,7 +1743,7 @@ HandleWeather:
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_IN_SANDSTORM
call Call_PlayBattleAnim
call SwitchTurnCore
@@ -3553,7 +3553,7 @@ ShowSetEnemyMonAndSendOutAnimation:
call GetEnemyMonFrontpic
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld [wBattleAnimParam], a
call SetEnemyTurn
ld de, ANIM_SEND_OUT_MON
@@ -4046,7 +4046,7 @@ SendOutPlayerMon:
ld [wEnemyWrapCount], a
call SetPlayerTurn
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld [wBattleAnimParam], a
ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim
@@ -4235,7 +4235,7 @@ RecallPlayerMon:
push af
xor a
ldh [hBattleTurn], a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld de, ANIM_RETURN_MON
call Call_PlayBattleAnim
pop af
@@ -4367,7 +4367,7 @@ ItemRecoveryAnim:
ld [wFXAnimID], a
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld [wFXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
@@ -9086,7 +9086,7 @@ BattleStartMessage:
jr nc, .not_shiny
xor a
ld [wNumHits], a
ld [wBattleAfterAnim], a
ld a, 1
ldh [hBattleTurn], a
ld a, 1