summaryrefslogtreecommitdiff
path: root/engine/battle/read_trainer_party.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
committerdannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
commit5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch)
treea1ce27018f39d98f49d89468df426d0291e18560 /engine/battle/read_trainer_party.asm
parentccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff)
parent8a5a7d8e68538b727e0c166488265f395603366e (diff)
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
Diffstat (limited to 'engine/battle/read_trainer_party.asm')
-rwxr-xr-xengine/battle/read_trainer_party.asm24
1 files changed, 12 insertions, 12 deletions
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index 0976c7c7..4a5657b2 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -15,7 +15,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [hl],a
; get the pointer to trainer data for this class
- ld a,[W_CUROPPONENT]
+ ld a,[wCurOpponent]
sub $C9 ; convert value from pokemon to trainer
add a,a
ld hl,TrainerDataPointers
@@ -25,7 +25,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld a,[hli]
ld h,[hl]
ld l,a
- ld a,[W_TRAINERNO]
+ ld a,[wTrainerNo]
ld b,a
; At this point b contains the trainer number,
; and hl points to the trainer class.
@@ -43,13 +43,13 @@ ReadTrainer: ; 39c53 (e:5c53)
; if the first byte of trainer data is FF,
; - each pokemon has a specific level
; (as opposed to the whole team being of the same level)
-; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move
+; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move
; else the first byte is the level of every pokemon on the team
.IterateTrainer
ld a,[hli]
cp $FF ; is the trainer special?
jr z,.SpecialTrainer ; if so, check for special moves
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
.LoopTrainerData
ld a,[hli]
and a ; have we reached the end of the trainer data?
@@ -65,11 +65,11 @@ ReadTrainer: ; 39c53 (e:5c53)
; if this code is being run:
; - each pokemon has a specific level
; (as opposed to the whole team being of the same level)
-; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move
+; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move
ld a,[hli]
and a ; have we reached the end of the trainer data?
jr z,.AddLoneMove
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
ld a,[hli]
ld [wcf91],a
ld a,ENEMY_PARTY_DATA
@@ -80,7 +80,7 @@ ReadTrainer: ; 39c53 (e:5c53)
jr .SpecialTrainer
.AddLoneMove
; does the trainer have a single monster with a different move
- ld a,[W_LONEATTACKNO] ; Brock is 01, Misty is 02, Erika is 04, etc
+ ld a,[wLoneAttackNo] ; Brock is 01, Misty is 02, Erika is 04, etc
and a
jr z,.AddTeamMove
dec a
@@ -100,8 +100,8 @@ ReadTrainer: ; 39c53 (e:5c53)
; check if our trainer's team has special moves
; get trainer class number
- ld a,[W_CUROPPONENT]
- sub $C8
+ ld a,[wCurOpponent]
+ sub 200
ld b,a
ld hl,TeamMoves
@@ -130,7 +130,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [wEnemyMon1Moves + 2],a
; starter
- ld a,[W_RIVALSTARTER]
+ ld a,[wRivalStarter]
cp STARTER3
ld b,MEGA_DRAIN
jr z,.GiveStarterMove
@@ -150,7 +150,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [de],a
inc de
ld [de],a
- ld a,[W_CURENEMYLVL]
+ ld a,[wCurEnemyLVL]
ld b,a
.LastLoop
; update wAmountMoneyWon addresses (money to win) based on enemy's level
@@ -162,5 +162,5 @@ ReadTrainer: ; 39c53 (e:5c53)
inc de
inc de
dec b
- jr nz,.LastLoop ; repeat W_CURENEMYLVL times
+ jr nz,.LastLoop ; repeat wCurEnemyLVL times
ret