Skip to content

Commit 4391d1f

Browse files
authored
Pokemon Emerald: Fix opponents learning non-randomized TMs (ArchipelagoMW#3025)
1 parent 5d9d4ed commit 4391d1f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

worlds/pokemon_emerald/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,6 @@ def generate_output(self, output_directory: str) -> None:
569569
self.modified_misc_pokemon = copy.deepcopy(emerald_data.misc_pokemon)
570570
self.modified_starters = copy.deepcopy(emerald_data.starters)
571571

572-
randomize_abilities(self)
573-
randomize_learnsets(self)
574-
randomize_tm_hm_compatibility(self)
575-
randomize_legendary_encounters(self)
576-
randomize_misc_pokemon(self)
577-
randomize_opponent_parties(self)
578-
randomize_starters(self)
579-
580572
# Modify catch rate
581573
min_catch_rate = min(self.options.min_catch_rate.value, 255)
582574
for species in self.modified_species.values():
@@ -591,6 +583,14 @@ def generate_output(self, output_directory: str) -> None:
591583
new_moves.add(new_move)
592584
self.modified_tmhm_moves[i] = new_move
593585

586+
randomize_abilities(self)
587+
randomize_learnsets(self)
588+
randomize_tm_hm_compatibility(self)
589+
randomize_legendary_encounters(self)
590+
randomize_misc_pokemon(self)
591+
randomize_opponent_parties(self)
592+
randomize_starters(self)
593+
594594
create_patch(self, output_directory)
595595

596596
del self.modified_trainers

worlds/pokemon_emerald/opponents.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def randomize_opponent_parties(world: "PokemonEmeraldWorld") -> None:
8080
per_species_tmhm_moves[new_species.species_id] = sorted({
8181
world.modified_tmhm_moves[i]
8282
for i, is_compatible in enumerate(int_to_bool_array(new_species.tm_hm_compatibility))
83-
if is_compatible
83+
if is_compatible and world.modified_tmhm_moves[i] not in world.blacklisted_moves
8484
})
8585

8686
# TMs and HMs compatible with the species

0 commit comments

Comments
 (0)