diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-08-29 20:36:00 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-08-29 20:36:00 -0400 |
commit | f90f4bc62a664bb24103b8d4a286d519de6b0053 (patch) | |
tree | 3d990db431340c10e2bb69c433be2c5d9fc2e434 | |
parent | 8d8229d2aab1b1cd06db22cc8db4fa60bc55ccc4 (diff) |
Remove wKickCounter and wPresentPower aliases for wBattleAnimParam
-rw-r--r-- | engine/battle/effect_commands.asm | 34 | ||||
-rw-r--r-- | engine/battle/move_effects/bide.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/curse.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/metronome.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/mirror_move.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/present.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/selfdestruct.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/sleep_talk.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/substitute.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/teleport.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/transform.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/triple_kick.asm | 4 | ||||
-rw-r--r-- | wram.asm | 7 |
13 files changed, 37 insertions, 38 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index ad943ab7..9bdd9bb7 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -133,7 +133,7 @@ BattleCommand_CheckTurn: xor a ld [wAttackMissed], a ld [wEffectFailed], a - ld [wKickCounter], a + ld [wBattleAnimParam], a ld [wAlreadyDisobeyed], a ld [wAlreadyFailed], a ld [wSomeoneIsRampaging], a @@ -1937,7 +1937,7 @@ BattleCommand_LowerSub: ld [wNumHits], a ld [wFXAnimID + 1], a inc a - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, SUBSTITUTE jp LoadAnim @@ -1998,7 +1998,7 @@ BattleCommand_MoveAnimNoSub: cp EFFECT_TRIPLE_KICK jr z, .triplekick xor a - ld [wKickCounter], a + ld [wBattleAnimParam], a .triplekick ld a, BATTLE_VARS_MOVE_ANIM @@ -2017,10 +2017,10 @@ BattleCommand_MoveAnimNoSub: jp AppearUserLowerSub .alternate_anim - ld a, [wKickCounter] + ld a, [wBattleAnimParam] and 1 xor 1 - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, [de] cp 1 push af @@ -2058,7 +2058,7 @@ BattleCommand_StatDownAnim: BattleCommand_StatUpDownAnim: ld [wNumHits], a xor a - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, BATTLE_VARS_MOVE_ANIM call GetBattleVar ld e, a @@ -2090,7 +2090,7 @@ BattleCommand_RaiseSub: ld [wNumHits], a ld [wFXAnimID + 1], a ld a, $2 - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, SUBSTITUTE jp LoadAnim @@ -2278,7 +2278,7 @@ endr ld hl, CrashedText call StdBattleTextbox ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call LoadMoveAnim ld c, TRUE ldh a, [hBattleTurn] @@ -2435,7 +2435,7 @@ BattleCommand_CheckFaint: ld [wNumHits], a ld [wFXAnimID + 1], a inc a - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, DESTINY_BOND call LoadAnim call BattleCommand_SwitchTurn @@ -5062,7 +5062,7 @@ BattleCommand_ForceSwitch: jr z, .switch_fail call UpdateEnemyMonInParty ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call AnimateCurrentMove ld c, $14 call DelayFrames @@ -5158,7 +5158,7 @@ BattleCommand_ForceSwitch: call UpdateBattleMonInParty ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call AnimateCurrentMove ld c, 20 call DelayFrames @@ -5209,7 +5209,7 @@ BattleCommand_ForceSwitch: ld a, DRAW ld [wBattleResult], a ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call AnimateCurrentMove ld c, 20 call DelayFrames @@ -5562,7 +5562,7 @@ BattleCommand_Charge: xor a ld [wNumHits], a inc a - ld [wKickCounter], a + ld [wBattleAnimParam], a call LoadMoveAnim ld a, BATTLE_VARS_MOVE_ANIM call GetBattleVar @@ -6690,11 +6690,11 @@ AnimateCurrentMoveEitherSide: push hl push de push bc - ld a, [wKickCounter] + ld a, [wBattleAnimParam] push af call BattleCommand_LowerSub pop af - ld [wKickCounter], a + ld [wBattleAnimParam], a call PlayDamageAnim call BattleCommand_RaiseSub pop bc @@ -6706,11 +6706,11 @@ AnimateCurrentMove: push hl push de push bc - ld a, [wKickCounter] + ld a, [wBattleAnimParam] push af call BattleCommand_LowerSub pop af - ld [wKickCounter], a + ld [wBattleAnimParam], a call LoadMoveAnim call BattleCommand_RaiseSub pop bc diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm index 74f7c9cf..300ff8c7 100644 --- a/engine/battle/move_effects/bide.asm +++ b/engine/battle/move_effects/bide.asm @@ -95,6 +95,6 @@ BattleCommand_UnleashEnergy: inc a ld [bc], a ld a, 1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call AnimateCurrentMove jp EndMoveEffect diff --git a/engine/battle/move_effects/curse.asm b/engine/battle/move_effects/curse.asm index 3507c668..049e79e5 100644 --- a/engine/battle/move_effects/curse.asm +++ b/engine/battle/move_effects/curse.asm @@ -39,7 +39,7 @@ BattleCommand_Curse: ; Raise Attack and Defense, and lower Speed. ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call AnimateCurrentMove ld a, SPEED call LowerStat diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index 02766c16..966133ee 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -5,11 +5,11 @@ BattleCommand_Metronome: call CheckUserIsCharging jr nz, .asm_3752a - ld a, [wKickCounter] + ld a, [wBattleAnimParam] push af call BattleCommand_LowerSub pop af - ld [wKickCounter], a + ld [wBattleAnimParam], a .asm_3752a call LoadMoveAnim diff --git a/engine/battle/move_effects/mirror_move.asm b/engine/battle/move_effects/mirror_move.asm index 98e8aacc..86259d11 100644 --- a/engine/battle/move_effects/mirror_move.asm +++ b/engine/battle/move_effects/mirror_move.asm @@ -40,11 +40,11 @@ BattleCommand_MirrorMove: call CheckUserIsCharging jr nz, .done - ld a, [wKickCounter] + ld a, [wBattleAnimParam] push af call BattleCommand_LowerSub pop af - ld [wKickCounter], a + ld [wBattleAnimParam], a .done call BattleCommand_MoveDelay diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm index 360a4172..33e172fb 100644 --- a/engine/battle/move_effects/present.asm +++ b/engine/battle/move_effects/present.asm @@ -26,7 +26,7 @@ BattleCommand_Present: .got_power ld a, c - ld [wPresentPower], a + ld [wBattleAnimParam], a call AnimateCurrentMoveEitherSide ld d, [hl] pop bc @@ -35,7 +35,7 @@ BattleCommand_Present: .heal_effect pop bc ld a, 3 - ld [wPresentPower], a + ld [wBattleAnimParam], a call AnimateCurrentMove call BattleCommand_SwitchTurn ld hl, AICheckPlayerMaxHP diff --git a/engine/battle/move_effects/selfdestruct.asm b/engine/battle/move_effects/selfdestruct.asm index b4967b03..61bf9665 100644 --- a/engine/battle/move_effects/selfdestruct.asm +++ b/engine/battle/move_effects/selfdestruct.asm @@ -11,7 +11,7 @@ BattleCommand_Selfdestruct: ld [hli], a ld [hl], a ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call BattleCommand_LowerSub call LoadMoveAnim ld a, BATTLE_VARS_SUBSTATUS4 diff --git a/engine/battle/move_effects/sleep_talk.asm b/engine/battle/move_effects/sleep_talk.asm index 92bff260..96522af2 100644 --- a/engine/battle/move_effects/sleep_talk.asm +++ b/engine/battle/move_effects/sleep_talk.asm @@ -52,11 +52,11 @@ BattleCommand_SleepTalk: ld [hl], a call CheckUserIsCharging jr nz, .charging - ld a, [wKickCounter] + ld a, [wBattleAnimParam] push af call BattleCommand_LowerSub pop af - ld [wKickCounter], a + ld [wBattleAnimParam], a .charging call LoadMoveAnim call UpdateMoveData diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index c5ab8741..fef082a9 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -64,7 +64,7 @@ BattleCommand_Substitute: xor a ld [wNumHits], a ld [wFXAnimID + 1], a - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, SUBSTITUTE call LoadAnim jr .finish diff --git a/engine/battle/move_effects/teleport.asm b/engine/battle/move_effects/teleport.asm index 7d866ccf..406eea51 100644 --- a/engine/battle/move_effects/teleport.asm +++ b/engine/battle/move_effects/teleport.asm @@ -75,7 +75,7 @@ BattleCommand_Teleport: inc a ld [wBattleResult], a ld a, 1 - ld [wKickCounter], a + ld [wBattleAnimParam], a call BattleCommand_LowerSub call LoadMoveAnim ld c, 20 diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm index 0247d8bb..8b3226f3 100644 --- a/engine/battle/move_effects/transform.asm +++ b/engine/battle/move_effects/transform.asm @@ -12,7 +12,7 @@ BattleCommand_Transform: ld [wNumHits], a ld [wFXAnimID + 1], a ld a, $1 - ld [wKickCounter], a + ld [wBattleAnimParam], a ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr bit SUBSTATUS_SUBSTITUTE, [hl] @@ -132,7 +132,7 @@ BattleCommand_Transform: ld [wNumHits], a ld [wFXAnimID + 1], a ld a, $2 - ld [wKickCounter], a + ld [wBattleAnimParam], a pop af ld a, SUBSTITUTE call nz, LoadAnim diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm index e41044c9..a192ddaa 100644 --- a/engine/battle/move_effects/triple_kick.asm +++ b/engine/battle/move_effects/triple_kick.asm @@ -1,7 +1,7 @@ BattleCommand_TripleKick: ; triplekick - ld a, [wKickCounter] + ld a, [wBattleAnimParam] ld b, a inc b ld hl, wCurDamage + 1 @@ -29,6 +29,6 @@ BattleCommand_TripleKick: BattleCommand_KickCounter: ; kickcounter - ld hl, wKickCounter + ld hl, wBattleAnimParam inc [hl] ret @@ -866,10 +866,9 @@ wPlayerDamageTaken:: dw wEnemyDamageTaken:: dw wBattleReward:: ds 3 -wBattleAnimParam:: -wKickCounter:: -wPresentPower:: - db + +wBattleAnimParam:: db + wBattleScriptBuffer:: ds 40 wBattleScriptBufferAddress:: dw |