diff options
| author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-10-29 14:23:30 -0400 |
|---|---|---|
| committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-10-29 14:23:30 -0400 |
| commit | cb414f1480e9117e5d6ee0ab5cb81903e83cde9a (patch) | |
| tree | e44bd6299c61335a9a0476db57b565aadcd0b4d7 /engine/battle/read_trainer_party.asm | |
| parent | Revert "Revert "data/facing.asm, titlescreen functions, oam/sprite related fu... (diff) | |
| download | pokeyellow-cb414f1480e9117e5d6ee0ab5cb81903e83cde9a.tar.gz pokeyellow-cb414f1480e9117e5d6ee0ab5cb81903e83cde9a.tar.xz pokeyellow-cb414f1480e9117e5d6ee0ab5cb81903e83cde9a.zip | |
overworld item & movement code, cable club code, remove more instances of W_, add PIKAHAPPY_TRADE
Also make replace.sh take args
Diffstat (limited to 'engine/battle/read_trainer_party.asm')
| -rwxr-xr-x | engine/battle/read_trainer_party.asm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 37a45476..9f94981e 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 @@ -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,7 +100,7 @@ ReadTrainer: ; 39c53 (e:5c53) ; check if our trainer's team has special moves ; get trainer class number - ld a,[W_CUROPPONENT] + ld a,[wCurOpponent] sub 200 ld b,a ld hl,TeamMoves @@ -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 |
