Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer song and sometimes hints #2058

Merged
merged 6 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions HintList.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,20 +525,20 @@ def tokens_required_by_settings(world: World) -> int:
'ZR Frogs Ocarina Game': (["an #amphibian feast# yields", "the #croaking choir's magnum opus# awards", "the #froggy finale# yields"], "the final reward from the #Frogs of Zora's River# is", ['overworld', 'sometimes']),
'KF Links House Cow': ("the #bovine bounty of a horseback hustle# gifts", "#Malon's obstacle course# leads to", 'always'),

'Song from Ocarina of Time': ("the #Ocarina of Time# teaches", None, ['song', 'sometimes']),
'Song from Royal Familys Tomb': (["#ReDead in the royal tomb# guard", "the #Composer Brothers wrote#"], None, ['song', 'sometimes']),
'Sheik in Forest': ("#in a meadow# Sheik teaches", None, ['song', 'sometimes']),
'Sheik at Temple': ("Sheik waits at a #monument to time# to teach", None, ['song', 'sometimes']),
'Sheik in Crater': ("the #crater's melody# is", None, ['song', 'sometimes']),
'Sheik in Ice Cavern': ("the #frozen cavern# echoes with", None, ['song', 'sometimes']),
'Sheik in Kakariko': ("a #ravaged village# mourns with", None, ['song', 'sometimes']),
'Sheik at Colossus': ("a hero ventures #beyond the wasteland# to learn", None, ['song', 'sometimes']),
'Song from Ocarina of Time': ("the #Ocarina of Time# teaches", "the #song# taught by the #Ocarina of Time# is", ['song', 'sometimes']),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'Song from Royal Familys Tomb': (["#ReDead in the royal tomb# guard", "the #Composer Brothers wrote#"], "the #song# written in the #royal tomb# is", ['song', 'sometimes']),
'Sheik in Forest': ("#in a meadow# Sheik teaches", "the #song# Sheik teaches in #Sacred Forest Meadow# is", ['song', 'sometimes']),
'Sheik at Temple': ("Sheik waits at a #monument to time# to teach", "the #song# Sheik teaches in #Temple of Time# is", ['song', 'sometimes']),
'Sheik in Crater': ("the #crater's melody# is", "the #song# Sheik teaches in #Death Mountain Crater# is", ['song', 'sometimes']),
'Sheik in Ice Cavern': ("the #frozen cavern# echoes with", "the #song# Sheik teaches in #Ice Cavern# is", ['song', 'sometimes']),
'Sheik in Kakariko': ("a #ravaged village# mourns with", "the #song# Sheik teaches in #Kakariko Village# is", ['song', 'sometimes']),
'Sheik at Colossus': ("a hero ventures #beyond the wasteland# to learn", "the #song# Sheik teaches in #Desert Colossus# is", ['song', 'sometimes']),

