Skip to content

Commit

Permalink
Hollow Knight: Add additional DeathLink option and add ExtraPlatforms…
Browse files Browse the repository at this point in the history
… option. (ArchipelagoMW#2545)
  • Loading branch information
ThePhar authored and Jouramie committed Feb 28, 2024
1 parent 403b35e commit 7ce4374
Showing 1 changed file with 30 additions and 17 deletions.
47 changes: 30 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,34 @@ 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, it acts like shadeless.
* This option has no effect if DeathLink is disabled.
** Self-death shade behavior is not changed; if a self-death normally creates a shade in vanilla, it will override
your existing shade, if any.
"""
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.
* This option has no effect if DeathLink is disabled.
** Self-death fragile charm behavior is not changed; if a self-death normally breaks fragile charms in vanilla, it
will continue to do so.
"""


class StartingGeo(Range):
Expand Down Expand Up @@ -476,7 +488,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 +501,7 @@ class CostSanityHybridChance(Range):
LegEaterShopSlots, GrubfatherRewardSlots,
SeerRewardSlots, ExtraShopSlots,
SplitCrystalHeart, SplitMothwingCloak, SplitMantisClaw,
CostSanity, CostSanityHybridChance,
CostSanity, CostSanityHybridChance
)
},
**cost_sanity_weights
Expand Down

0 comments on commit 7ce4374

Please sign in to comment.