diff options
author | Remy Oukaour <remy.oukaour@gmail.com> | 2018-01-09 16:55:11 -0500 |
---|---|---|
committer | Remy Oukaour <remy.oukaour@gmail.com> | 2018-01-09 16:55:11 -0500 |
commit | ce50d1b2cb4eebf8484cf12e6280c441ec94ae39 (patch) | |
tree | 1d7f04cf49355b8632070f3b3f9c6996210d210b /engine | |
parent | 11556196ba546f5c45b97fffc2c263a79eb639b9 (diff) |
Clearer Battle Tower code
Diffstat (limited to 'engine')
-rw-r--r-- | engine/events/battle_tower/load_trainer.asm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm index 5d8c06166..5389f3f2e 100644 --- a/engine/events/battle_tower/load_trainer.asm +++ b/engine/events/battle_tower/load_trainer.asm @@ -27,12 +27,11 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000 add b ld b, a ; b contains the nr of the trainer if DEF(CRYSTAL11) - and (1 << 7) - 1 - cp 70 + and $7f else - and (1 << 5) - 1 - cp 21 + and $1f endc + cp (BattleTowerTrainersEnd - BattleTowerTrainers) / NAME_LENGTH jr nc, .resample ld b, a @@ -114,7 +113,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081 add b ld b, a and $1f - cp BATTLETOWER_NRMONSPERLEVELBRACKET + cp BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS jr nc, .resample ; in register 'a' is the chosen Pkmn of the LevelGroup @@ -207,4 +206,6 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081 ret ; 1f814e +INCLUDE "data/battle_tower/classes.asm" + INCLUDE "data/battle_tower/parties.asm" |