summaryrefslogtreecommitdiff
path: root/engine/battle/effect_commands
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/effect_commands')
-rwxr-xr-xengine/battle/effect_commands/attract.asm24
-rw-r--r--engine/battle/effect_commands/curse.asm8
-rw-r--r--engine/battle/effect_commands/foresight.asm2
-rw-r--r--engine/battle/effect_commands/perish_song.asm8
-rwxr-xr-xengine/battle/effect_commands/present.asm2
-rw-r--r--engine/battle/effect_commands/protect.asm4
-rw-r--r--engine/battle/effect_commands/rollout.asm12
-rw-r--r--engine/battle/effect_commands/sandstorm.asm2
-rw-r--r--engine/battle/effect_commands/spikes.asm4
-rw-r--r--engine/battle/effect_commands/thief.asm8
-rwxr-xr-xengine/battle/effect_commands/transform.asm30
11 files changed, 52 insertions, 52 deletions
diff --git a/engine/battle/effect_commands/attract.asm b/engine/battle/effect_commands/attract.asm
index 0a6d7c975..da6a9c0e9 100755
--- a/engine/battle/effect_commands/attract.asm
+++ b/engine/battle/effect_commands/attract.asm
@@ -1,6 +1,6 @@
BattleCommand_Attract: ; 377ce
; attract
- ld a, [AttackMissed]
+ ld a, [wAttackMissed]
and a
jr nz, .failed
call CheckOppositeGender
@@ -28,12 +28,12 @@ CheckOppositeGender: ; 377f5
ld a, MON_SPECIES
call BattlePartyAttr
ld a, [hl]
- ld [CurPartySpecies], a
+ ld [wCurPartySpecies], a
- ld a, [CurBattleMon]
- ld [CurPartyMon], a
+ ld a, [wCurBattleMon]
+ ld [wCurPartyMon], a
xor a
- ld [MonType], a
+ ld [wMonType], a
farcall GetGender
jr c, .genderless_samegender
@@ -44,20 +44,20 @@ CheckOppositeGender: ; 377f5
.got_gender
push bc
- ld a, [TempEnemyMonSpecies]
- ld [CurPartySpecies], a
- ld hl, EnemyMonDVs
- ld a, [EnemySubStatus5]
+ ld a, [wTempEnemyMonSpecies]
+ ld [wCurPartySpecies], a
+ ld hl, wEnemyMonDVs
+ ld a, [wEnemySubStatus5]
bit SUBSTATUS_TRANSFORMED, a
jr z, .not_transformed
ld hl, wEnemyBackupDVs
.not_transformed
ld a, [hli]
- ld [TempMonDVs], a
+ ld [wTempMonDVs], a
ld a, [hl]
- ld [TempMonDVs + 1], a
+ ld [wTempMonDVs + 1], a
ld a, 3
- ld [MonType], a
+ ld [wMonType], a
farcall GetGender
pop bc
jr c, .genderless_samegender
diff --git a/engine/battle/effect_commands/curse.asm b/engine/battle/effect_commands/curse.asm
index dceb3b8d5..b11b9f3fb 100644
--- a/engine/battle/effect_commands/curse.asm
+++ b/engine/battle/effect_commands/curse.asm
@@ -1,13 +1,13 @@
BattleCommand_Curse: ; 37588
; curse
- ld de, BattleMonType1
- ld bc, PlayerStatLevels
+ ld de, wBattleMonType1
+ ld bc, wPlayerStatLevels
ld a, [hBattleTurn]
and a
jr z, .go
- ld de, EnemyMonType1
- ld bc, EnemyStatLevels
+ ld de, wEnemyMonType1
+ ld bc, wEnemyStatLevels
.go
diff --git a/engine/battle/effect_commands/foresight.asm b/engine/battle/effect_commands/foresight.asm
index 6f4f97cd2..006e3b3d7 100644
--- a/engine/battle/effect_commands/foresight.asm
+++ b/engine/battle/effect_commands/foresight.asm
@@ -1,7 +1,7 @@
BattleCommand_Foresight: ; 376a0
; foresight
- ld a, [AttackMissed]
+ ld a, [wAttackMissed]
and a
jr nz, .failed
diff --git a/engine/battle/effect_commands/perish_song.asm b/engine/battle/effect_commands/perish_song.asm
index ac491ef6b..8c88c8739 100644
--- a/engine/battle/effect_commands/perish_song.asm
+++ b/engine/battle/effect_commands/perish_song.asm
@@ -2,8 +2,8 @@ BattleCommand_PerishSong: ; 376c2
; perishsong
- ld hl, PlayerSubStatus1
- ld de, EnemySubStatus1
+ ld hl, wPlayerSubStatus1
+ ld de, wEnemySubStatus1
bit SUBSTATUS_PERISH, [hl]
jr z, .ok
@@ -17,7 +17,7 @@ BattleCommand_PerishSong: ; 376c2
set SUBSTATUS_PERISH, [hl]
ld a, 4
- ld [PlayerPerishCount], a
+ ld [wPlayerPerishCount], a
.enemy
ld a, [de]
@@ -27,7 +27,7 @@ BattleCommand_PerishSong: ; 376c2
set SUBSTATUS_PERISH, a
ld [de], a
ld a, 4
- ld [EnemyPerishCount], a
+ ld [wEnemyPerishCount], a
.done
call AnimateCurrentMove
diff --git a/engine/battle/effect_commands/present.asm b/engine/battle/effect_commands/present.asm
index 2b358e8b9..f0cf8006d 100755
--- a/engine/battle/effect_commands/present.asm
+++ b/engine/battle/effect_commands/present.asm
@@ -20,7 +20,7 @@ BattleCommand_Present: ; 37874
ld a, [wTypeMatchup]
and a
jp z, AnimateFailedMove
- ld a, [AttackMissed]
+ ld a, [wAttackMissed]
and a
jp nz, AnimateFailedMove
diff --git a/engine/battle/effect_commands/protect.asm b/engine/battle/effect_commands/protect.asm
index 568ac00f8..6c65e0ed1 100644
--- a/engine/battle/effect_commands/protect.asm
+++ b/engine/battle/effect_commands/protect.asm
@@ -16,11 +16,11 @@ BattleCommand_Protect: ; 37618
ProtectChance: ; 3762c
- ld de, PlayerProtectCount
+ ld de, wPlayerProtectCount
ld a, [hBattleTurn]
and a
jr z, .asm_37637
- ld de, EnemyProtectCount
+ ld de, wEnemyProtectCount
.asm_37637
call CheckOpponentWentFirst
diff --git a/engine/battle/effect_commands/rollout.asm b/engine/battle/effect_commands/rollout.asm
index 4ce9ab3d8..f6966c48a 100644
--- a/engine/battle/effect_commands/rollout.asm
+++ b/engine/battle/effect_commands/rollout.asm
@@ -4,11 +4,11 @@ MAX_ROLLOUT_COUNT EQU 5
BattleCommand_CheckCurl: ; 37718
; checkcurl
- ld de, PlayerRolloutCount
+ ld de, wPlayerRolloutCount
ld a, [hBattleTurn]
and a
jr z, .ok
- ld de, EnemyRolloutCount
+ ld de, wEnemyRolloutCount
.ok
ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVar
@@ -33,11 +33,11 @@ BattleCommand_RolloutPower: ; 37734
and SLP
ret nz
- ld hl, PlayerRolloutCount
+ ld hl, wPlayerRolloutCount
ld a, [hBattleTurn]
and a
jr z, .got_rollout_count
- ld hl, EnemyRolloutCount
+ ld hl, wEnemyRolloutCount
.got_rollout_count
ld a, [hl]
@@ -47,7 +47,7 @@ BattleCommand_RolloutPower: ; 37734
ld [wSomeoneIsRampaging], a
.skip_set_rampage
- ld a, [AttackMissed]
+ ld a, [wAttackMissed]
and a
jr z, .hit
@@ -84,7 +84,7 @@ BattleCommand_RolloutPower: ; 37734
dec b
jr z, .done_damage
- ld hl, CurDamage + 1
+ ld hl, wCurDamage + 1
sla [hl]
dec hl
rl [hl]
diff --git a/engine/battle/effect_commands/sandstorm.asm b/engine/battle/effect_commands/sandstorm.asm
index 7bd653420..5aaa61deb 100644
--- a/engine/battle/effect_commands/sandstorm.asm
+++ b/engine/battle/effect_commands/sandstorm.asm
@@ -8,7 +8,7 @@ BattleCommand_StartSandstorm: ; 376f8
ld a, WEATHER_SANDSTORM
ld [wBattleWeather], a
ld a, 5
- ld [WeatherCount], a
+ ld [wWeatherCount], a
call AnimateCurrentMove
ld hl, SandstormBrewedText
jp StdBattleTextBox
diff --git a/engine/battle/effect_commands/spikes.asm b/engine/battle/effect_commands/spikes.asm
index 3d15e4cfd..a5e22a706 100644
--- a/engine/battle/effect_commands/spikes.asm
+++ b/engine/battle/effect_commands/spikes.asm
@@ -1,11 +1,11 @@
BattleCommand_Spikes: ; 37683
; spikes
- ld hl, EnemyScreens
+ ld hl, wEnemyScreens
ld a, [hBattleTurn]
and a
jr z, .asm_3768e
- ld hl, PlayerScreens
+ ld hl, wPlayerScreens
.asm_3768e
; Fails if spikes are already down!
diff --git a/engine/battle/effect_commands/thief.asm b/engine/battle/effect_commands/thief.asm
index 6d32d68d4..5397c2bdf 100644
--- a/engine/battle/effect_commands/thief.asm
+++ b/engine/battle/effect_commands/thief.asm
@@ -26,7 +26,7 @@ BattleCommand_Thief: ; 37492
farcall ItemIsMail
ret c
- ld a, [EffectFailed]
+ ld a, [wEffectFailed]
and a
ret nz
@@ -74,7 +74,7 @@ BattleCommand_Thief: ; 37492
farcall ItemIsMail
ret c
- ld a, [EffectFailed]
+ ld a, [wEffectFailed]
and a
ret nz
@@ -103,7 +103,7 @@ BattleCommand_Thief: ; 37492
call BattlePartyAttr
ld d, h
ld e, l
- ld hl, BattleMonItem
+ ld hl, wBattleMonItem
ret
.enemyitem
@@ -111,6 +111,6 @@ BattleCommand_Thief: ; 37492
call OTPartyAttr
ld d, h
ld e, l
- ld hl, EnemyMonItem
+ ld hl, wEnemyMonItem
ret
; 37517
diff --git a/engine/battle/effect_commands/transform.asm b/engine/battle/effect_commands/transform.asm
index 65c3f3e60..5ae7c1511 100755
--- a/engine/battle/effect_commands/transform.asm
+++ b/engine/battle/effect_commands/transform.asm
@@ -11,7 +11,7 @@ BattleCommand_Transform: ; 371cd
jp nz, BattleEffect_ButItFailed
xor a
ld [wNumHits], a
- ld [FXAnimID + 1], a
+ ld [wFXAnimID + 1], a
ld a, $1
ld [wKickCounter], a
ld a, BATTLE_VARS_SUBSTATUS4
@@ -28,15 +28,15 @@ BattleCommand_Transform: ; 371cd
call GetBattleVarAddr
set SUBSTATUS_TRANSFORMED, [hl]
call ResetActorDisable
- ld hl, BattleMonSpecies
- ld de, EnemyMonSpecies
+ ld hl, wBattleMonSpecies
+ ld de, wEnemyMonSpecies
ld a, [hBattleTurn]
and a
jr nz, .got_mon_species
- ld hl, EnemyMonSpecies
- ld de, BattleMonSpecies
+ ld hl, wEnemyMonSpecies
+ ld de, wBattleMonSpecies
xor a
- ld [CurMoveNum], a
+ ld [wCurMoveNum], a
.got_mon_species
push hl
ld a, [hli]
@@ -64,7 +64,7 @@ BattleCommand_Transform: ; 371cd
ld [de], a
inc de
; move pointer to stats
- ld bc, BattleMonStats - BattleMonPP
+ ld bc, wBattleMonStats - wBattleMonPP
add hl, bc
push hl
ld h, d
@@ -73,16 +73,16 @@ BattleCommand_Transform: ; 371cd
ld d, h
ld e, l
pop hl
- ld bc, BattleMonStructEnd - BattleMonStats
+ ld bc, wBattleMonStructEnd - wBattleMonStats
call CopyBytes
; init the power points
- ld bc, BattleMonMoves - BattleMonStructEnd
+ ld bc, wBattleMonMoves - wBattleMonStructEnd
add hl, bc
push de
ld d, h
ld e, l
pop hl
- ld bc, BattleMonPP - BattleMonStructEnd
+ ld bc, wBattleMonPP - wBattleMonStructEnd
add hl, bc
ld b, NUM_MOVES
.pp_loop
@@ -102,12 +102,12 @@ BattleCommand_Transform: ; 371cd
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
- ld hl, EnemyStats
- ld de, PlayerStats
+ ld hl, wEnemyStats
+ ld de, wPlayerStats
ld bc, 2 * 5
call BattleSideCopy
- ld hl, EnemyStatLevels
- ld de, PlayerStatLevels
+ ld hl, wEnemyStatLevels
+ ld de, wPlayerStatLevels
ld bc, 8
call BattleSideCopy
call _CheckBattleScene
@@ -129,7 +129,7 @@ BattleCommand_Transform: ; 371cd
.after_anim
xor a
ld [wNumHits], a
- ld [FXAnimID + 1], a
+ ld [wFXAnimID + 1], a
ld a, $2
ld [wKickCounter], a
pop af