From dfc152d667e3695f83eb0fbabb839b0fad275ceb Mon Sep 17 00:00:00 2001 From: dannye Date: Mon, 10 Aug 2015 11:09:16 -0500 Subject: No more $C8 Use OPP_ constants separate from trainer constants since valid opponents can be all Pokemon and trainers --- engine/battle/battle_transitions.asm | 2 +- engine/battle/core.asm | 4 ++-- engine/battle/read_trainer_party.asm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/battle') diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 8f57777c..9a5f62b1 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -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 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 418447ba..feadcd82 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -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 diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 0976c7c7..37a45476 100755 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -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 -- cgit v1.2.3