summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-12-26 16:27:21 -0500
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-12-26 16:27:21 -0500
commit47979336e29d7e22d524e35ddc50576874ead009 (patch)
tree91723be28641be80ad475b61b5b40f03e1eab9ae /engine/items
parent043e9327650f2ee0053fe43a29c9d63bc5e120d3 (diff)
Start disassembling bank0F (Battle)
All current findings will be located in engine/battle/core_.asm
Diffstat (limited to 'engine/items')
-rwxr-xr-xengine/items/items.asm12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 1b1f7d7a..4ff01eff 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -106,7 +106,7 @@ ItemUseBall: ; d3ad (3:53ad)
jp z,ItemUseNotTime ; not in battle
dec a
jp nz,ThrowBallAtTrainerMon
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
cp $1
jr z,.UseBall
cp $4 ; pikachu battle?
@@ -121,7 +121,7 @@ ItemUseBall: ; d3ad (3:53ad)
;ok, you can use a ball
xor a
ld [wCapturedMonSpecies],a
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
cp a,2 ;SafariBattle
jr nz,.skipSafariZoneCode
.safariZone
@@ -138,7 +138,7 @@ ItemUseBall: ; d3ad (3:53ad)
callab IsGhostBattle
ld b,$10
jp z,.next12
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
cp $1
jr z,.oldManBattle
cp $4
@@ -149,7 +149,7 @@ ItemUseBall: ; d3ad (3:53ad)
ld de,wPlayerName
ld bc,NAME_LENGTH
call CopyData ; save the player's name in the Wild Monster data
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
cp $1
jp nz,.BallSuccess
ld a,$1
@@ -406,7 +406,7 @@ ItemUseBall: ; d3ad (3:53ad)
ld [wCapturedMonSpecies],a
ld [wcf91],a
ld [wd11e],a
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
cp $1
jp z,.printText1 ; just barely out of reach for a relative jump
cp $4
@@ -468,7 +468,7 @@ ItemUseBall: ; d3ad (3:53ad)
call PrintText
call ClearSprites
.End
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
and a
ret nz
ld hl,wNumBagItems