mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
No more $C8
Use OPP_ constants separate from trainer constants since valid opponents can be all Pokemon and trainers
This commit is contained in:
parent
31d267d4ad
commit
dfc152d667
88 changed files with 428 additions and 423 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
|
|||
jr nz, .asm_5506
|
||||
ld a, LINK_STATE_BATTLING
|
||||
ld [wLinkState], a
|
||||
ld a, SONY1 + $c8
|
||||
ld a, OPP_SONY1
|
||||
ld [W_CUROPPONENT], a
|
||||
call ClearScreen
|
||||
call Delay3
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7)
|
|||
jp SetSpriteMovementBytesToFF
|
||||
|
||||
RivalIDs: ; 1a605 (6:6605)
|
||||
db SONY1 + $c8
|
||||
db SONY2 + $c8
|
||||
db SONY3 + $c8
|
||||
db OPP_SONY1
|
||||
db OPP_SONY2
|
||||
db OPP_SONY3
|
||||
db $ff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue