Skip to content

Commit a549af8

Browse files
author
Zach Parks
authored
Hollow Knight: Add additional DeathLink option and add ExtraPlatforms option. (#2545)
1 parent 4979314 commit a549af8

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

worlds/hk/Options.py

+30-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from .ExtractedData import logic_options, starts, pool_options
33
from .Rules import cost_terms
44

5-
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange
5+
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange, DeathLink
66
from .Charms import vanilla_costs, names as charm_names
77

88
if typing.TYPE_CHECKING:
@@ -402,22 +402,34 @@ class WhitePalace(Choice):
402402
default = 0
403403

404404

405-
class DeathLink(Choice):
406-
"""
407-
When you die, everyone dies. Of course the reverse is true too.
408-
When enabled, choose how incoming deathlinks are handled:
409-
vanilla: DeathLink kills you and is just like any other death. RIP your previous shade and geo.
410-
shadeless: DeathLink kills you, but no shade spawns and no geo is lost. Your previous shade, if any, is untouched.
411-
shade: DeathLink functions like a normal death if you do not already have a shade, shadeless otherwise.
405+
class ExtraPlatforms(DefaultOnToggle):
406+
"""Places additional platforms to make traveling throughout Hallownest more convenient."""
407+
408+
409+
class DeathLinkShade(Choice):
410+
"""Sets whether to create a shade when you are killed by a DeathLink and how to handle your existing shade, if any.
411+
412+
vanilla: DeathLink deaths function like any other death and overrides your existing shade (including geo), if any.
413+
shadeless: DeathLink deaths do not spawn shades. Your existing shade (including geo), if any, is untouched.
414+
shade: DeathLink deaths spawn a shade if you do not have an existing shade. Otherwise, it acts like shadeless.
415+
416+
* This option has no effect if DeathLink is disabled.
417+
** Self-death shade behavior is not changed; if a self-death normally creates a shade in vanilla, it will override
418+
your existing shade, if any.
412419
"""
413-
option_off = 0
414-
alias_no = 0
415-
alias_true = 1
416-
alias_on = 1
417-
alias_yes = 1
420+
option_vanilla = 0
418421
option_shadeless = 1
419-
option_vanilla = 2
420-
option_shade = 3
422+
option_shade = 2
423+
default = 2
424+
425+
426+
class DeathLinkBreaksFragileCharms(Toggle):
427+
"""Sets if fragile charms break when you are killed by a DeathLink.
428+
429+
* This option has no effect if DeathLink is disabled.
430+
** Self-death fragile charm behavior is not changed; if a self-death normally breaks fragile charms in vanilla, it
431+
will continue to do so.
432+
"""
421433

422434

423435
class StartingGeo(Range):
@@ -476,7 +488,8 @@ class CostSanityHybridChance(Range):
476488
**{
477489
option.__name__: option
478490
for option in (
479-
StartLocation, Goal, WhitePalace, StartingGeo, DeathLink,
491+
StartLocation, Goal, WhitePalace, ExtraPlatforms, StartingGeo,
492+
DeathLink, DeathLinkShade, DeathLinkBreaksFragileCharms,
480493
MinimumGeoPrice, MaximumGeoPrice,
481494
MinimumGrubPrice, MaximumGrubPrice,
482495
MinimumEssencePrice, MaximumEssencePrice,
@@ -488,7 +501,7 @@ class CostSanityHybridChance(Range):
488501
LegEaterShopSlots, GrubfatherRewardSlots,
489502
SeerRewardSlots, ExtraShopSlots,
490503
SplitCrystalHeart, SplitMothwingCloak, SplitMantisClaw,
491-
CostSanity, CostSanityHybridChance,
504+
CostSanity, CostSanityHybridChance
492505
)
493506
},
494507
**cost_sanity_weights

0 commit comments

Comments
 (0)