Remove wKickCounter and wPresentPower aliases for wBattleAnimParam

This commit is contained in:
Rangi 2020-08-29 20:35:49 -04:00
parent 49bbc993b7
commit cf37abd3ec
14 changed files with 39 additions and 40 deletions

View File

@ -221,7 +221,7 @@ Does nothing. Unused.
## `$F8`: <code>anim_if_param_equal <i>value</i>, <i>address</i></code> ## `$F8`: <code>anim_if_param_equal <i>value</i>, <i>address</i></code>
Jumps to another script if `wBattleAnimParam` (aka `wKickCounter` or `wPresentPower`) is equal to *value*. Jumps to another script if `wBattleAnimParam` is equal to *value*.
## `$F9`: <code>anim_setvar <i>value</i></code> ## `$F9`: <code>anim_setvar <i>value</i></code>

View File

@ -122,7 +122,7 @@ BattleCommand_CheckTurn:
xor a xor a
ld [wAttackMissed], a ld [wAttackMissed], a
ld [wEffectFailed], a ld [wEffectFailed], a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld [wAlreadyDisobeyed], a ld [wAlreadyDisobeyed], a
ld [wAlreadyFailed], a ld [wAlreadyFailed], a
ld [wSomeoneIsRampaging], a ld [wSomeoneIsRampaging], a
@ -1933,7 +1933,7 @@ BattleCommand_LowerSub:
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
inc a inc a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, SUBSTITUTE ld a, SUBSTITUTE
jp LoadAnim jp LoadAnim
@ -1994,7 +1994,7 @@ BattleCommand_MoveAnimNoSub:
cp EFFECT_TRIPLE_KICK cp EFFECT_TRIPLE_KICK
jr z, .triplekick jr z, .triplekick
xor a xor a
ld [wKickCounter], a ld [wBattleAnimParam], a
.triplekick .triplekick
ld a, BATTLE_VARS_MOVE_ANIM ld a, BATTLE_VARS_MOVE_ANIM
@ -2013,10 +2013,10 @@ BattleCommand_MoveAnimNoSub:
jp AppearUserLowerSub jp AppearUserLowerSub
.alternate_anim .alternate_anim
ld a, [wKickCounter] ld a, [wBattleAnimParam]
and 1 and 1
xor 1 xor 1
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, [de] ld a, [de]
cp 1 cp 1
push af push af
@ -2054,7 +2054,7 @@ BattleCommand_StatDownAnim:
BattleCommand_StatUpDownAnim: BattleCommand_StatUpDownAnim:
ld [wNumHits], a ld [wNumHits], a
xor a xor a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, BATTLE_VARS_MOVE_ANIM ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar call GetBattleVar
ld e, a ld e, a
@ -2084,7 +2084,7 @@ BattleCommand_RaiseSub:
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
ld a, $2 ld a, $2
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, SUBSTITUTE ld a, SUBSTITUTE
jp LoadAnim jp LoadAnim
@ -2272,7 +2272,7 @@ endr
ld hl, CrashedText ld hl, CrashedText
call StdBattleTextbox call StdBattleTextbox
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call LoadMoveAnim call LoadMoveAnim
ld c, TRUE ld c, TRUE
ldh a, [hBattleTurn] ldh a, [hBattleTurn]
@ -2429,7 +2429,7 @@ BattleCommand_CheckFaint:
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
inc a inc a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, DESTINY_BOND ld a, DESTINY_BOND
call LoadAnim call LoadAnim
call BattleCommand_SwitchTurn call BattleCommand_SwitchTurn
@ -5112,7 +5112,7 @@ BattleCommand_ForceSwitch:
jr z, .switch_fail jr z, .switch_fail
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
ld c, $14 ld c, $14
call DelayFrames call DelayFrames
@ -5207,7 +5207,7 @@ BattleCommand_ForceSwitch:
call UpdateBattleMonInParty call UpdateBattleMonInParty
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
@ -5260,7 +5260,7 @@ BattleCommand_ForceSwitch:
push af push af
call SetBattleDraw call SetBattleDraw
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
@ -5607,7 +5607,7 @@ BattleCommand_Charge:
xor a xor a
ld [wNumHits], a ld [wNumHits], a
inc a inc a
ld [wKickCounter], a ld [wBattleAnimParam], a
call LoadMoveAnim call LoadMoveAnim
ld a, BATTLE_VARS_MOVE_ANIM ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar call GetBattleVar
@ -6739,11 +6739,11 @@ AnimateCurrentMoveEitherSide:
push hl push hl
push de push de
push bc push bc
ld a, [wKickCounter] ld a, [wBattleAnimParam]
push af push af
call BattleCommand_LowerSub call BattleCommand_LowerSub
pop af pop af
ld [wKickCounter], a ld [wBattleAnimParam], a
call PlayDamageAnim call PlayDamageAnim
call BattleCommand_RaiseSub call BattleCommand_RaiseSub
pop bc pop bc
@ -6755,11 +6755,11 @@ AnimateCurrentMove:
push hl push hl
push de push de
push bc push bc
ld a, [wKickCounter] ld a, [wBattleAnimParam]
push af push af
call BattleCommand_LowerSub call BattleCommand_LowerSub
pop af pop af
ld [wKickCounter], a ld [wBattleAnimParam], a
call LoadMoveAnim call LoadMoveAnim
call BattleCommand_RaiseSub call BattleCommand_RaiseSub
pop bc pop bc

View File

@ -95,6 +95,6 @@ BattleCommand_UnleashEnergy:
inc a inc a
ld [bc], a ld [bc], a
ld a, 1 ld a, 1
ld [wKickCounter], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
jp EndMoveEffect jp EndMoveEffect

