More maskbits

This commit is contained in:
Remy Oukaour
2018-01-10 13:59:07 -05:00
parent 417937cffc
commit bc79f17b9d
2 changed files with 4 additions and 7 deletions

View File

@@ -27,12 +27,12 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000
add b
ld b, a ; b contains the nr of the trainer
if DEF(_CRYSTAL11)
and BATTLETOWER_TRAINER_MASK
maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS
cp BATTLETOWER_NUM_UNIQUE_TRAINERS
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.
and BATTLETOWER_PKMN_MASK
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
cp BATTLETOWER_NUM_UNIQUE_PKMN
endc
jr nc, .resample
@@ -115,7 +115,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
ld a, [hRandomAdd]
add b
ld b, a
and BATTLETOWER_PKMN_MASK
maskbits BATTLETOWER_NUM_UNIQUE_PKMN
cp BATTLETOWER_NUM_UNIQUE_PKMN
jr nc, .resample
; in register 'a' is the chosen Pkmn of the LevelGroup