From 7a6aef03e7e6da9a322535905674feefdb559f87 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 8 Apr 2022 19:22:50 +0200 Subject: [PATCH] HK: Charm costs in spoiler log now with charm name. --- worlds/hk/Charms.py | 47 +++++++++++++++++++++++++++++++++++++++++++ worlds/hk/Options.py | 4 ++-- worlds/hk/__init__.py | 5 +++-- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 worlds/hk/Charms.py diff --git a/worlds/hk/Charms.py b/worlds/hk/Charms.py new file mode 100644 index 00000000..45dba01d --- /dev/null +++ b/worlds/hk/Charms.py @@ -0,0 +1,47 @@ +import typing + +vanilla_costs: typing.List[int] = [1, 1, 1, 2, 2, 2, 3, 2, 3, 1, 3, 1, 3, 1, 2, 2, 1, 2, 3, 2, + 4, 2, 2, 2, 3, 1, 4, 2, 4, 1, 2, 3, 2, 4, 3, 5, 1, 3, 2, 2] + +names: typing.List[str] = [ + "Gathering Swarm", + "Wayward Compass", + "Grubsong", + "Stalwart Shell", + "Baldur Shell", + "Fury of the Fallen", + "Quick Focus", + "Lifeblood Heart", + "Lifeblood Core", + "Defender's Crest", + "Flukenest", + "Thorns of Agony", + "Mark of Pride", + "Steady Body", + "Heavy Blow", + "Sharp Shadow", + "Spore Shroom", + "Longnail", + "Shaman Stone", + "Soul Catcher", + "Soul Eater", + "Glowing Womb", + "Fragile Heart", + "Fragile Greed", + "Fragile Strength", + "Nailmaster's Glory", + "Joni's Blessing", + "Shape of Unn", + "Hiveblood", + "Dream Wielder", + "Dashmaster", + "Quick Slash", + "Spell Twister", + "Deep Focus", + "Grubberfly's Elegy", + "Kingsoul", + "Sprintmaster", + "Dreamshield", + "Weaversong", + "Grimmchild" +] diff --git a/worlds/hk/Options.py b/worlds/hk/Options.py index c7a4ff6e..1b927325 100644 --- a/worlds/hk/Options.py +++ b/worlds/hk/Options.py @@ -1,6 +1,7 @@ import typing from .ExtractedData import logic_options, starts, pool_options from Options import Option, DefaultOnToggle, Toggle, Choice, Range +from .Charms import vanilla_costs class Disabled(Toggle): @@ -208,8 +209,7 @@ class RandomCharmCosts(Range): range_start = -1 range_end = 240 default = -1 - vanilla_costs: typing.List[int] = [1, 1, 1, 2, 2, 2, 3, 2, 3, 1, 3, 1, 3, 1, 2, 2, 1, 2, 3, 2, - 4, 2, 2, 2, 3, 1, 4, 2, 4, 1, 2, 3, 2, 4, 3, 5, 1, 3, 2, 2] + vanilla_costs: typing.List[int] = vanilla_costs charm_count: int = len(vanilla_costs) def get_costs(self, random_source) -> typing.List[int]: diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 47d51e09..bdc86b25 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -12,6 +12,7 @@ from .Rules import set_rules from .Options import hollow_knight_options, hollow_knight_randomize_options, disabled from .ExtractedData import locations, starts, multi_locations, location_to_region_lookup, \ event_names, item_effects, connectors, one_ways +from .Charms import names as charm_names from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType from ..AutoWorld import World, LogicMixin @@ -280,8 +281,8 @@ class HKWorld(World): name = world.get_player_name(player) spoiler_handle.write(f'\n{name}\n') hk_world: HKWorld = world.worlds[player] - for charm_number, cost in enumerate(hk_world.charm_costs, start=1): - spoiler_handle.write(f"\n{charm_number}: {cost}") + for charm_number, cost in enumerate(hk_world.charm_costs): + spoiler_handle.write(f"\n{charm_names[charm_number]}: {cost}") spoiler_handle.write('\n\nShop Prices:') for player in hk_players: