From 1a0bfecb5f5bcdcd9a7d39540ddff9388c779598 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 28 May 2022 20:08:06 +0200 Subject: [PATCH] LttP: convert vendors hint into separate scams option --- worlds/alttp/Options.py | 21 ++++++++++++++++++--- worlds/alttp/Rom.py | 9 ++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/worlds/alttp/Options.py b/worlds/alttp/Options.py index ca2772fa..6d741b76 100644 --- a/worlds/alttp/Options.py +++ b/worlds/alttp/Options.py @@ -159,11 +159,9 @@ class RestrictBossItem(Toggle): class Hints(Choice): - """Vendors: King Zora and Bottle Merchant say what they're selling. - On/Full: Put item and entrance placement hints on telepathic tiles and some NPCs, Full removes joke hints.""" + """On/Full: Put item and entrance placement hints on telepathic tiles and some NPCs, Full removes joke hints.""" display_name = "Hints" option_off = 0 - option_vendors = 1 option_on = 2 option_full = 3 default = 2 @@ -171,6 +169,22 @@ class Hints(Choice): alias_true = 2 +class Scams(Choice): + """If on, these Merchants will no longer tell you what they're selling.""" + display_name = "Scams" + option_off = 0 + option_king_zora = 1 + option_bottle_merchant = 2 + option_all = 3 + alias_false = 0 + + def gives_king_zora_hint(self): + return self.value in {0, 2} + + def gives_bottle_merchant_hint(self): + return self.value in {0, 1} + + class EnemyShuffle(Toggle): """Randomize every enemy spawn. If mode is Standard, Hyrule Castle is left out (may result in visually wrong enemy sprites in that area.)""" @@ -318,6 +332,7 @@ alttp_options: typing.Dict[str, type(Option)] = { "swordless": Swordless, "retro": Retro, "hints": Hints, + "scams": Scams, "restrict_dungeon_item_on_boss": RestrictBossItem, "pot_shuffle": PotShuffle, "enemy_shuffle": EnemyShuffle, diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index f6b3768d..c4e1cd64 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -2120,16 +2120,19 @@ def write_strings(rom, world, player): hint += f" for {world.player_name[dest.player]}" return hint - # For hints, first we write hints about entrances, some from the inconvenient list others from all reasonable entrances. - if world.hints[player]: + if world.scams[player].gives_king_zora_hint: # Zora hint zora_location = world.get_location("King Zora", player) tt['zora_tells_cost'] = f"You got 500 rupees to buy {hint_text(zora_location.item)}" \ f"\n ≥ Duh\n Oh carp\n{{CHOICE}}" + if world.scams[player].gives_bottle_merchant_hint: # Bottle Vendor hint vendor_location = world.get_location("Bottle Merchant", player) tt['bottle_vendor_choice'] = f"I gots {hint_text(vendor_location.item)}\nYous gots 100 rupees?" \ f"\n ≥ I want\n no way!\n{{CHOICE}}" + + # First we write hints about entrances, some from the inconvenient list others from all reasonable entrances. + if world.hints[player]: if world.hints[player].value >= 2: if world.hints[player] == "full": tt['sign_north_of_links_house'] = '> Randomizer The telepathic tiles have hints!' @@ -2280,7 +2283,7 @@ def write_strings(rom, world, player): items_to_hint |= item_name_groups["Big Keys"] if world.hints[player] == "full": - hint_count = len(hint_locations) # fill all remaining hint locations with Item hints. + hint_count = len(hint_locations) # fill all remaining hint locations with Item hints. else: hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull', 'dungeonscrossed'] else 8