mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
More maskbits
This commit is contained in:
parent
417937cffc
commit
bc79f17b9d
@ -45,10 +45,7 @@ BATTLETOWER_NROFPKMNS EQU 3
|
|||||||
BATTLETOWER_NROFTRAINERS EQU 7
|
BATTLETOWER_NROFTRAINERS EQU 7
|
||||||
|
|
||||||
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
||||||
BATTLETOWER_TRAINER_MASK EQU %1111111
|
|
||||||
|
|
||||||
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
||||||
BATTLETOWER_PKMN_MASK EQU %11111
|
|
||||||
|
|
||||||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||||
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||||
|
@ -27,12 +27,12 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
|||||||
add b
|
add b
|
||||||
ld b, a ; b contains the nr of the trainer
|
ld b, a ; b contains the nr of the trainer
|
||||||
if DEF(_CRYSTAL11)
|
if DEF(_CRYSTAL11)
|
||||||
and BATTLETOWER_TRAINER_MASK
|
maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS
|
||||||
cp BATTLETOWER_NUM_UNIQUE_TRAINERS
|
cp BATTLETOWER_NUM_UNIQUE_TRAINERS
|
||||||
else
|
else
|
||||||
; Crystal 1.0 used the wrong constants here, so only the first 21
|
; Crystal 1.0 used the wrong constant here, so only the first 21
|
||||||
; trainers in BattleTowerTrainers can be sampled.
|
; trainers in BattleTowerTrainers can be sampled.
|
||||||
and BATTLETOWER_PKMN_MASK
|
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
|
||||||
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
||||||
endc
|
endc
|
||||||
jr nc, .resample
|
jr nc, .resample
|
||||||
@ -115,7 +115,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
|||||||
ld a, [hRandomAdd]
|
ld a, [hRandomAdd]
|
||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a
|
||||||
and BATTLETOWER_PKMN_MASK
|
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
|
||||||
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
cp BATTLETOWER_NUM_UNIQUE_PKMN
|
||||||
jr nc, .resample
|
jr nc, .resample
|
||||||
; in register 'a' is the chosen Pkmn of the LevelGroup
|
; in register 'a' is the chosen Pkmn of the LevelGroup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user