No more $C8

Use OPP_ constants separate from trainer constants since
valid opponents can be all Pokemon and trainers
This commit is contained in:
dannye 2015-08-10 11:09:16 -05:00
parent 31d267d4ad
commit dfc152d667
88 changed files with 428 additions and 423 deletions

View file

@ -82,7 +82,7 @@ BattleTransitions: ; 709d2 (1c:49d2)
GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
ld a, [W_CUROPPONENT]
cp $c8
cp 200
jr nc, .trainer
res 0, c
ret

View file

@ -1214,7 +1214,7 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
cp LINK_STATE_BATTLING
jr z, .notSony1Battle
ld a, [W_CUROPPONENT]
cp $c8 + SONY1
cp OPP_SONY1
jr nz, .notSony1Battle
coord hl, 0, 0 ; sony 1 battle
lb bc, 8, 21
@ -6861,7 +6861,7 @@ InitBattleCommon: ; 3ef3d (f:6f3d)
res 1, [hl]
callab InitBattleVariables
ld a, [wEnemyMonSpecies2]
sub $c8
sub 200
jp c, InitWildBattle
ld [W_TRAINERCLASS], a
call GetTrainerInformation

View file

@ -101,7 +101,7 @@ ReadTrainer: ; 39c53 (e:5c53)
; get trainer class number
ld a,[W_CUROPPONENT]
sub $C8
sub 200
ld b,a
ld hl,TeamMoves