Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions worlds/crystal_project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .items import item_table, optional_scholar_abilities, get_random_starting_jobs, filler_items, \
get_item_names_per_category, progressive_equipment, non_progressive_equipment, get_starting_jobs, \
set_jobs_at_default_locations, default_starting_job_list, job_list
from .locations import get_locations, get_bosses
from .locations import get_locations, get_bosses, get_shops
from .regions import init_areas
from .options import CrystalProjectOptions, IncludedRegions
from .rules import CrystalProjectLogic
Expand Down Expand Up @@ -36,7 +36,9 @@ class CrystalProjectWorld(World):
item_name_to_id = {item: item_table[item].code for item in item_table}
location_name_to_id = {location.name: location.code for location in get_locations(-1, None)}
boss_name_to_id = {boss.name: boss.code for boss in get_bosses(-1, None)}
location_name_to_id.update(boss_name_to_id)
shop_name_to_id = {shop.name: shop.code for shop in get_shops(-1, None)}
location_name_to_id.update(boss_name_to_id)
location_name_to_id.update(shop_name_to_id)
item_name_groups = get_item_names_per_category()
web = CrystalProjectWeb()

Expand Down Expand Up @@ -133,6 +135,10 @@ def create_regions(self) -> None:
bosses = get_bosses(self.player, self.options)
locations.extend(bosses)

if self.options.shopsanity:
shops = get_shops(self.player, self.options)
locations.extend(shops)

init_areas(self, locations, self.options)

if self.options.jobRando.value == self.options.jobRando.option_none:
Expand Down
5 changes: 5 additions & 0 deletions worlds/crystal_project/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,12 @@ def get_bosses(player: Optional[int], options: Optional[CrystalProjectOptions])
LocationData("The Depths", "The Depths Boss - The Enforcer", 1128 + boss_index_offset),
LocationData("The Depths", "The Depths Boss - The Peacekeeper", 2579 + boss_index_offset),
LocationData("The Old World", "The Old World Boss - Periculum", 3650 + boss_index_offset, lambda state: logic.is_area_in_level_range(state, 5)),
]
return location_table

def get_shops(player: Optional[int], options: Optional[CrystalProjectOptions]) -> List[LocationData]:
logic = CrystalProjectLogic(player, options)
location_table: List[LocationData] = [
#Zones (Beginner)
#Spawning Meadows
LocationData("Spawning Meadows", "Spawning Meadows Shop - Nans Knick Knacks 1", 13 + shop_index_offset),
Expand Down
Loading