From d1624679eedb62789e7e7bf86d8803fd53f83f8f Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Sun, 28 Sep 2025 12:39:18 -0700 Subject: [PATCH] Pokemon Emerald: Set all abilities to Cacophony if all are blacklisted (#5488) --- worlds/pokemon_emerald/pokemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worlds/pokemon_emerald/pokemon.py b/worlds/pokemon_emerald/pokemon.py index 6f267650..b39f8c2a 100644 --- a/worlds/pokemon_emerald/pokemon.py +++ b/worlds/pokemon_emerald/pokemon.py @@ -397,6 +397,10 @@ def randomize_abilities(world: "PokemonEmeraldWorld") -> None: ability_blacklist = {ability_label_to_value[label] for label in ability_blacklist_labels} ability_whitelist = [a.ability_id for a in data.abilities if a.ability_id not in ability_blacklist] + # If every ability is blacklisted, set all abilities to Cacophony, effectively disabling abilities + if len(ability_whitelist) == 0: + ability_whitelist = [data.constants["ABILITY_CACOPHONY"]] + if world.options.abilities == RandomizeAbilities.option_follow_evolutions: already_modified: Set[int] = set()