View File

@ -39,7 +39,7 @@ BattleCommand_Curse:
; Raise Attack and Defense, and lower Speed. ; Raise Attack and Defense, and lower Speed.
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
ld a, SPEED ld a, SPEED
call LowerStat call LowerStat

View File

@ -5,11 +5,11 @@ BattleCommand_Metronome:
call CheckUserIsCharging call CheckUserIsCharging
jr nz, .asm_3742b jr nz, .asm_3742b
ld a, [wKickCounter] ld a, [wBattleAnimParam]
push af push af
call BattleCommand_LowerSub call BattleCommand_LowerSub
pop af pop af
ld [wKickCounter], a ld [wBattleAnimParam], a
.asm_3742b .asm_3742b
call LoadMoveAnim call LoadMoveAnim

View File

@ -40,11 +40,11 @@ BattleCommand_MirrorMove:
call CheckUserIsCharging call CheckUserIsCharging
jr nz, .done jr nz, .done
ld a, [wKickCounter] ld a, [wBattleAnimParam]
push af push af
call BattleCommand_LowerSub call BattleCommand_LowerSub
pop af pop af
ld [wKickCounter], a ld [wBattleAnimParam], a
.done .done
call BattleCommand_MoveDelay call BattleCommand_MoveDelay

View File

@ -41,7 +41,7 @@ BattleCommand_Present:
.got_power .got_power
ld a, c ld a, c
ld [wPresentPower], a ld [wBattleAnimParam], a
call AnimateCurrentMoveEitherSide call AnimateCurrentMoveEitherSide
ld d, [hl] ld d, [hl]
pop bc pop bc
@ -49,8 +49,8 @@ BattleCommand_Present:
.heal_effect .heal_effect
pop bc pop bc
ld a, 3 ld a, $3 ; heal animation
ld [wPresentPower], a ld [wBattleAnimParam], a
call AnimateCurrentMove call AnimateCurrentMove
call BattleCommand_SwitchTurn call BattleCommand_SwitchTurn
ld hl, AICheckPlayerMaxHP ld hl, AICheckPlayerMaxHP

View File

@ -12,7 +12,7 @@ BattleCommand_Selfdestruct:
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
call BattleCommand_LowerSub call BattleCommand_LowerSub
call LoadMoveAnim call LoadMoveAnim
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4

View File

@ -52,11 +52,11 @@ BattleCommand_SleepTalk:
ld [hl], a ld [hl], a
call CheckUserIsCharging call CheckUserIsCharging
jr nz, .charging jr nz, .charging
ld a, [wKickCounter] ld a, [wBattleAnimParam]
push af push af
call BattleCommand_LowerSub call BattleCommand_LowerSub
pop af pop af
ld [wKickCounter], a ld [wBattleAnimParam], a
.charging .charging
call LoadMoveAnim call LoadMoveAnim
call UpdateMoveData call UpdateMoveData

View File

@ -62,7 +62,7 @@ BattleCommand_Substitute:
xor a xor a
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, SUBSTITUTE ld a, SUBSTITUTE
call LoadAnim call LoadAnim
jr .finish jr .finish

View File

@ -75,7 +75,7 @@ BattleCommand_Teleport:
ld [wNumHits], a ld [wNumHits], a
inc a inc a
ld [wForcedSwitch], a ld [wForcedSwitch], a
ld [wKickCounter], a ld [wBattleAnimParam], a
call SetBattleDraw call SetBattleDraw
call BattleCommand_LowerSub call BattleCommand_LowerSub
call LoadMoveAnim call LoadMoveAnim

View File

@ -12,7 +12,7 @@ BattleCommand_Transform:
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
ld a, $1 ld a, $1
ld [wKickCounter], a ld [wBattleAnimParam], a
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVarAddr call GetBattleVarAddr
bit SUBSTATUS_SUBSTITUTE, [hl] bit SUBSTATUS_SUBSTITUTE, [hl]
@ -130,7 +130,7 @@ BattleCommand_Transform:
ld [wNumHits], a ld [wNumHits], a
ld [wFXAnimID + 1], a ld [wFXAnimID + 1], a
ld a, $2 ld a, $2
ld [wKickCounter], a ld [wBattleAnimParam], a
pop af pop af
ld a, SUBSTITUTE ld a, SUBSTITUTE
call nz, LoadAnim call nz, LoadAnim

View File

@ -1,7 +1,7 @@
BattleCommand_TripleKick: BattleCommand_TripleKick:
; triplekick ; triplekick
ld a, [wKickCounter] ld a, [wBattleAnimParam]
ld b, a ld b, a
inc b inc b
ld hl, wCurDamage + 1 ld hl, wCurDamage + 1
@ -29,6 +29,6 @@ BattleCommand_TripleKick:
BattleCommand_KickCounter: BattleCommand_KickCounter:
; kickcounter ; kickcounter
ld hl, wKickCounter ld hl, wBattleAnimParam
inc [hl] inc [hl]
ret ret

View File

@ -531,10 +531,9 @@ wPlayerDamageTaken:: dw
wEnemyDamageTaken:: dw wEnemyDamageTaken:: dw
wBattleReward:: ds 3 wBattleReward:: ds 3
wBattleAnimParam::
wKickCounter:: wBattleAnimParam:: db
wPresentPower::
db
wBattleScriptBuffer:: ds 40 wBattleScriptBuffer:: ds 40
wBattleScriptBufferAddress:: dw wBattleScriptBufferAddress:: dw