Skip to content

Commit 658cd20

Browse files
authored
Merge pull request #85 from Emerassi/v0.4servicing
Moved fix to seperate killbossesmode and shopsanity from v0.4.1 servicing release
2 parents 375f34e + d60043b commit 658cd20

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

worlds/crystal_project/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .items import item_table, optional_scholar_abilities, get_random_starting_jobs, filler_items, \
22
get_item_names_per_category, progressive_equipment, non_progressive_equipment, get_starting_jobs, \
33
set_jobs_at_default_locations, default_starting_job_list, job_list
4-
from .locations import get_locations, get_bosses
4+
from .locations import get_locations, get_bosses, get_shops
55
from .regions import init_areas
66
from .options import CrystalProjectOptions, IncludedRegions
77
from .rules import CrystalProjectLogic
@@ -36,7 +36,9 @@ class CrystalProjectWorld(World):
3636
item_name_to_id = {item: item_table[item].code for item in item_table}
3737
location_name_to_id = {location.name: location.code for location in get_locations(-1, None)}
3838
boss_name_to_id = {boss.name: boss.code for boss in get_bosses(-1, None)}
39-
location_name_to_id.update(boss_name_to_id)
39+
shop_name_to_id = {shop.name: shop.code for shop in get_shops(-1, None)}
40+
location_name_to_id.update(boss_name_to_id)
41+
location_name_to_id.update(shop_name_to_id)
4042
item_name_groups = get_item_names_per_category()
4143
web = CrystalProjectWeb()
4244

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

138+
if self.options.shopsanity:
139+
shops = get_shops(self.player, self.options)
140+
locations.extend(shops)
141+
136142
init_areas(self, locations, self.options)
137143

138144
if self.options.jobRando.value == self.options.jobRando.option_none:

worlds/crystal_project/locations.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,12 @@ def get_bosses(player: Optional[int], options: Optional[CrystalProjectOptions])
13611361
LocationData("The Depths", "The Depths Boss - The Enforcer", 1128 + boss_index_offset),
13621362
LocationData("The Depths", "The Depths Boss - The Peacekeeper", 2579 + boss_index_offset),
13631363
LocationData("The Old World", "The Old World Boss - Periculum", 3650 + boss_index_offset, lambda state: logic.is_area_in_level_range(state, 5)),
1364+
]
1365+
return location_table
13641366

1367+
def get_shops(player: Optional[int], options: Optional[CrystalProjectOptions]) -> List[LocationData]:
1368+
logic = CrystalProjectLogic(player, options)
1369+
location_table: List[LocationData] = [
13651370
#Zones (Beginner)
13661371
#Spawning Meadows
13671372
LocationData("Spawning Meadows", "Spawning Meadows Shop - Nans Knick Knacks 1", 13 + shop_index_offset),

0 commit comments

Comments
 (0)