HK: Charm costs in spoiler log now with charm name.

This commit is contained in:
Fabian Dill 2022-04-08 19:22:50 +02:00 committed by Fabian Dill
parent c61f3b9110
commit 7a6aef03e7
3 changed files with 52 additions and 4 deletions

47
worlds/hk/Charms.py Normal file
View File

@ -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"
]

View File

@ -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]:

View File

@ -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: