LttP: when generating hint tiles, no longer consider Single Arrow as useful, but do consider all varieties of Bow. Additionally, don't create hints for Universal Small Keys
This commit is contained in:
parent
29ba1d4809
commit
60379d9ae6
|
@ -42,6 +42,11 @@ class DungeonItem(Choice):
|
||||||
def in_dungeon(self):
|
def in_dungeon(self):
|
||||||
return self.value in {0, 1}
|
return self.value in {0, 1}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hints_useful(self):
|
||||||
|
"""Indicates if hints for this Item are useful in any way."""
|
||||||
|
return self.value in {1, 2, 3, 4}
|
||||||
|
|
||||||
|
|
||||||
class bigkey_shuffle(DungeonItem):
|
class bigkey_shuffle(DungeonItem):
|
||||||
"""Big Key Placement"""
|
"""Big Key Placement"""
|
||||||
|
|
|
@ -35,7 +35,7 @@ from worlds.alttp.Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts
|
||||||
LostWoods_texts, WishingWell_texts, DesertPalace_texts, MountainTower_texts, LinksHouse_texts, Lumberjacks_texts, \
|
LostWoods_texts, WishingWell_texts, DesertPalace_texts, MountainTower_texts, LinksHouse_texts, Lumberjacks_texts, \
|
||||||
SickKid_texts, FluteBoy_texts, Zora_texts, MagicShop_texts, Sahasrahla_names
|
SickKid_texts, FluteBoy_texts, Zora_texts, MagicShop_texts, Sahasrahla_names
|
||||||
from Utils import local_path, int16_as_bytes, int32_as_bytes, snes_to_pc, is_frozen
|
from Utils import local_path, int16_as_bytes, int32_as_bytes, snes_to_pc, is_frozen
|
||||||
from worlds.alttp.Items import ItemFactory, item_table
|
from worlds.alttp.Items import ItemFactory, item_table, item_name_groups, progression_items
|
||||||
from worlds.alttp.EntranceShuffle import door_addresses
|
from worlds.alttp.EntranceShuffle import door_addresses
|
||||||
from worlds.alttp.Options import smallkey_shuffle
|
from worlds.alttp.Options import smallkey_shuffle
|
||||||
import Patch
|
import Patch
|
||||||
|
@ -2271,13 +2271,13 @@ def write_strings(rom, world, player):
|
||||||
this_hint = location + ' contains ' + hint_text(world.get_location(location, player).item) + '.'
|
this_hint = location + ' contains ' + hint_text(world.get_location(location, player).item) + '.'
|
||||||
tt[hint_locations.pop(0)] = this_hint
|
tt[hint_locations.pop(0)] = this_hint
|
||||||
|
|
||||||
# Lastly we write hints to show where certain interesting items are. It is done the way it is to re-use the silver code and also to give one hint per each type of item regardless of how many exist. This supports many settings well.
|
# Lastly we write hints to show where certain interesting items are.
|
||||||
items_to_hint = RelevantItems.copy()
|
items_to_hint = RelevantItems.copy()
|
||||||
if world.smallkey_shuffle[player]:
|
if world.smallkey_shuffle[player].hints_useful:
|
||||||
items_to_hint.extend(SmallKeys)
|
items_to_hint |= item_name_groups["Small Keys"]
|
||||||
if world.bigkey_shuffle[player]:
|
if world.bigkey_shuffle[player].hints_useful:
|
||||||
items_to_hint.extend(BigKeys)
|
items_to_hint |= item_name_groups["Big Keys"]
|
||||||
local_random.shuffle(items_to_hint)
|
|
||||||
if world.hints[player] == "full":
|
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:
|
else:
|
||||||
|
@ -2285,7 +2285,7 @@ def write_strings(rom, world, player):
|
||||||
'dungeonscrossed'] else 8
|
'dungeonscrossed'] else 8
|
||||||
hint_count = min(hint_count, len(items_to_hint), len(hint_locations))
|
hint_count = min(hint_count, len(items_to_hint), len(hint_locations))
|
||||||
if hint_count:
|
if hint_count:
|
||||||
locations = world.find_items_in_locations(set(items_to_hint), player)
|
locations = world.find_items_in_locations(items_to_hint, player)
|
||||||
local_random.shuffle(locations)
|
local_random.shuffle(locations)
|
||||||
for x in range(min(hint_count, len(locations))):
|
for x in range(min(hint_count, len(locations))):
|
||||||
this_location = locations.pop()
|
this_location = locations.pop()
|
||||||
|
@ -2873,88 +2873,10 @@ InconvenientLocations = ['Spike Cave',
|
||||||
InconvenientVanillaLocations = ['Graveyard Cave',
|
InconvenientVanillaLocations = ['Graveyard Cave',
|
||||||
'Mimic Cave']
|
'Mimic Cave']
|
||||||
|
|
||||||
RelevantItems = ['Bow',
|
|
||||||
'Progressive Bow',
|
|
||||||
'Book of Mudora',
|
|
||||||
'Hammer',
|
|
||||||
'Hookshot',
|
|
||||||
'Magic Mirror',
|
|
||||||
'Flute',
|
|
||||||
'Pegasus Boots',
|
|
||||||
'Power Glove',
|
|
||||||
'Cape',
|
|
||||||
'Mushroom',
|
|
||||||
'Shovel',
|
|
||||||
'Lamp',
|
|
||||||
'Magic Powder',
|
|
||||||
'Moon Pearl',
|
|
||||||
'Cane of Somaria',
|
|
||||||
'Fire Rod',
|
|
||||||
'Flippers',
|
|
||||||
'Ice Rod',
|
|
||||||
'Titans Mitts',
|
|
||||||
'Ether',
|
|
||||||
'Bombos',
|
|
||||||
'Quake',
|
|
||||||
'Bottle',
|
|
||||||
'Bottle (Red Potion)',
|
|
||||||
'Bottle (Green Potion)',
|
|
||||||
'Bottle (Blue Potion)',
|
|
||||||
'Bottle (Fairy)',
|
|
||||||
'Bottle (Bee)',
|
|
||||||
'Bottle (Good Bee)',
|
|
||||||
'Master Sword',
|
|
||||||
'Tempered Sword',
|
|
||||||
'Fighter Sword',
|
|
||||||
'Golden Sword',
|
|
||||||
'Progressive Sword',
|
|
||||||
'Progressive Glove',
|
|
||||||
'Master Sword',
|
|
||||||
'Power Star',
|
|
||||||
'Triforce Piece',
|
|
||||||
'Single Arrow',
|
|
||||||
'Blue Mail',
|
|
||||||
'Red Mail',
|
|
||||||
'Progressive Mail',
|
|
||||||
'Blue Boomerang',
|
|
||||||
'Red Boomerang',
|
|
||||||
'Blue Shield',
|
|
||||||
'Red Shield',
|
|
||||||
'Mirror Shield',
|
|
||||||
'Progressive Shield',
|
|
||||||
'Bug Catching Net',
|
|
||||||
'Cane of Byrna',
|
|
||||||
'Magic Upgrade (1/2)',
|
|
||||||
'Magic Upgrade (1/4)'
|
|
||||||
]
|
|
||||||
|
|
||||||
SmallKeys = ['Small Key (Eastern Palace)',
|
RelevantItems = progression_items - {"Triforce", "Activated Flute"} - item_name_groups["Small Keys"] - item_name_groups["Big Keys"] \
|
||||||
'Small Key (Hyrule Castle)',
|
| item_name_groups["Mails"] | item_name_groups["Shields"]
|
||||||
'Small Key (Desert Palace)',
|
|
||||||
'Small Key (Tower of Hera)',
|
|
||||||
'Small Key (Agahnims Tower)',
|
|
||||||
'Small Key (Palace of Darkness)',
|
|
||||||
'Small Key (Thieves Town)',
|
|
||||||
'Small Key (Swamp Palace)',
|
|
||||||
'Small Key (Skull Woods)',
|
|
||||||
'Small Key (Ice Palace)',
|
|
||||||
'Small Key (Misery Mire)',
|
|
||||||
'Small Key (Turtle Rock)',
|
|
||||||
'Small Key (Ganons Tower)',
|
|
||||||
]
|
|
||||||
|
|
||||||
BigKeys = ['Big Key (Eastern Palace)',
|
|
||||||
'Big Key (Desert Palace)',
|
|
||||||
'Big Key (Tower of Hera)',
|
|
||||||
'Big Key (Palace of Darkness)',
|
|
||||||
'Big Key (Thieves Town)',
|
|
||||||
'Big Key (Swamp Palace)',
|
|
||||||
'Big Key (Skull Woods)',
|
|
||||||
'Big Key (Ice Palace)',
|
|
||||||
'Big Key (Misery Mire)',
|
|
||||||
'Big Key (Turtle Rock)',
|
|
||||||
'Big Key (Ganons Tower)'
|
|
||||||
]
|
|
||||||
|
|
||||||
hash_alphabet = [
|
hash_alphabet = [
|
||||||
"Bow", "Boomerang", "Hookshot", "Bomb", "Mushroom", "Powder", "Rod", "Pendant", "Bombos", "Ether", "Quake",
|
"Bow", "Boomerang", "Hookshot", "Bomb", "Mushroom", "Powder", "Rod", "Pendant", "Bombos", "Ether", "Quake",
|
||||||
|
|
Loading…
Reference in New Issue