mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Rename _GetBattleVar -> GetBattleVarAddr.
Functions prefixed with _ imply they're private. The real purpose of this function is to use an address, rather than saving a few cycles on push/pop.
This commit is contained in:
parent
e23f341258
commit
b83f237254
@ -397,11 +397,11 @@ Function3c27c: ; 3c27c
|
|||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
push af
|
push af
|
||||||
set SUBSTATUS_CONFUSED, [hl]
|
set SUBSTATUS_CONFUSED, [hl]
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
push hl
|
push hl
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@ -1033,18 +1033,18 @@ Function3c6de: ; 3c6de
|
|||||||
|
|
||||||
Function3c6ed: ; 3c6ed
|
Function3c6ed: ; 3c6ed
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_PROTECT, [hl]
|
res SUBSTATUS_PROTECT, [hl]
|
||||||
res SUBSTATUS_ENDURE, [hl]
|
res SUBSTATUS_ENDURE, [hl]
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_DESTINY_BOND, [hl]
|
res SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
ret
|
ret
|
||||||
; 3c6fe
|
; 3c6fe
|
||||||
|
|
||||||
Function3c6fe: ; 3c6fe
|
Function3c6fe: ; 3c6fe
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_DESTINY_BOND, [hl]
|
res SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
ret
|
ret
|
||||||
; 3c706
|
; 3c706
|
||||||
@ -1121,7 +1121,7 @@ Function3c716: ; 3c716
|
|||||||
jp z, .asm_3c7f7
|
jp z, .asm_3c7f7
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_LEECH_SEED, [hl]
|
bit SUBSTATUS_LEECH_SEED, [hl]
|
||||||
jr z, .asm_3c7a1
|
jr z, .asm_3c7a1
|
||||||
|
|
||||||
@ -1148,7 +1148,7 @@ Function3c716: ; 3c716
|
|||||||
jr z, .asm_3c7f7
|
jr z, .asm_3c7f7
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_NIGHTMARE, [hl]
|
bit SUBSTATUS_NIGHTMARE, [hl]
|
||||||
jr z, .asm_3c7c5
|
jr z, .asm_3c7c5
|
||||||
|
|
||||||
@ -1166,7 +1166,7 @@ Function3c716: ; 3c716
|
|||||||
jr z, .asm_3c7f7
|
jr z, .asm_3c7f7
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_CURSE, [hl]
|
bit SUBSTATUS_CURSE, [hl]
|
||||||
jr z, .asm_3c7e9
|
jr z, .asm_3c7e9
|
||||||
|
|
||||||
@ -1233,7 +1233,7 @@ Function3c801: ; 3c801
|
|||||||
pop af
|
pop af
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_PERISH, [hl]
|
res SUBSTATUS_PERISH, [hl]
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
@ -1556,7 +1556,7 @@ Function3ca26: ; 3ca26
|
|||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
push af
|
push af
|
||||||
ld a, FUTURE_SIGHT
|
ld a, FUTURE_SIGHT
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -1573,7 +1573,7 @@ Function3ca26: ; 3ca26
|
|||||||
ld [CurDamage + 1], a
|
ld [CurDamage + 1], a
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
@ -4350,7 +4350,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
@ -4570,7 +4570,7 @@ Function3dde9: ; 3dde9
|
|||||||
dec hl
|
dec hl
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and b
|
and b
|
||||||
ret z
|
ret z
|
||||||
xor a
|
xor a
|
||||||
@ -4579,18 +4579,18 @@ Function3dde9: ; 3dde9
|
|||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
pop bc
|
pop bc
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and [hl]
|
and [hl]
|
||||||
res SUBSTATUS_TOXIC, [hl]
|
res SUBSTATUS_TOXIC, [hl]
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and [hl]
|
and [hl]
|
||||||
res SUBSTATUS_NIGHTMARE, [hl]
|
res SUBSTATUS_NIGHTMARE, [hl]
|
||||||
ld a, b
|
ld a, b
|
||||||
cp $7f
|
cp $7f
|
||||||
jr nz, .asm_3de26
|
jr nz, .asm_3de26
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_CONFUSED, [hl]
|
res SUBSTATUS_CONFUSED, [hl]
|
||||||
|
|
||||||
.asm_3de26
|
.asm_3de26
|
||||||
@ -4639,7 +4639,7 @@ Function3de51: ; 3de51
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_CONFUSED, [hl]
|
res SUBSTATUS_CONFUSED, [hl]
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call Function3ddc8
|
call Function3ddc8
|
||||||
|
@ -355,11 +355,11 @@ CheckPlayerTurn:
|
|||||||
|
|
||||||
CantMove: ; 341f0
|
CantMove: ; 341f0
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_ENCORED, [hl]
|
res SUBSTATUS_ENCORED, [hl]
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $ff ^ (1<<SUBSTATUS_BIDE + 1<<SUBSTATUS_ROLLOUT + 1<<SUBSTATUS_CHARGED)
|
and $ff ^ (1<<SUBSTATUS_BIDE + 1<<SUBSTATUS_ROLLOUT + 1<<SUBSTATUS_CHARGED)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -628,7 +628,7 @@ MoveDisabled: ; 3438d
|
|||||||
|
|
||||||
; Make sure any charged moves fail
|
; Make sure any charged moves fail
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_CHARGED, [hl]
|
res SUBSTATUS_CHARGED, [hl]
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
@ -1366,7 +1366,7 @@ BattleCommand07: ; 346d2
|
|||||||
|
|
||||||
.go
|
.go
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@ -2442,7 +2442,7 @@ BattleCommand09: ; 34d32
|
|||||||
; Return nz if we are locked-on and aren't trying to use Earthquake,
|
; Return nz if we are locked-on and aren't trying to use Earthquake,
|
||||||
; Fissure or Magnitude on a monster that is flying.
|
; Fissure or Magnitude on a monster that is flying.
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_LOCK_ON, [hl]
|
bit SUBSTATUS_LOCK_ON, [hl]
|
||||||
res SUBSTATUS_LOCK_ON, [hl]
|
res SUBSTATUS_LOCK_ON, [hl]
|
||||||
ret z
|
ret z
|
||||||
@ -2894,7 +2894,7 @@ BattleCommand0d: ; 35023
|
|||||||
|
|
||||||
call Function350e4
|
call Function350e4
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
|
|
||||||
cp FLY
|
cp FLY
|
||||||
jr z, .asm_3504f ; 35032 $1b
|
jr z, .asm_3504f ; 35032 $1b
|
||||||
@ -2919,7 +2919,7 @@ BattleCommand0d: ; 35023
|
|||||||
|
|
||||||
.asm_3504f
|
.asm_3504f
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_UNDERGROUND, [hl]
|
res SUBSTATUS_UNDERGROUND, [hl]
|
||||||
res SUBSTATUS_FLYING, [hl]
|
res SUBSTATUS_FLYING, [hl]
|
||||||
call Function37ece
|
call Function37ece
|
||||||
@ -3152,7 +3152,7 @@ BattleCommandad: ; 351a5
|
|||||||
; supereffectivelooptext
|
; supereffectivelooptext
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit 2, a
|
bit 2, a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -4506,7 +4506,7 @@ BattleCommand41: ; 35864
|
|||||||
and a
|
and a
|
||||||
jp nz, .asm_35923
|
jp nz, .asm_35923
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jp nz, .asm_35923
|
jp nz, .asm_35923
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
@ -4750,7 +4750,7 @@ BattleCommand44: ; 359e6
|
|||||||
ld [hld], a
|
ld [hld], a
|
||||||
push hl
|
push hl
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -4788,7 +4788,7 @@ BattleCommand45: ; 35a53
|
|||||||
jr nz, .asm_35a6e
|
jr nz, .asm_35a6e
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_LOCK_ON, [hl]
|
set SUBSTATUS_LOCK_ON, [hl]
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
|
|
||||||
@ -4817,7 +4817,7 @@ BattleCommand46: ; 35a74
|
|||||||
jp nz, .asm_35b10
|
jp nz, .asm_35b10
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_TRANSFORMED, [hl]
|
bit SUBSTATUS_TRANSFORMED, [hl]
|
||||||
jp nz, .asm_35b10
|
jp nz, .asm_35b10
|
||||||
|
|
||||||
@ -4916,11 +4916,11 @@ BattleCommand47: ; 35b16
|
|||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
|
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
call Defrost
|
call Defrost
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push hl
|
push hl
|
||||||
push af
|
push af
|
||||||
@ -4985,7 +4985,7 @@ BattleCommand48: ; 35b33
|
|||||||
call .asm_35bdf
|
call .asm_35bdf
|
||||||
jr z, .asm_35b62
|
jr z, .asm_35b62
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Function34548
|
call Function34548
|
||||||
@ -5085,7 +5085,7 @@ BattleCommand49: ; 35bff
|
|||||||
; destinybond
|
; destinybond
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_DESTINY_BOND, [hl]
|
set SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
ld hl, DestinyBondEffectText
|
ld hl, DestinyBondEffectText
|
||||||
@ -5228,7 +5228,7 @@ BattleCommand4c: ; 35cc9
|
|||||||
; healbell
|
; healbell
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_NIGHTMARE, [hl]
|
res SUBSTATUS_NIGHTMARE, [hl]
|
||||||
ld de, PartyMon1Status
|
ld de, PartyMon1Status
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
@ -5237,7 +5237,7 @@ BattleCommand4c: ; 35cc9
|
|||||||
ld de, OTPartyMon1Status
|
ld de, OTPartyMon1Status
|
||||||
.asm_35cdb
|
.asm_35cdb
|
||||||
ld a, BATTLE_VARS_STATUS
|
ld a, BATTLE_VARS_STATUS
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -5433,7 +5433,7 @@ Function35de0: ; 35de0
|
|||||||
|
|
||||||
.broke
|
.broke
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_SUBSTITUTE, [hl]
|
res SUBSTATUS_SUBSTITUTE, [hl]
|
||||||
|
|
||||||
ld hl, SubFadedText
|
ld hl, SubFadedText
|
||||||
@ -5448,7 +5448,7 @@ Function35de0: ; 35de0
|
|||||||
call SwitchTurn
|
call SwitchTurn
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
cp EFFECT_MULTI_HIT
|
cp EFFECT_MULTI_HIT
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
cp EFFECT_DOUBLE_HIT
|
cp EFFECT_DOUBLE_HIT
|
||||||
@ -5471,7 +5471,7 @@ Function35de0: ; 35de0
|
|||||||
UpdateMoveData: ; 35e40
|
UpdateMoveData: ; 35e40
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
|
||||||
@ -5503,7 +5503,7 @@ BattleCommand14: ; 35e5c
|
|||||||
|
|
||||||
.asm_35e70
|
.asm_35e70
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -5596,7 +5596,7 @@ BattleCommand13: ; 35eee
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
@ -5719,7 +5719,7 @@ Function35fc0: ; 35fc0
|
|||||||
|
|
||||||
Function35fc9: ; 35fc9
|
Function35fc9: ; 35fc9
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
ld de, $c67c
|
ld de, $c67c
|
||||||
@ -5752,7 +5752,7 @@ Function35fe1: ; 35fe1
|
|||||||
|
|
||||||
Function35ff5: ; 35ff5
|
Function35ff5: ; 35ff5
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set PSN, [hl]
|
set PSN, [hl]
|
||||||
jp UpdateOpponentInParty
|
jp UpdateOpponentInParty
|
||||||
; 35fff
|
; 35fff
|
||||||
@ -5865,7 +5865,7 @@ BattleCommand17: ; 3608c
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and a
|
and a
|
||||||
jp nz, Defrost
|
jp nz, Defrost
|
||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
@ -5883,7 +5883,7 @@ BattleCommand17: ; 3608c
|
|||||||
call Function37962
|
call Function37962
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set BRN, [hl]
|
set BRN, [hl]
|
||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
ld hl, Function3ec76
|
ld hl, Function3ec76
|
||||||
@ -5935,7 +5935,7 @@ BattleCommand18: ; 36102
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
@ -5956,7 +5956,7 @@ BattleCommand18: ; 36102
|
|||||||
call Function37962
|
call Function37962
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set FRZ, [hl]
|
set FRZ, [hl]
|
||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
ld de, ANIM_FRZ
|
ld de, ANIM_FRZ
|
||||||
@ -5989,7 +5989,7 @@ BattleCommand19: ; 36165
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
@ -6005,7 +6005,7 @@ BattleCommand19: ; 36165
|
|||||||
call Function37962
|
call Function37962
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set PAR, [hl]
|
set PAR, [hl]
|
||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
ld hl, Function3ec39
|
ld hl, Function3ec39
|
||||||
@ -6759,7 +6759,7 @@ BattleCommandac: ; 3658f
|
|||||||
BattleCommandaf: ; 365a7
|
BattleCommandaf: ; 365a7
|
||||||
; curl
|
; curl
|
||||||
ld a, BATTLE_VARS_SUBSTATUS2
|
ld a, BATTLE_VARS_SUBSTATUS2
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ret
|
ret
|
||||||
; 365af
|
; 365af
|
||||||
@ -6923,14 +6923,14 @@ BattleCommand21: ; 36671
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
jr nz, .asm_366dc
|
jr nz, .asm_366dc
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
|
|
||||||
ld hl, UnleashedEnergyText
|
ld hl, UnleashedEnergyText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_POWER
|
ld a, BATTLE_VARS_MOVE_POWER
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, PlayerDamageTaken + 1
|
ld hl, PlayerDamageTaken + 1
|
||||||
@ -6964,7 +6964,7 @@ BattleCommand21: ; 36671
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, BIDE
|
ld a, BIDE
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
@ -6990,7 +6990,7 @@ BattleCommand22: ; 366e5
|
|||||||
ld bc, EnemyRolloutCount
|
ld bc, EnemyRolloutCount
|
||||||
.asm_366f6
|
.asm_366f6
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -7020,7 +7020,7 @@ BattleCommand3e: ; 3671a
|
|||||||
ld de, EnemyRolloutCount
|
ld de, EnemyRolloutCount
|
||||||
.asm_36725
|
.asm_36725
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
ret z
|
ret z
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -7063,7 +7063,7 @@ BattleCommand3d: ; 36751
|
|||||||
ld de, EnemyRolloutCount
|
ld de, EnemyRolloutCount
|
||||||
.asm_36764
|
.asm_36764
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
and $1
|
and $1
|
||||||
@ -7431,12 +7431,12 @@ BattleCommand24: ; 369b6
|
|||||||
.asm_369c7
|
.asm_369c7
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit 2, [hl]
|
bit 2, [hl]
|
||||||
jp nz, .asm_36a43
|
jp nz, .asm_36a43
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp EFFECT_TWINEEDLE
|
cp EFFECT_TWINEEDLE
|
||||||
jr z, .asm_36a3f
|
jr z, .asm_36a3f
|
||||||
@ -7478,7 +7478,7 @@ BattleCommand24: ; 369b6
|
|||||||
|
|
||||||
.asm_36a1e
|
.asm_36a1e
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
call BattleCommanda8
|
call BattleCommanda8
|
||||||
jp EndMoveEffect
|
jp EndMoveEffect
|
||||||
@ -7507,7 +7507,7 @@ BattleCommand24: ; 369b6
|
|||||||
jr nz, .asm_36a6b
|
jr nz, .asm_36a6b
|
||||||
.asm_36a48
|
.asm_36a48
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
|
|
||||||
ld hl, PlayerHitTimesText
|
ld hl, PlayerHitTimesText
|
||||||
@ -7594,7 +7594,7 @@ BattleCommand25: ; 36aa0
|
|||||||
|
|
||||||
Function36ab5: ; 36ab5
|
Function36ab5: ; 36ab5
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_FLINCHED, [hl]
|
set SUBSTATUS_FLINCHED, [hl]
|
||||||
jp EndRechargeOpp
|
jp EndRechargeOpp
|
||||||
; 36abf
|
; 36abf
|
||||||
@ -7626,7 +7626,7 @@ BattleCommand4d: ; 36ac9
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
call GetUserItem
|
call GetUserItem
|
||||||
@ -7635,7 +7635,7 @@ BattleCommand4d: ; 36ac9
|
|||||||
ret nc
|
ret nc
|
||||||
call EndRechargeOpp
|
call EndRechargeOpp
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_FLINCHED, [hl]
|
set SUBSTATUS_FLINCHED, [hl]
|
||||||
ret
|
ret
|
||||||
; 36af3
|
; 36af3
|
||||||
@ -7692,7 +7692,7 @@ BattleCommand3a: ; 36b3a
|
|||||||
; checkcharge
|
; checkcharge
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_CHARGED, [hl]
|
bit SUBSTATUS_CHARGED, [hl]
|
||||||
ret z
|
ret z
|
||||||
res SUBSTATUS_CHARGED, [hl]
|
res SUBSTATUS_CHARGED, [hl]
|
||||||
@ -7719,7 +7719,7 @@ BattleCommand39: ; 36b4d
|
|||||||
|
|
||||||
.asm_36b65
|
.asm_36b65
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_CHARGED, [hl]
|
set SUBSTATUS_CHARGED, [hl]
|
||||||
|
|
||||||
ld hl, IgnoredOrders2Text
|
ld hl, IgnoredOrders2Text
|
||||||
@ -7745,7 +7745,7 @@ BattleCommand39: ; 36b4d
|
|||||||
call Function37ec0
|
call Function37ec0
|
||||||
.asm_36b99
|
.asm_36b99
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -7763,10 +7763,10 @@ BattleCommand39: ; 36b4d
|
|||||||
call Function34548
|
call Function34548
|
||||||
jr nz, .asm_36bc3
|
jr nz, .asm_36bc3
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
ld a, BATTLE_VARS_LAST_MOVE
|
ld a, BATTLE_VARS_LAST_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
|
|
||||||
.asm_36bc3
|
.asm_36bc3
|
||||||
@ -7913,7 +7913,7 @@ BattleCommand28: ; 36c7e
|
|||||||
; mist
|
; mist
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_MIST, [hl]
|
bit SUBSTATUS_MIST, [hl]
|
||||||
jr nz, .asm_36c92
|
jr nz, .asm_36c92
|
||||||
set SUBSTATUS_MIST, [hl]
|
set SUBSTATUS_MIST, [hl]
|
||||||
@ -7930,7 +7930,7 @@ BattleCommand29: ; 36c98
|
|||||||
; focusenergy
|
; focusenergy
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_FOCUS_ENERGY, [hl]
|
bit SUBSTATUS_FOCUS_ENERGY, [hl]
|
||||||
jr nz, .asm_36cac
|
jr nz, .asm_36cac
|
||||||
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
||||||
@ -8024,7 +8024,7 @@ BattleCommand2b: ; 36d1d
|
|||||||
call CheckSubstituteOpp
|
call CheckSubstituteOpp
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_CONFUSED, [hl]
|
bit SUBSTATUS_CONFUSED, [hl]
|
||||||
ret nz
|
ret nz
|
||||||
jr Function36d70
|
jr Function36d70
|
||||||
@ -8046,7 +8046,7 @@ BattleCommand2a: ; 36d3b
|
|||||||
|
|
||||||
.asm_36d53
|
.asm_36d53
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_CONFUSED, [hl]
|
bit SUBSTATUS_CONFUSED, [hl]
|
||||||
jr z, .asm_36d65
|
jr z, .asm_36d65
|
||||||
call AnimateFailedMove
|
call AnimateFailedMove
|
||||||
@ -8159,7 +8159,7 @@ BattleCommand30: ; 36dc7
|
|||||||
jr c, .asm_36e52
|
jr c, .asm_36e52
|
||||||
.asm_36e0e
|
.asm_36e0e
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36e52
|
jr nz, .asm_36e52
|
||||||
ld a, [AttackMissed]
|
ld a, [AttackMissed]
|
||||||
@ -8173,7 +8173,7 @@ BattleCommand30: ; 36dc7
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffd4], a
|
ld [$ffd4], a
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set PAR, [hl]
|
set PAR, [hl]
|
||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
ld hl, Function3ec39
|
ld hl, Function3ec39
|
||||||
@ -8274,7 +8274,7 @@ BattleCommand31: ; 36e7c
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_SUBSTITUTE, [hl]
|
set SUBSTATUS_SUBSTITUTE, [hl]
|
||||||
|
|
||||||
ld hl, $c730
|
ld hl, $c730
|
||||||
@ -8324,7 +8324,7 @@ BattleCommand31: ; 36e7c
|
|||||||
BattleCommand32: ; 36f0b
|
BattleCommand32: ; 36f0b
|
||||||
; rechargenextturn
|
; rechargenextturn
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_RECHARGE, [hl]
|
set SUBSTATUS_RECHARGE, [hl]
|
||||||
ret
|
ret
|
||||||
; 36f13
|
; 36f13
|
||||||
@ -8333,7 +8333,7 @@ BattleCommand32: ; 36f0b
|
|||||||
EndRechargeOpp: ; 36f13
|
EndRechargeOpp: ; 36f13
|
||||||
push hl
|
push hl
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_RECHARGE, [hl]
|
res SUBSTATUS_RECHARGE, [hl]
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
@ -8343,7 +8343,7 @@ EndRechargeOpp: ; 36f13
|
|||||||
BattleCommand97: ; 36f1d
|
BattleCommand97: ; 36f1d
|
||||||
; rage
|
; rage
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_RAGE, [hl]
|
set SUBSTATUS_RAGE, [hl]
|
||||||
ret
|
ret
|
||||||
; 36f25
|
; 36f25
|
||||||
@ -8461,7 +8461,7 @@ BattleCommand35: ; 36f9d
|
|||||||
jr z, .grass
|
jr z, .grass
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
ld a, BATTLE_VARS_SUBSTATUS4_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_LEECH_SEED, [hl]
|
bit SUBSTATUS_LEECH_SEED, [hl]
|
||||||
jr nz, .evaded
|
jr nz, .evaded
|
||||||
set SUBSTATUS_LEECH_SEED, [hl]
|
set SUBSTATUS_LEECH_SEED, [hl]
|
||||||
@ -8753,10 +8753,10 @@ BattleCommand2c: ; 3713e
|
|||||||
push af
|
push af
|
||||||
call BattleCommandaa
|
call BattleCommandaa
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_TOXIC, [hl]
|
res SUBSTATUS_TOXIC, [hl]
|
||||||
ld a, BATTLE_VARS_STATUS
|
ld a, BATTLE_VARS_STATUS
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
ld [hl], REST_TURNS + 1
|
ld [hl], REST_TURNS + 1
|
||||||
@ -8807,7 +8807,7 @@ BattleCommand2d: ; 371cd
|
|||||||
|
|
||||||
call Function372d8
|
call Function372d8
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_TRANSFORMED, [hl]
|
bit SUBSTATUS_TRANSFORMED, [hl]
|
||||||
jp nz, Function372d2
|
jp nz, Function372d2
|
||||||
call CheckHiddenOpponent
|
call CheckHiddenOpponent
|
||||||
@ -8818,7 +8818,7 @@ BattleCommand2d: ; 371cd
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$c689], a
|
ld [$c689], a
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_SUBSTITUTE, [hl]
|
bit SUBSTATUS_SUBSTITUTE, [hl]
|
||||||
push af
|
push af
|
||||||
jr z, .asm_37200
|
jr z, .asm_37200
|
||||||
@ -8828,7 +8828,7 @@ BattleCommand2d: ; 371cd
|
|||||||
call Function37e44
|
call Function37e44
|
||||||
.asm_37200
|
.asm_37200
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_TRANSFORMED, [hl]
|
set SUBSTATUS_TRANSFORMED, [hl]
|
||||||
call ResetActorDisable
|
call ResetActorDisable
|
||||||
ld hl, BattleMonSpecies
|
ld hl, BattleMonSpecies
|
||||||
@ -8964,12 +8964,12 @@ Function372d2: ; 372d2
|
|||||||
|
|
||||||
Function372d8: ; 372d8
|
Function372d8: ; 372d8
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld a, BATTLE_VARS_LAST_MOVE
|
ld a, BATTLE_VARS_LAST_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
@ -9120,7 +9120,7 @@ BattleCommand1a: ; 37380
|
|||||||
ld c, $3
|
ld c, $3
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, BATTLE_VARS_STATUS
|
ld a, BATTLE_VARS_STATUS
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc hl
|
inc hl
|
||||||
@ -9131,10 +9131,10 @@ BattleCommand1a: ; 37380
|
|||||||
call BattleCommand0a
|
call BattleCommand0a
|
||||||
call Function37e36
|
call Function37e36
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_LEECH_SEED, [hl]
|
res SUBSTATUS_LEECH_SEED, [hl]
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_DESTINY_BOND, [hl]
|
res SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
call Function37ed5
|
call Function37ed5
|
||||||
ret nc
|
ret nc
|
||||||
@ -9206,7 +9206,7 @@ BattleCommand51: ; 37517
|
|||||||
; Don't trap if the opponent is already trapped.
|
; Don't trap if the opponent is already trapped.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_CANT_RUN, [hl]
|
bit SUBSTATUS_CANT_RUN, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
@ -9232,7 +9232,7 @@ BattleCommand53: ; 37563
|
|||||||
; Thaw the user.
|
; Thaw the user.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_STATUS
|
ld a, BATTLE_VARS_STATUS
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit FRZ, [hl]
|
bit FRZ, [hl]
|
||||||
ret z
|
ret z
|
||||||
res FRZ, [hl]
|
res FRZ, [hl]
|
||||||
@ -9353,7 +9353,7 @@ BattleCommand5f: ; 377ce
|
|||||||
call CheckHiddenOpponent
|
call CheckHiddenOpponent
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_IN_LOVE, [hl]
|
bit SUBSTATUS_IN_LOVE, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
@ -9822,7 +9822,7 @@ ResetBatonPassStatus: ; 37ab1
|
|||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_NIGHTMARE, [hl]
|
res SUBSTATUS_NIGHTMARE, [hl]
|
||||||
.ok
|
.ok
|
||||||
|
|
||||||
@ -9837,13 +9837,13 @@ ResetBatonPassStatus: ; 37ab1
|
|||||||
ld hl, PlayerSubStatus5
|
ld hl, PlayerSubStatus5
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS5
|
ld a, BATTLE_VARS_SUBSTATUS5
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_TRANSFORMED, [hl]
|
res SUBSTATUS_TRANSFORMED, [hl]
|
||||||
res 4, [hl]
|
res 4, [hl]
|
||||||
|
|
||||||
; New mon hasn't used a move yet.
|
; New mon hasn't used a move yet.
|
||||||
ld a, BATTLE_VARS_LAST_MOVE
|
ld a, BATTLE_VARS_LAST_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
@ -9942,7 +9942,7 @@ BattleCommand69: ; 37b39
|
|||||||
; clearhazards
|
; clearhazards
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_LEECH_SEED, [hl]
|
bit SUBSTATUS_LEECH_SEED, [hl]
|
||||||
jr z, .asm_37b4a ; 37b40 $8
|
jr z, .asm_37b4a ; 37b40 $8
|
||||||
res SUBSTATUS_LEECH_SEED, [hl]
|
res SUBSTATUS_LEECH_SEED, [hl]
|
||||||
@ -10328,10 +10328,10 @@ BattleCommand9c: ; 37d34
|
|||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
ld a, BATTLE_VARS_LAST_MOVE
|
ld a, BATTLE_VARS_LAST_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
.asm_37d4b
|
.asm_37d4b
|
||||||
ld hl, $c71d
|
ld hl, $c71d
|
||||||
@ -10379,7 +10379,7 @@ BattleCommand9f: ; 37d94
|
|||||||
; thunderaccuracy
|
; thunderaccuracy
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [Weather]
|
ld a, [Weather]
|
||||||
cp WEATHER_RAIN
|
cp WEATHER_RAIN
|
||||||
|
@ -66,7 +66,7 @@ BattleCommand54: ; 37588
|
|||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
|
|||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_ENDURE, [hl]
|
set SUBSTATUS_ENDURE, [hl]
|
||||||
|
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
|
@ -9,7 +9,7 @@ BattleCommand57: ; 376a0
|
|||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_IDENTIFIED, [hl]
|
bit SUBSTATUS_IDENTIFIED, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ BattleCommand34: ; 37418
|
|||||||
|
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
call UpdateMoveData
|
call UpdateMoveData
|
||||||
jp ResetTurn
|
jp ResetTurn
|
||||||
|
@ -4,7 +4,7 @@ BattleCommand1b: ; 373c9
|
|||||||
call Function372d8
|
call Function372d8
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
|
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
@ -28,7 +28,7 @@ BattleCommand1b: ; 373c9
|
|||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop af
|
pop af
|
||||||
|
@ -14,14 +14,14 @@ BattleCommand52: ; 37536
|
|||||||
; Only works on a sleeping opponent.
|
; Only works on a sleeping opponent.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
and SLP
|
and SLP
|
||||||
jr z, .failed
|
jr z, .failed
|
||||||
|
|
||||||
; Bail if the opponent is already having a nightmare.
|
; Bail if the opponent is already having a nightmare.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
bit SUBSTATUS_NIGHTMARE, [hl]
|
bit SUBSTATUS_NIGHTMARE, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ BattleCommand55: ; 37618
|
|||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set SUBSTATUS_PROTECT, [hl]
|
set SUBSTATUS_PROTECT, [hl]
|
||||||
|
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
|
@ -50,7 +50,7 @@ BattleCommand5c: ; 37734
|
|||||||
jr z, .hit
|
jr z, .hit
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -62,13 +62,13 @@ BattleCommand5c: ; 37734
|
|||||||
jr c, .asm_3776e
|
jr c, .asm_3776e
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
jr .asm_37775
|
jr .asm_37775
|
||||||
|
|
||||||
.asm_3776e
|
.asm_3776e
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
|
|
||||||
.asm_37775
|
.asm_37775
|
||||||
|
@ -96,7 +96,7 @@ HiddenPowerDamage: ; fbced
|
|||||||
; Overwrite the current move type.
|
; Overwrite the current move type.
|
||||||
push af
|
push af
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
|
@ -139,12 +139,12 @@ UpdateBattleHuds:: ; 39d4
|
|||||||
GetBattleVar:: ; 39e1
|
GetBattleVar:: ; 39e1
|
||||||
; Preserves hl.
|
; Preserves hl.
|
||||||
push hl
|
push hl
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
; 39e7
|
; 39e7
|
||||||
|
|
||||||
_GetBattleVar:: ; 39e7
|
GetBattleVarAddr:: ; 39e7
|
||||||
; Get variable from pair a, depending on whose turn it is.
|
; Get variable from pair a, depending on whose turn it is.
|
||||||
; There are 21 variable pairs.
|
; There are 21 variable pairs.
|
||||||
|
|
||||||
|
4
main.asm
4
main.asm
@ -107651,12 +107651,12 @@ UsedMoveText: ; 105db9
|
|||||||
|
|
||||||
.start
|
.start
|
||||||
ld a, BATTLE_VARS_LAST_MOVE
|
ld a, BATTLE_VARS_LAST_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
|
||||||
call _GetBattleVar
|
call GetBattleVarAddr
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
|
Loading…
Reference in New Issue
Block a user