|
11 | 11 | from .Items import item_table, lookup_type_to_names, item_name_groups
|
12 | 12 | from .Regions import create_regions
|
13 | 13 | from .Rules import set_rules, cost_terms
|
14 |
| -from .Options import hollow_knight_options, hollow_knight_randomize_options, Goal, WhitePalace, \ |
| 14 | +from .Options import hollow_knight_options, hollow_knight_randomize_options, Goal, WhitePalace, CostSanity, \ |
15 | 15 | shop_to_option
|
16 | 16 | from .ExtractedData import locations, starts, multi_locations, location_to_region_lookup, \
|
17 | 17 | event_names, item_effects, connectors, one_ways, vanilla_shop_costs, vanilla_location_costs
|
@@ -339,7 +339,8 @@ def sort_shops_by_cost(self):
|
339 | 339 | loc.costs = costs
|
340 | 340 |
|
341 | 341 | def apply_costsanity(self):
|
342 |
| - if not self.world.CostSanity[self.player].value: |
| 342 | + setting = self.world.CostSanity[self.player].value |
| 343 | + if not setting: |
343 | 344 | return # noop
|
344 | 345 |
|
345 | 346 | def _compute_weights(weights: dict, desc: str) -> typing.Dict[str, int]:
|
@@ -382,7 +383,10 @@ def _compute_weights(weights: dict, desc: str) -> typing.Dict[str, int]:
|
382 | 383 | continue
|
383 | 384 | if location.name == "Vessel_Fragment-Basin":
|
384 | 385 | continue
|
385 |
| - |
| 386 | + if setting == CostSanity.option_notshops and location.basename in multi_locations: |
| 387 | + continue |
| 388 | + if setting == CostSanity.option_shopsonly and location.basename not in multi_locations: |
| 389 | + continue |
386 | 390 | if location.basename in {'Grubfather', 'Seer', 'Eggshop'}:
|
387 | 391 | our_weights = dict(weights_geoless)
|
388 | 392 | else:
|
|
0 commit comments