'Market 10 Big Poes': ("#ghost hunters# will be rewarded with", "catching #Big Poes# leads to", ['overworld', 'sometimes']),
'Deku Theater Skull Mask': ("the #Skull Mask# yields", None, ['overworld', 'sometimes']),
'Deku Theater Mask of Truth': ("showing a #truthful eye to the crowd# rewards", "the #Mask of Truth# yields", ['overworld', 'sometimes']),
'HF Ocarina of Time Item': ("the #treasure thrown by Princess Zelda# is", None, ['overworld', 'sometimes']),
'DMT Biggoron': ("#Biggoron# crafts", None, ['overworld', 'sometimes']),
'DMT Biggoron': ("#Biggoron# crafts", "showing the #Claim Check to Biggoron# rewards", ['overworld', 'sometimes']),
'Kak 50 Gold Skulltula Reward': (["#50 bug badges# rewards", "#50 spider souls# yields", "#50 auriferous arachnids# lead to"], "slaying #50 Gold Skulltulas# reveals", ['overworld', 'sometimes']),
'Kak 40 Gold Skulltula Reward': (["#40 bug badges# rewards", "#40 spider souls# yields", "#40 auriferous arachnids# lead to"], "slaying #40 Gold Skulltulas# reveals", ['overworld', 'sometimes']),
'Kak 30 Gold Skulltula Reward': (["#30 bug badges# rewards", "#30 spider souls# yields", "#30 auriferous arachnids# lead to"], "slaying #30 Gold Skulltulas# reveals", ['overworld', 'sometimes']),
Expand All @@ -557,17 +557,17 @@ def tokens_required_by_settings(world: World) -> int:
'HF GS Cow Grotto': ("a #spider behind webs# in a grotto holds", None, ['overworld', 'sometimes']),
'HF Cow Grotto Cow': ("the #cobwebbed cow# gifts", "a #cow behind webs# in a grotto gifts", ['overworld', 'sometimes']),
'ZF GS Hidden Cave': ("a spider high #above the icy waters# holds", None, ['overworld', 'sometimes']),
'Wasteland Chest': (["#deep in the wasteland# is", "beneath #the sands#, flames reveal"], None, ['overworld', 'sometimes']),
'Wasteland Chest': (["#deep in the wasteland# is", "beneath #the sands#, flames reveal"], "a chest spawned by #lighting flames in Haunted Wasteland# contains", ['overworld', 'sometimes']),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'Wasteland GS': ("a #spider in the wasteland# holds", None, ['overworld', 'sometimes']),
'Graveyard Royal Familys Tomb Chest': (["#flames in the royal tomb# reveal", "the #Composer Brothers hid#"], None, ['overworld', 'sometimes']),
'ZF Bottom Freestanding PoH': ("#under the icy waters# lies", None, ['overworld', 'sometimes']),
'GC Pot Freestanding PoH': ("spinning #Goron pottery# contains", None, ['overworld', 'sometimes']),
'Graveyard Royal Familys Tomb Chest': (["#flames in the royal tomb# reveal", "the #Composer Brothers hid#"], "#lighting flames in the royal tomb# rewards", ['overworld', 'sometimes']),
'ZF Bottom Freestanding PoH': ("#under the icy waters# lies", "at the #bottom of the lake in Zora's Fountain# lies", ['overworld', 'sometimes']),
'GC Pot Freestanding PoH': ("spinning #Goron pottery# contains", "putting an explosive in a #happy face Goron Pot# rewards", ['overworld', 'sometimes']),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'ZD King Zora Thawed': ("a #defrosted dignitary# gifts", "unfreezing #King Zora# grants", ['overworld', 'sometimes']),
'DMC Deku Scrub': ("a single #scrub in the crater# sells", None, ['overworld', 'sometimes']),
'DMC GS Crate': ("a spider under a #crate in the crater# holds", None, ['overworld', 'sometimes']),
'LW Target in Woods': ("shooting a #target in the woods# grants", None, ['overworld', 'sometimes']),
'ZR Frogs in the Rain': ("#frogs in a storm# gift", None, ['overworld', 'sometimes']),
'LH Lab Dive': ("a #diving experiment# is rewarded with", None, ['overworld', 'sometimes']),
'ZR Frogs in the Rain': ("#frogs in a storm# gift", "playing #Song of Storms to Frogs# rewards", ['overworld', 'sometimes']),
'LH Lab Dive': ("a #diving experiment# is rewarded with", "a #lakeside lab diving experiment# rewards", ['overworld', 'sometimes']),
'HC Great Fairy Reward': ("the #fairy of fire# holds", "a #fairy outside Hyrule Castle# holds", ['overworld', 'sometimes']),
'OGC Great Fairy Reward': ("the #fairy of strength# holds", "a #fairy outside Ganon's Castle# holds", ['overworld', 'sometimes']),

Expand All @@ -589,17 +589,17 @@ def tokens_required_by_settings(world: World) -> int:
'Water Temple MQ Freestanding Key': ("hidden in a #box under the lake# lies", "hidden in a #box in the Water Temple# lies", ['dungeon', 'sometimes']),
'Water Temple MQ GS Freestanding Key Area': ("the #locked spider under the lake# holds", "the #locked spider in the Water Temple# holds", ['dungeon', 'sometimes']),
'Water Temple MQ GS Triple Wall Torch': ("a spider behind a #gate under the lake# holds", "a spider behind a #gate in the Water Temple# holds", ['dungeon', 'sometimes']),
'Gerudo Training Ground Underwater Silver Rupee Chest': (["those who seek #sunken silver rupees# will find", "the #thieves' underwater training# rewards"], None, ['dungeon', 'sometimes']),
'Gerudo Training Ground MQ Underwater Silver Rupee Chest': (["those who seek #sunken silver rupees# will find", "the #thieves' underwater training# rewards"], None, ['dungeon', 'sometimes']),
'Gerudo Training Ground Maze Path Final Chest': ("the final prize of #the thieves' training# is", None, ['dungeon', 'sometimes']),
'Gerudo Training Ground MQ Ice Arrows Chest': ("the final prize of #the thieves' training# is", None, ['dungeon', 'sometimes']),
'Gerudo Training Ground Underwater Silver Rupee Chest': (["those who seek #sunken silver rupees# will find", "the #thieves' underwater training# rewards"], "obtaining #silver rupees drowned in Gerudo Training Grounds# rewards", ['dungeon', 'sometimes']),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'Gerudo Training Ground MQ Underwater Silver Rupee Chest': (["those who seek #sunken silver rupees# will find", "the #thieves' underwater training# rewards"], "obtaining #silver rupees drowned in Gerudo Training Grounds# rewards", ['dungeon', 'sometimes']),
'Gerudo Training Ground Maze Path Final Chest': ("the final prize of #the thieves' training# is", "#Gerudo Training Grounds' final reward# contains", ['dungeon', 'sometimes']),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'Gerudo Training Ground MQ Ice Arrows Chest': ("the final prize of #the thieves' training# is", "#Gerudo Training Grounds' final reward# contains", ['dungeon', 'sometimes']),
'Spirit Temple Silver Gauntlets Chest': ("the treasure #sought by Nabooru# is", "upon the #Colossus's right hand# is", ['dungeon', 'sometimes']),
'Spirit Temple Mirror Shield Chest': ("upon the #Colossus's left hand# is", None, ['dungeon', 'sometimes']),
'Spirit Temple MQ Child Hammer Switch Chest': ("a #temporal paradox in the Colossus# yields", "a #temporal paradox in the Spirit Temple# yields", ['dungeon', 'sometimes']),
'Spirit Temple MQ Symphony Room Chest': ("a #symphony in the Colossus# yields", "a #symphony in the Spirit Temple# yields", ['dungeon', 'sometimes']),
'Spirit Temple MQ GS Symphony Room': ("a #spider's symphony in the Colossus# yields", "a #spider's symphony in the Spirit Temple# yields", ['dungeon', 'sometimes']),
'Shadow Temple Freestanding Key': ("a #burning skull in the house of the dead# holds", "a #giant pot in the Shadow Temple# holds", ['dungeon', 'sometimes']),
'Shadow Temple MQ Bomb Flower Chest': ("shadows in an #invisible maze# guard", None, ['dungeon', 'sometimes']),
'Shadow Temple MQ Bomb Flower Chest': ("a #grasping ghoul surrounded by Bomb Flowers# guards", "the #Dead Hand surrounded by Bomb Flowers# guards", ['dungeon', 'sometimes']),
'Shadow Temple MQ Stalfos Room Chest': ("near an #empty pedestal within the house of the dead# lies", "#stalfos in the Shadow Temple# guard", ['dungeon', 'sometimes']),
'Ice Cavern Iron Boots Chest': ("a #monster in a frozen cavern# guards", "the #final treasure of Ice Cavern# is", ['dungeon', 'sometimes']),
'Ice Cavern MQ Iron Boots Chest': ("a #monster in a frozen cavern# guards", "the #final treasure of Ice Cavern# is", ['dungeon', 'sometimes']),
Expand Down Expand Up @@ -901,7 +901,7 @@ def tokens_required_by_settings(world: World) -> int:
'Shadow Temple After Wind Enemy Chest': ("#mummies guarding a ferry# hide", None, 'exclude'),
'Shadow Temple After Wind Hidden Chest': ("#mummies guarding a ferry# hide", None, 'exclude'),
'Shadow Temple Spike Walls Left Chest': ("#walls consumed by a ball of fire# reveal", None, 'exclude'),
'Shadow Temple Invisible Floormaster Chest': ("shadows in an #invisible maze# guard", None, 'exclude'),
'Shadow Temple Invisible Floormaster Chest': ("a #Floormaster in the house of the dead# guards", "a #Floormaster in the Shadow Temple# guards", 'exclude'),
cjohnson57 marked this conversation as resolved.
Show resolved Hide resolved
'Shadow Temple Boss Key Chest': ("#walls consumed by a ball of fire# reveal", None, 'exclude'),

'Shadow Temple MQ Compass Chest': ("the #Eye of Truth# pierces a hall of faces to reveal", None, 'exclude'),
Expand Down
3 changes: 3 additions & 0 deletions Hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ def color_text(gossip_text: GossipText) -> str:
colors = list(gossip_text.colors) if gossip_text.colors is not None else []
color = 'White'

while text.count('#') > 2 * len(colors):
colors[:0] = [colors[0]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be handled in the function generating the hint text for Sometimes hints instead of here, as other text boxes might need a different behavior.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check that out once I have a little more time.
I think it's fine to handle it here to have a default in case we got out of bounds for colors like I accidentally did ; but to also handle it directly in the sometimes themselves for a more controlled concept.

Hard to decide.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a default: It keeps using the last color for extra placeholders. I don't think there's a good reason to change it to behaving this way other than for Sometimes hints.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have a default then i have no objections, i'll change that later.


while '#' in text:
split_text = text.split('#', 2)
if len(colors) > 0:
Expand Down