Skip to content

Commit

Permalink
Add Option to go back to fully AP items for one-slot co-op
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Mar 5, 2024
1 parent 9f5ebd8 commit 84efec9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion worlds/hk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions worlds/hk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 84efec9

Please sign in to comment.