summaryrefslogtreecommitdiff
path: root/battle/effect_commands.asm
diff options
context:
space:
mode:
Diffstat (limited to 'battle/effect_commands.asm')
-rw-r--r--battle/effect_commands.asm94
1 files changed, 47 insertions, 47 deletions
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm
index 506dc9746..e7d4878bc 100644
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -1,7 +1,7 @@
DoPlayerTurn: ; 34000
call SetPlayerTurn
- ld a, [wd0ec]
+ ld a, [wPlayerAction]
and a
ret nz
@@ -172,7 +172,7 @@ CheckPlayerTurn:
jr z, .woke_up
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_SLP
call FarPlayBattleAnimation
jr .fast_asleep
@@ -276,7 +276,7 @@ CheckPlayerTurn:
ld hl, IsConfusedText
call StdBattleTextBox
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_CONFUSED
call FarPlayBattleAnimation
@@ -305,7 +305,7 @@ CheckPlayerTurn:
ld hl, InLoveWithText
call StdBattleTextBox
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_IN_LOVE
call FarPlayBattleAnimation
@@ -420,7 +420,7 @@ CheckEnemyTurn: ; 3421f
ld hl, FastAsleepText
call StdBattleTextBox
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_SLP
call FarPlayBattleAnimation
jr .fast_asleep
@@ -521,7 +521,7 @@ CheckEnemyTurn: ; 3421f
call StdBattleTextBox
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_CONFUSED
call FarPlayBattleAnimation
@@ -542,7 +542,7 @@ CheckEnemyTurn: ; 3421f
call BattleCommand_DamageCalc
call BattleCommand_LowerSub
xor a
- ld [wcfca], a
+ ld [wNumHits], a
; Flicker the monster pic unless flying or underground.
ld de, ANIM_HIT_CONFUSION
@@ -567,7 +567,7 @@ CheckEnemyTurn: ; 3421f
ld hl, InLoveWithText
call StdBattleTextBox
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld de, ANIM_IN_LOVE
call FarPlayBattleAnimation
@@ -656,7 +656,7 @@ HitConfusion: ; 343a5
call BattleCommand_LowerSub
xor a
- ld [wcfca], a
+ ld [wNumHits], a
; Flicker the monster pic unless flying or underground.
ld de, ANIM_HIT_CONFUSION
@@ -912,7 +912,7 @@ BattleCommand_CheckObedience: ; 343db
ld a, 1
ld [AlreadyDisobeyed], a
- ld a, [wcfa3]
+ ld a, [w2DMenuNumRows]
ld b, a
; Save the move we originally picked for afterward.
@@ -2071,7 +2071,7 @@ BattleCommand_LowerSub: ; 34eee
jr c, .mimic_anims
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
inc a
ld [wKickCounter], a
@@ -2125,7 +2125,7 @@ BattleCommand_HitTargetNoSub: ; 34f60
ld a, BATTLEANIM_PLAYER_DAMAGE
.got_rollout_count
- ld [wcfca], a
+ ld [wNumHits], a
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
cp EFFECT_MULTI_HIT
@@ -2177,7 +2177,7 @@ BattleCommand_HitTargetNoSub: ; 34f60
pop af
jp z, PlayFXAnimID
xor a
- ld [wcfca], a
+ ld [wNumHits], a
jp PlayFXAnimID
; 34fd1
@@ -2208,7 +2208,7 @@ BattleCommand_StatDownAnim: ; 34fdb
BattleCommand_StatUpDownAnim: ; 34feb
- ld [wcfca], a
+ ld [wNumHits], a
xor a
ld [wKickCounter], a
ld a, BATTLE_VARS_MOVE_ANIM
@@ -2241,7 +2241,7 @@ BattleCommand_RaiseSub: ; 35004
jp c, BattleCommand_RaiseSubNoAnim
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $2
ld [wKickCounter], a
@@ -2599,7 +2599,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
call BattleCommand_SwitchTurn
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
inc a
ld [wKickCounter], a
@@ -5254,7 +5254,7 @@ BattleCommand_BurnTarget: ; 3608c
; burntarget
xor a
- ld [wcfca], a
+ ld [wNumHits], a
call CheckSubstituteOpp
ret nz
ld a, BATTLE_VARS_STATUS_OPP
@@ -5324,7 +5324,7 @@ BattleCommand_FreezeTarget: ; 36102
; freezetarget
xor a
- ld [wcfca], a
+ ld [wNumHits], a
call CheckSubstituteOpp
ret nz
ld a, BATTLE_VARS_STATUS_OPP
@@ -5379,7 +5379,7 @@ BattleCommand_ParalyzeTarget: ; 36165
; paralyzetarget
xor a
- ld [wcfca], a
+ ld [wNumHits], a
call CheckSubstituteOpp
ret nz
ld a, BATTLE_VARS_STATUS_OPP
@@ -5584,12 +5584,12 @@ CheckIfStatCanBeRaised: ; 361ef
StatUpAnimation: ; 36281
ld bc, wPlayerMinimized
- ld hl, Function3f447
+ ld hl, DropPlayerSub
ld a, [hBattleTurn]
and a
jr z, .do_player ; 0x3628a $6
ld bc, wEnemyMinimized
- ld hl, Function3f486
+ ld hl, DropEnemySub
.do_player
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -6174,11 +6174,11 @@ BattleCommand_RaiseSubNoAnim: ; 365af
BattleCommand_LowerSubNoAnim: ; 365c3
- ld hl, Function3f447
+ ld hl, DropPlayerSub
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn ; 365c9 $3
- ld hl, Function3f486
+ ld hl, DropEnemySub
.PlayerTurn
xor a
ld [hBGMapMode], a
@@ -6549,7 +6549,7 @@ BattleCommand_Teleport: ; 36778
.run_away
call UpdateBattleMonInParty
xor a
- ld [wcfca], a
+ ld [wNumHits], a
inc a
ld [wForcedSwitch], a
ld [wKickCounter], a
@@ -6617,7 +6617,7 @@ BattleCommand_ForceSwitch: ; 3680f
.wild_force_flee
call UpdateBattleMonInParty
xor a
- ld [wcfca], a
+ ld [wNumHits], a
inc a
ld [wForcedSwitch], a
call SetBattleDraw
@@ -6710,7 +6710,7 @@ BattleCommand_ForceSwitch: ; 3680f
.wild_succeed_playeristarget
call UpdateBattleMonInParty
xor a
- ld [wcfca], a
+ ld [wNumHits], a
inc a
ld [wForcedSwitch], a
call SetBattleDraw
@@ -7141,7 +7141,7 @@ BattleCommand_Charge: ; 36b4d
call BattleCommand_LowerSub
xor a
- ld [wcfca], a
+ ld [wNumHits], a
inc a
ld [wKickCounter], a
call LoadMoveAnim
@@ -7496,14 +7496,14 @@ endr
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
cp EFFECT_CONFUSE_HIT
- jr z, .asm_36d99
+ jr z, .got_effect
cp EFFECT_SNORE
- jr z, .asm_36d99
+ jr z, .got_effect
cp EFFECT_SWAGGER
- jr z, .asm_36d99
+ jr z, .got_effect
call AnimateCurrentMove
-.asm_36d99
+.got_effect
ld de, ANIM_CONFUSED
call PlayOpponentBattleAnim
@@ -7513,11 +7513,11 @@ endr
call GetOpponentItem
ld a, b
cp HELD_HEAL_STATUS
- jr z, .asm_36db0
+ jr z, .heal_confusion
cp HELD_HEAL_CONFUSION
ret nz
-.asm_36db0
- ld hl, HandleStatusHealingItem
+.heal_confusion
+ ld hl, UseConfusionHealingItem
jp CallBattleCore
; 36db6
@@ -7713,7 +7713,7 @@ endr
jr c, .mobile
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
ld [wKickCounter], a
ld a, SUBSTITUTE
@@ -8234,7 +8234,7 @@ BattleCommand_Transform: ; 371cd
call CheckHiddenOpponent
jp nz, Function372d2
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $1
ld [wKickCounter], a
@@ -8352,7 +8352,7 @@ endr
call BattleCommand_RaiseSubNoAnim
.after_anim
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $2
ld [wKickCounter], a
@@ -8546,7 +8546,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_SelfDestruct: ; 37380
callba MobileFn_10610d
ld a, BATTLEANIM_PLAYER_DAMAGE
- ld [wcfca], a
+ ld [wNumHits], a
ld c, 3
call DelayFrames
ld a, BATTLE_VARS_STATUS
@@ -9025,7 +9025,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
ret z
ld a, 1
- ld [wd0ec], a
+ ld [wPlayerAction], a
call LoadStandardMenuDataHeader
ld hl, LinkBattleSendReceiveAction
@@ -9033,7 +9033,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
call WriteBackup
xor a
- ld [wd0ec], a
+ ld [wPlayerAction], a
ret
; 37a82
@@ -9239,13 +9239,13 @@ BattleCommand_ClearHazards: ; 37b39
BattleCommand_HealMorn: ; 37b74
; healmorn
ld b, MORN
- jr BattleCommand_HealMorn6c
+ jr BattleCommand_TimeBasedHealContinue
; 37b78
BattleCommand_HealDay: ; 37b78
; healday
ld b, DAY
- jr BattleCommand_HealMorn6c
+ jr BattleCommand_TimeBasedHealContinue
; 37b7c
BattleCommand_HealNite: ; 37b7c
@@ -9254,7 +9254,7 @@ BattleCommand_HealNite: ; 37b7c
; fallthrough
; 37b7e
-BattleCommand_HealMorn6c: ; 37b7e
+BattleCommand_TimeBasedHealContinue: ; 37b7e
; Time- and weather-sensitive heal.
ld hl, BattleMonMaxHP
@@ -9284,7 +9284,7 @@ BattleCommand_HealMorn6c: ; 37b7e
ld a, [TimeOfDay]
cp b
jr z, .Weather
- dec c
+ dec c ; double
.Weather
ld a, [Weather]
@@ -9773,7 +9773,7 @@ PlayDamageAnim: ; 37e19
ld a, BATTLEANIM_PLAYER_DAMAGE
.player
- ld [wcfca], a
+ ld [wNumHits], a
jp PlayUserBattleAnim
; 37e36
@@ -9781,7 +9781,7 @@ PlayDamageAnim: ; 37e19
LoadMoveAnim: ; 37e36
xor a
- ld [wcfca], a
+ ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, BATTLE_VARS_MOVE_ANIM
@@ -9819,7 +9819,7 @@ PlayOpponentBattleAnim: ; 37e54
ld a, d
ld [FXAnimIDHi], a
xor a
- ld [wcfca], a
+ ld [wNumHits], a
push hl
push de