mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Pokemon Emerald: Change dexsanity to not create locations for blacklisted wilds (#3056)
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Dict, Optional, FrozenSet, Iterable
|
||||
|
||||
from BaseClasses import Location, Region
|
||||
|
||||
from .data import BASE_OFFSET, POKEDEX_OFFSET, data
|
||||
from .data import BASE_OFFSET, NATIONAL_ID_TO_SPECIES_ID, POKEDEX_OFFSET, data
|
||||
from .items import offset_item_value
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -130,8 +130,14 @@ def create_locations_with_tags(world: "PokemonEmeraldWorld", regions: Dict[str,
|
||||
location_data = data.locations[location_name]
|
||||
|
||||
location_id = offset_flag(location_data.flag)
|
||||
if location_data.flag == 0:
|
||||
location_id += POKEDEX_OFFSET + int(location_name[15:])
|
||||
if location_data.flag == 0: # Dexsanity location
|
||||
national_dex_id = int(location_name[-3:]) # Location names are formatted POKEDEX_REWARD_###
|
||||
|
||||
# Don't create this pokedex location if player can't find it in the wild
|
||||
if NATIONAL_ID_TO_SPECIES_ID[national_dex_id] in world.blacklisted_wilds:
|
||||
continue
|
||||
|
||||
location_id += POKEDEX_OFFSET + national_dex_id
|
||||
|
||||
location = PokemonEmeraldLocation(
|
||||
world.player,
|
||||
|
||||
Reference in New Issue
Block a user