Pokemon Emerald: Change dexsanity to not create locations for blacklisted wilds (#3056)

This commit is contained in:
Bryce Wilson
2024-05-04 13:44:38 -06:00
committed by GitHub
parent 005fc4e864
commit 7603b4a88f
3 changed files with 21 additions and 10 deletions

View File

@@ -1531,6 +1531,10 @@ def set_rules(world: "PokemonEmeraldWorld") -> None:
if world.options.dexsanity:
for i in range(NUM_REAL_SPECIES):
species = data.species[NATIONAL_ID_TO_SPECIES_ID[i + 1]]
if species.species_id in world.blacklisted_wilds:
continue
set_rule(
get_location(f"Pokedex - {species.label}"),
lambda state, species_name=species.name: state.has(f"CATCH_{species_name}", world.player)
@@ -1538,7 +1542,8 @@ def set_rules(world: "PokemonEmeraldWorld") -> None:
# Legendary hunt prevents Latios from being a wild spawn so the roamer
# can be tracked, and also guarantees that the roamer is a Latios.
if world.options.goal == Goal.option_legendary_hunt:
if world.options.goal == Goal.option_legendary_hunt and \
data.constants["SPECIES_LATIOS"] not in world.blacklisted_wilds:
set_rule(
get_location(f"Pokedex - Latios"),
lambda state: state.has("EVENT_ENCOUNTER_LATIOS", world.player)