Skip to content
7 changes: 4 additions & 3 deletions worlds/tunic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from BaseClasses import Region, Location, Item, Tutorial, ItemClassification, MultiWorld, CollectionState
from .items import (item_name_to_id, item_table, item_name_groups, fool_tiers, filler_items, slot_data_item_names,
combat_items)
from .locations import location_table, location_name_groups, standard_location_name_to_id, hexagon_locations, sphere_one
from .locations import location_table, location_name_groups, standard_location_name_to_id, hexagon_locations
from .rules import set_location_rules, set_region_rules, randomize_ability_unlocks, gold_hexagon
from .er_rules import set_er_location_rules
from .regions import tunic_regions
Expand Down Expand Up @@ -451,9 +451,10 @@ def remove_filler(amount: int) -> None:
def pre_fill(self) -> None:
if self.options.local_fill > 0 and self.multiworld.players > 1:
# we need to reserve a couple locations so that we don't fill up every sphere 1 location
reserved_locations: Set[str] = set(self.random.sample(sphere_one, 2))
sphere_one_locs = self.multiworld.get_reachable_locations(CollectionState(self.multiworld), self.player)
reserved_locations: Set[Location] = set(self.random.sample(sphere_one_locs, 2))
viable_locations = [loc for loc in self.multiworld.get_unfilled_locations(self.player)
if loc.name not in reserved_locations
if loc not in reserved_locations
and loc.name not in self.options.priority_locations.value]

if len(viable_locations) < self.amount_to_local_fill:
Expand Down
17 changes: 0 additions & 17 deletions worlds/tunic/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,23 +322,6 @@ class TunicLocationData(NamedTuple):
"Blue Questagon": "Rooted Ziggurat Lower - Hexagon Blue",
}

sphere_one: List[str] = [
"Overworld - [Central] Chest Across From Well",
"Overworld - [Northwest] Chest Near Quarry Gate",
"Overworld - [Northwest] Shadowy Corner Chest",
"Overworld - [Southwest] Chest Guarded By Turret",
"Overworld - [Southwest] South Chest Near Guard",
"Overworld - [Southwest] Obscured in Tunnel to Beach",
"Overworld - [Northwest] Chest Near Turret",
"Overworld - [Northwest] Page By Well",
"Overworld - [West] Chest Behind Moss Wall",
"Overworld - [Southwest] Key Pickup",
"Overworld - [West] Key Pickup",
"Overworld - [West] Obscured Behind Windmill",
"Overworld - [West] Obscured Near Well",
"Overworld - [West] Page On Teleporter"
]

standard_location_name_to_id: Dict[str, int] = {name: location_base_id + index for index, name in enumerate(location_table)}

all_locations = location_table.copy()
Expand Down
Loading