summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/common_text.asm2
-rwxr-xr-xengine/battle/core.asm40
-rwxr-xr-xengine/battle/end_of_battle.asm2
-rw-r--r--engine/battle/moveEffects/leech_seed_effect.asm8
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm2
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm2
6 files changed, 28 insertions, 28 deletions
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index 0cbf70f0..687fbf99 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -23,7 +23,7 @@ PrintBeginningBattleText: ; f4000 (3d:4000)
call PlayCry
.continue
ld hl, WildMonAppearedText
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .notFishing
ld hl, HookedMonAttackedText
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index f54e7000..5663b8b4 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3135,7 +3135,7 @@ ExecutePlayerMove: ; 3d65e (f:565e)
inc a
jp z, ExecutePlayerMoveDone ; for selected move = FF, skip most of player's turn
xor a
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld [wMonIsDisobedient], a
ld [wMoveDidntMiss], a
ld a, $a
@@ -3206,7 +3206,7 @@ PlayerCalcMoveDamage: ; 3d6dc (f:56dc)
.moveHitTest
call MoveHitTest
handleIfPlayerMoveMissed
- ld a,[W_MOVEMISSED]
+ ld a,[wMoveMissed]
and a
jr z,getPlayerAnimationType
ld a,[W_PLAYERMOVEEFFECT]
@@ -3272,7 +3272,7 @@ MirrorMoveCheck
ld de,1
call IsInArray
jp c,JumpMoveEffect ; done here after executing effects of ResidualEffects2
- ld a,[W_MOVEMISSED]
+ ld a,[wMoveMissed]
and a
jr z,.moveDidNotMiss
call PrintMoveFailureText
@@ -3575,7 +3575,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
or b
jr nz,.next
ld a,1
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
.next
xor a
ld [hli],a
@@ -4661,7 +4661,7 @@ CalculateDamage: ; 3df65 (f:5f65)
JumpToOHKOMoveEffect: ; 3e016 (f:6016)
call JumpMoveEffect
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
dec a
ret
@@ -4775,7 +4775,7 @@ HandleCounterMove: ; 3e093 (f:6093)
cp a,COUNTER
ret nz ; return if not using Counter
ld a,$01
- ld [W_MOVEMISSED],a ; initialize the move missed variable to true (it is set to false below if the move hits)
+ ld [wMoveMissed],a ; initialize the move missed variable to true (it is set to false below if the move hits)
ld a,[hl]
cp a,COUNTER
ret z ; miss if the opponent's last selected move is Counter.
@@ -4813,7 +4813,7 @@ HandleCounterMove: ; 3e093 (f:6093)
ld [hl],a
.noCarry
xor a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
call MoveHitTest ; do the normal move hit test in addition to Counter's special rules
xor a
ret
@@ -5382,7 +5382,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
; if damage is 0, make the move miss
; this only occurs if a move that would do 2 or 3 damage is 0.25x effective against the target
inc a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
.skipTypeImmunity
pop bc
pop hl
@@ -5540,7 +5540,7 @@ MoveHitTest: ; 3e56b (f:656b)
ld [hli],a
ld [hl],a
inc a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
ld a,[H_WHOSETURN]
and a
jr z,.playerTurn2
@@ -5682,7 +5682,7 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc)
ld hl, wAILayer2Encouragement
inc [hl]
xor a
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld [wMoveDidntMiss], a
ld a, $a
ld [wDamageMultipliers], a
@@ -5750,7 +5750,7 @@ EnemyCalcMoveDamage: ; 3e750 (f:6750)
EnemyMoveHitTest: ; 3e77f (f:677f)
call MoveHitTest
handleIfEnemyMoveMissed: ; 3e782 (f:6782)
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .asm_3e791
ld a, [W_ENEMYMOVEEFFECT]
@@ -5823,7 +5823,7 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
ld de, $1
call IsInArray
jp c, JumpMoveEffect
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .asm_3e82b
call PrintMoveFailureText
@@ -6101,7 +6101,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
or b
jr nz, .next
ld a, $1
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
.next
xor a
ld [hli], a
@@ -6821,7 +6821,7 @@ HandleExplodingAnimation: ; 3eed3 (f:6ed3)
ld a, [hl]
cp GHOST
ret z
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
ret nz
ld a, 5
@@ -6979,7 +6979,7 @@ SleepEffect: ; 3f1fc (f:71fc)
push de
call MoveHitTest ; apply accuracy tests
pop de
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
.setSleepCounter
@@ -7035,7 +7035,7 @@ PoisonEffect: ; 3f24f (f:724f)
call MoveHitTest ; apply accuracy tests
pop de
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
jr .inflictPoison
@@ -7493,7 +7493,7 @@ StatModifierDownEffect: ; 3f54c (f:754c)
pop bc
pop de
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jp nz, MoveMissed
ld a, [bc]
@@ -8060,7 +8060,7 @@ ConfusionEffect: ; 3f961 (f:7961)
call CheckTargetSubstitute
jr nz, ConfusionEffectFailed
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, ConfusionEffectFailed
@@ -8143,7 +8143,7 @@ MimicEffect: ; 3f9ed (f:79ed)
ld c, 50
call DelayFrames
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .asm_3fa74
ld a, [H_WHOSETURN]
@@ -8224,7 +8224,7 @@ SplashEffect: ; 3fa84 (f:7a84)
DisableEffect: ; 3fa8a (f:7a8a)
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .moveMissed
ld de, W_ENEMYDISABLEDMOVE
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index 5782b274..5760889b 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -53,7 +53,7 @@ EndOfBattle: ; 13765 (4:7765)
ld [wChannelSoundIDs + CH4], a
ld [wIsInBattle], a
ld [W_BATTLETYPE], a
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld [wCurOpponent], a
ld [wForcePlayerToChooseMon], a
ld [wNumRunAttempts], a
diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm
index 769e9ed9..ef649ff6 100644
--- a/engine/battle/moveEffects/leech_seed_effect.asm
+++ b/engine/battle/moveEffects/leech_seed_effect.asm
@@ -1,6 +1,6 @@
-LeechSeedEffect_: ; 2bea9 (a:7ea9)
+LeechSeedEffect_: ; 2bdba (a:7dba)
callab MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .moveMissed
ld hl, wEnemyBattleStatus2
@@ -31,10 +31,10 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9)
ld hl, EvadedAttackText
jp PrintText
-WasSeededText: ; 2bef2 (a:7ef2)
+WasSeededText: ; 2be03 (a:7e03)
TX_FAR _WasSeededText
db "@"
-EvadedAttackText: ; 2bef7 (a:7ef7)
+EvadedAttackText: ; 2be08 (a:7e08)
TX_FAR _EvadedAttackText
db "@"
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index 12f70b90..28973356 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -34,5 +34,5 @@ OneHitKOEffect_: ; f64db (3d:64db)
.userIsSlower
; keep damage at 0 and set move missed flag if target's current speed is higher instead
ld a, $1
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ret
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
index 3e0cf062..9b364425 100644
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ b/engine/battle/moveEffects/paralyze_effect.asm
@@ -28,7 +28,7 @@ ParalyzeEffect_: ; f6562 (3d:6562)
push hl
callab MoveHitTest
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
set PAR, [hl]