HK: plando charm cost (#431)

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

* HK: Allow Plando Charm costs

* HK: skip unnecessary checks
https://github.com/ArchipelagoMW/Archipelago/pull/431#discussion_r847804916
This commit is contained in:
Fabian Dill
2022-04-12 17:13:52 +02:00
committed by GitHub
parent 618bdfc917
commit a4daa78c0b
3 changed files with 28 additions and 6 deletions

View File

@@ -121,7 +121,8 @@ class HKWorld(World):
def generate_early(self):
world = self.world
self.charm_costs = world.RandomCharmCosts[self.player].get_costs(world.random)
charm_costs = world.RandomCharmCosts[self.player].get_costs(world.random)
self.charm_costs = world.PlandoCharmCosts[self.player].get_costs(charm_costs)
world.exclude_locations[self.player].value.update(white_palace_locations)
world.local_items[self.player].value.add("Mimic_Grub")
for vendor, unit in self.shops.items():
@@ -217,7 +218,12 @@ class HKWorld(World):
options = slot_data["options"] = {}
for option_name in self.options:
option = getattr(self.world, option_name)[self.player]
options[option_name] = int(option.value)
try:
optionvalue = int(option.value)
except TypeError:
pass # C# side is currently typed as dict[str, int], drop what doesn't fit
else:
options[option_name] = optionvalue
# 32 bit int
slot_data["seed"] = self.world.slot_seeds[self.player].randint(-2147483647, 2147483646)