From 84efec9e2e9690fd595853843052bdc94b2f001e Mon Sep 17 00:00:00 2001 From: qwint Date: Mon, 4 Mar 2024 22:19:11 -0600 Subject: [PATCH] Add Option to go back to fully AP items for one-slot co-op --- worlds/hk/Options.py | 6 +++++- worlds/hk/__init__.py | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/worlds/hk/Options.py b/worlds/hk/Options.py index ef7fbd0dfef6..4538e4279204 100644 --- a/worlds/hk/Options.py +++ b/worlds/hk/Options.py @@ -406,6 +406,10 @@ class ExtraPlatforms(DefaultOnToggle): """Places additional platforms to make traveling throughout Hallownest more convenient.""" +class SharedItems(Toggle): + """Places all Vanilla items as AP Items so they can be shared within one slot. This will inflate hint prices.""" + + class DeathLinkShade(Choice): """Sets whether to create a shade when you are killed by a DeathLink and how to handle your existing shade, if any. @@ -488,7 +492,7 @@ class CostSanityHybridChance(Range): **{ option.__name__: option for option in ( - StartLocation, Goal, WhitePalace, ExtraPlatforms, StartingGeo, + StartLocation, Goal, WhitePalace, ExtraPlatforms, SharedItems, StartingGeo, DeathLink, DeathLinkShade, DeathLinkBreaksFragileCharms, MinimumGeoPrice, MaximumGeoPrice, MinimumGrubPrice, MaximumGrubPrice, diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 48e0f266726d..af9f8d101b82 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -252,7 +252,7 @@ def _add(item_name: str, location_name: str, randomized: bool): if item_name in junk_replace: item_name = self.get_filler_item_name() - item = self.create_item(item_name) if not vanilla or location_name == "Start" else self.create_event(item_name) + item = self.create_item(item_name) if not vanilla or location_name == "Start" or self.multiworld.SharedItems[self.player] else self.create_event(item_name) if location_name == "Start": if item_name in randomized_starting_items: @@ -277,7 +277,7 @@ def _add(item_name: str, location_name: str, randomized: bool): for option_key, option in hollow_knight_randomize_options.items(): randomized = getattr(self.multiworld, option_key)[self.player] - if randomized or option_key not in logicless_options: + if randomized or option_key not in logicless_options or self.multiworld.SharedItems[self.player]: for item_name, location_name in zip(option.items, option.locations): if item_name in junk_replace: item_name = self.get_filler_item_name() @@ -502,7 +502,7 @@ def create_location(self, name: str, vanilla=False) -> HKLocation: region = self.multiworld.get_region("Menu", self.player) - if vanilla: + if vanilla and not self.multiworld.SharedItems[self.player]: loc = HKLocation(self.player, name, None, region, costs=costs, vanilla=vanilla, basename=basename)