summaryrefslogtreecommitdiff
path: root/battle/effects
diff options
context:
space:
mode:
Diffstat (limited to 'battle/effects')
-rw-r--r--battle/effects/curse.asm6
-rw-r--r--battle/effects/endure.asm2
-rw-r--r--battle/effects/foresight.asm2
-rw-r--r--battle/effects/metronome.asm2
-rw-r--r--battle/effects/mirror_move.asm4
-rw-r--r--battle/effects/nightmare.asm4
-rw-r--r--battle/effects/protect.asm2
-rw-r--r--battle/effects/rollout.asm30
8 files changed, 27 insertions, 25 deletions
diff --git a/battle/effects/curse.asm b/battle/effects/curse.asm
index fc08beae6..27f821ffc 100644
--- a/battle/effects/curse.asm
+++ b/battle/effects/curse.asm
@@ -66,11 +66,11 @@ BattleCommand54: ; 37588
jr nz, .failed
ld a, BATTLE_VARS_SUBSTATUS1_OPP
- call _GetBattleVar
- bit 1, [hl]
+ call GetBattleVarAddr
+ bit SUBSTATUS_CURSE, [hl]
jr nz, .failed
- set 1, [hl]
+ set SUBSTATUS_CURSE, [hl]
call AnimateCurrentMove
ld hl, GetHalfMaxHP
call CallBattleCore
diff --git a/battle/effects/endure.asm b/battle/effects/endure.asm
index f449dcebd..9d99c8236 100644
--- a/battle/effects/endure.asm
+++ b/battle/effects/endure.asm
@@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
ret c
ld a, BATTLE_VARS_SUBSTATUS1
- call _GetBattleVar
+ call GetBattleVarAddr
set SUBSTATUS_ENDURE, [hl]
call AnimateCurrentMove
diff --git a/battle/effects/foresight.asm b/battle/effects/foresight.asm
index 7a8f33493..84c10670b 100644
--- a/battle/effects/foresight.asm
+++ b/battle/effects/foresight.asm
@@ -9,7 +9,7 @@ BattleCommand57: ; 376a0
jr nz, .failed
ld a, BATTLE_VARS_SUBSTATUS1_OPP
- call _GetBattleVar
+ call GetBattleVarAddr
bit SUBSTATUS_IDENTIFIED, [hl]
jr nz, .failed
diff --git a/battle/effects/metronome.asm b/battle/effects/metronome.asm
index 3762ec372..97052a66c 100644
--- a/battle/effects/metronome.asm
+++ b/battle/effects/metronome.asm
@@ -36,7 +36,7 @@ BattleCommand34: ; 37418
ld a, BATTLE_VARS_MOVE
- call _GetBattleVar
+ call GetBattleVarAddr
ld [hl], b
call UpdateMoveData
jp ResetTurn
diff --git a/battle/effects/mirror_move.asm b/battle/effects/mirror_move.asm
index 60748bdae..a9dfa7931 100644
--- a/battle/effects/mirror_move.asm
+++ b/battle/effects/mirror_move.asm
@@ -4,7 +4,7 @@ BattleCommand1b: ; 373c9
call Function372d8
ld a, BATTLE_VARS_MOVE
- call _GetBattleVar
+ call GetBattleVarAddr
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
call GetBattleVar
@@ -28,7 +28,7 @@ BattleCommand1b: ; 373c9
push af
ld a, BATTLE_VARS_MOVE_ANIM
- call _GetBattleVar
+ call GetBattleVarAddr
ld d, h
ld e, l
pop af
diff --git a/battle/effects/nightmare.asm b/battle/effects/nightmare.asm
index cd3210cab..01f17ff71 100644
--- a/battle/effects/nightmare.asm
+++ b/battle/effects/nightmare.asm
@@ -14,14 +14,14 @@ BattleCommand52: ; 37536
; Only works on a sleeping opponent.
ld a, BATTLE_VARS_STATUS_OPP
- call _GetBattleVar
+ call GetBattleVarAddr
and SLP
jr z, .failed
; Bail if the opponent is already having a nightmare.
ld a, BATTLE_VARS_SUBSTATUS1_OPP
- call _GetBattleVar
+ call GetBattleVarAddr
bit SUBSTATUS_NIGHTMARE, [hl]
jr nz, .failed
diff --git a/battle/effects/protect.asm b/battle/effects/protect.asm
index a28c0461e..be9284135 100644
--- a/battle/effects/protect.asm
+++ b/battle/effects/protect.asm
@@ -4,7 +4,7 @@ BattleCommand55: ; 37618
ret c
ld a, BATTLE_VARS_SUBSTATUS1
- call _GetBattleVar
+ call GetBattleVarAddr
set SUBSTATUS_PROTECT, [hl]
call AnimateCurrentMove
diff --git a/battle/effects/rollout.asm b/battle/effects/rollout.asm
index 13c91a8d9..d3a765de5 100644
--- a/battle/effects/rollout.asm
+++ b/battle/effects/rollout.asm
@@ -1,22 +1,24 @@
+MAX_ROLLOUT_COUNT EQU 5
+
+
BattleCommand5b: ; 37718
; checkcurl
ld de, PlayerRolloutCount
ld a, [hBattleTurn]
and a
- jr z, .asm_37723
+ jr z, .ok
ld de, EnemyRolloutCount
-
-.asm_37723
+.ok
ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVar
- bit SUBSTATUS_ENCORED, a
- jr z, .asm_37731
+ bit SUBSTATUS_ROLLOUT, a
+ jr z, .reset
ld b, $4 ; doturn
jp SkipToBattleCommand
-.asm_37731
+.reset
xor a
ld [de], a
ret
@@ -28,7 +30,7 @@ BattleCommand5c: ; 37734
ld a, BATTLE_VARS_STATUS
call GetBattleVar
- and 7
+ and SLP
ret nz
ld hl, PlayerRolloutCount
@@ -50,7 +52,7 @@ BattleCommand5c: ; 37734
jr z, .hit
ld a, BATTLE_VARS_SUBSTATUS1
- call _GetBattleVar
+ call GetBattleVarAddr
res 6, [hl]
ret
@@ -58,23 +60,23 @@ BattleCommand5c: ; 37734
inc [hl]
ld a, [hl]
ld b, a
- cp $5
+ cp MAX_ROLLOUT_COUNT
jr c, .asm_3776e
ld a, BATTLE_VARS_SUBSTATUS1
- call _GetBattleVar
- res 6, [hl]
+ call GetBattleVarAddr
+ res SUBSTATUS_ROLLOUT, [hl]
jr .asm_37775
.asm_3776e
ld a, BATTLE_VARS_SUBSTATUS1
- call _GetBattleVar
- set 6, [hl]
+ call GetBattleVarAddr
+ set SUBSTATUS_ROLLOUT, [hl]
.asm_37775
ld a, BATTLE_VARS_SUBSTATUS2
call GetBattleVar
- bit 0, a
+ bit SUBSTATUS_CURLED, a
jr z, .asm_3777f
inc b
.asm_3777f