Skip to content

Commit

Permalink
Hollow Knight: Break DeathLink options up and add extra platforms opt…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
ThePhar committed Dec 1, 2023
1 parent 80fed1c commit 8765be7
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions worlds/hk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .ExtractedData import logic_options, starts, pool_options
from .Rules import cost_terms

from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange, DeathLink
from .Charms import vanilla_costs, names as charm_names

if typing.TYPE_CHECKING:
Expand Down Expand Up @@ -402,22 +402,30 @@ class WhitePalace(Choice):
default = 0


class DeathLink(Choice):
"""
When you die, everyone dies. Of course the reverse is true too.
When enabled, choose how incoming deathlinks are handled:
vanilla: DeathLink kills you and is just like any other death. RIP your previous shade and geo.
shadeless: DeathLink kills you, but no shade spawns and no geo is lost. Your previous shade, if any, is untouched.
shade: DeathLink functions like a normal death if you do not already have a shade, shadeless otherwise.
class ExtraPlatforms(DefaultOnToggle):
"""Places additional platforms to make traveling throughout Hallownest more convenient."""


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.
vanilla: DeathLink deaths function like any other death and overrides your existing shade (including geo), if any.
shadeless: DeathLink deaths do not spawn shades. Your existing shade (including geo), if any, is untouched.
shade: DeathLink deaths spawn a shade if you do not have an existing shade. Otherwise, acts like shadeless.
* This option has no effect if DeathLink is disabled.
"""
option_off = 0
alias_no = 0
alias_true = 1
alias_on = 1
alias_yes = 1
option_vanilla = 0
option_shadeless = 1
option_vanilla = 2
option_shade = 3
option_shade = 2
default = 2


class DeathLinkBreaksFragileCharms(Toggle):
"""Sets if fragile charms break when you are killed by a DeathLink. All other deaths still break fragile charms.
* This option has no effect if DeathLink is disabled.
"""


class StartingGeo(Range):
Expand Down Expand Up @@ -476,7 +484,8 @@ class CostSanityHybridChance(Range):
**{
option.__name__: option
for option in (
StartLocation, Goal, WhitePalace, StartingGeo, DeathLink,
StartLocation, Goal, WhitePalace, ExtraPlatforms, StartingGeo,
DeathLink, DeathLinkShade, DeathLinkBreaksFragileCharms,
MinimumGeoPrice, MaximumGeoPrice,
MinimumGrubPrice, MaximumGrubPrice,
MinimumEssencePrice, MaximumEssencePrice,
Expand All @@ -488,7 +497,7 @@ class CostSanityHybridChance(Range):
LegEaterShopSlots, GrubfatherRewardSlots,
SeerRewardSlots, ExtraShopSlots,
SplitCrystalHeart, SplitMothwingCloak, SplitMantisClaw,
CostSanity, CostSanityHybridChance,
CostSanity, CostSanityHybridChance
)
},
**cost_sanity_weights
Expand Down

0 comments on commit 8765be7

Please sign in to comment.