LttP: convert vendors hint into separate scams option

This commit is contained in:
Fabian Dill 2022-05-28 20:08:06 +02:00
parent 5d3b4c8efd
commit 1a0bfecb5f
2 changed files with 24 additions and 6 deletions

View File

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

View File

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