def buildAltarHints(world, messages, include_rewards=True): # text that appears at altar as a child. child_text = '\x08' if include_rewards: bossRewardsSpiritualStones = [ ('Kokiri Emerald', 'Green'), ('Goron Ruby', 'Red'), ('Zora Sapphire', 'Blue'), ] child_text += getHint('Spiritual Stone Text Start', world.clearer_hints).text + '\x04' for (reward, color) in bossRewardsSpiritualStones: child_text += buildBossString(reward, color, world) child_text += getHint('Child Altar Text End', world.clearer_hints).text child_text += '\x0B' update_message_by_id(messages, 0x707A, get_raw_text(child_text), 0x20) # text that appears at altar as an adult. adult_text = '\x08' adult_text += getHint('Adult Altar Text Start', world.clearer_hints).text + '\x04' if include_rewards: bossRewardsMedallions = [ ('Light Medallion', 'Light Blue'), ('Forest Medallion', 'Green'), ('Fire Medallion', 'Red'), ('Water Medallion', 'Blue'), ('Shadow Medallion', 'Pink'), ('Spirit Medallion', 'Yellow'), ] for (reward, color) in bossRewardsMedallions: adult_text += buildBossString(reward, color, world) adult_text += buildBridgeReqsString(world) adult_text += '\x04' adult_text += buildGanonBossKeyString(world) adult_text += '\x0B' update_message_by_id(messages, 0x7057, get_raw_text(adult_text), 0x20)
def buildBossRewardHints(world, messages): # text that appears at altar as a child. bossRewardsSpiritualStones = [ ('Kokiri Emerald', 'Green'), ('Goron Ruby', 'Red'), ('Zora Sapphire', 'Blue'), ] child_text = '\x08' child_text += getHint('Spiritual Stone Text Start', world.clearer_hints).text for (reward, color) in bossRewardsSpiritualStones: child_text += buildBossString(reward, color, world) child_text += getHint('Spiritual Stone Text End', world.clearer_hints).text child_text += '\x0B' update_message_by_id(messages, 0x707A, get_raw_text(child_text), 0x20) # text that appears at altar as an adult. bossRewardsMedallions = [ ('Light Medallion', 'Light Blue'), ('Forest Medallion', 'Green'), ('Fire Medallion', 'Red'), ('Water Medallion', 'Blue'), ('Shadow Medallion', 'Pink'), ('Spirit Medallion', 'Yellow'), ] adult_text = '\x08' adult_text += getHint('Medallion Text Start', world.clearer_hints).text for (reward, color) in bossRewardsMedallions: adult_text += buildBossString(reward, color, world) adult_text += getHint('Medallion Text End', world.clearer_hints).text adult_text += '\x0B' update_message_by_id(messages, 0x7057, get_raw_text(adult_text), 0x20)
def buildGanonText(world, messages): # empty now unused messages to make space for ganon lines update_message_by_id(messages, 0x70C8, " ") update_message_by_id(messages, 0x70C9, " ") update_message_by_id(messages, 0x70CA, " ") # lines before battle ganonLines = getHintGroup('ganonLine', world) random.shuffle(ganonLines) text = get_raw_text(ganonLines.pop().text) update_message_by_id(messages, 0x70CB, text) # light arrow hint or validation chest item if world.trials == 0: text = get_raw_text(getHint('Light Arrow Location', world.clearer_hints).text) if world.distribution.get_starting_item('Light Arrows') > 0: text += "\x05\x42your pocket\x05\x40" else: location = world.light_arrow_location location_hint = location.hint.replace('Ganon\'s Castle', 'my castle') if world.id != location.world.id: text += "\x05\x42Player %d's\x05\x40 %s" % (location.world.id +1, get_raw_text(location_hint)) else: text += get_raw_text(location_hint) text += '!' else: text = get_raw_text(getHint('Validation Line', world.clearer_hints).text) for location in world.get_filled_locations(): if location.name == 'Ganons Tower Boss Key Chest': text += get_raw_text(getHint(getItemGenericName(location.item), world.clearer_hints).text) text += '!' break update_message_by_id(messages, 0x70CC, text)
def buildGanonText(world, messages): # empty now unused messages to make space for ganon lines update_message_by_id(messages, 0x70C8, " ") update_message_by_id(messages, 0x70C9, " ") update_message_by_id(messages, 0x70CA, " ") # lines before battle ganonLines = getHintGroup('ganonLine', world) random.shuffle(ganonLines) text = get_raw_text(ganonLines.pop().text) update_message_by_id(messages, 0x70CB, text) # light arrow hint or validation chest item text = get_raw_text( getHint('Light Arrow Location', world.clearer_hints).text) if world.distribution.get_starting_item('Light Arrows') > 0: text += "\x05\x42your pocket\x05\x40" else: location = world.light_arrow_location location_hint = get_hint_area(location).replace( 'Ganon\'s Castle', 'my castle') if world.id != location.world.id: text += "\x05\x42Player %d's\x05\x40 %s" % ( location.world.id + 1, get_raw_text(location_hint)) else: text += get_raw_text(location_hint) text += '!' update_message_by_id(messages, 0x70CC, text)
def buildGanonText(world, messages): # empty now unused messages to make space for ganon lines update_message_by_id(messages, 0x70C8, " ") update_message_by_id(messages, 0x70C9, " ") update_message_by_id(messages, 0x70CA, " ") # lines before battle text = '\x08' ganonLines = getHintGroup('ganonLine', world) random.shuffle(ganonLines) text = get_raw_text(ganonLines.pop().text) update_message_by_id(messages, 0x70CB, text) # light arrow hint or validation chest item text = '\x08' if world.trials == 0: for location in world.get_locations(): if location.item.name == 'Light Arrows': text = get_raw_text( getHint('Light Arrow Location', world.clearer_hints).text) location_hint = location.hint.replace('Ganon\'s Castle', 'my castle') text += get_raw_text(location_hint) text += '!' break else: text = get_raw_text( getHint('Validation Line', world.clearer_hints).text) for location in world.get_locations(): if location.name == 'Ganons Tower Boss Key Chest': text += get_raw_text( getHint(getItemGenericName(location.item), world.clearer_hints).text) update_message_by_id(messages, 0x70CC, text)
def buildBossRewardHints(world, messages): bossRewardsSpiritualStones = [ 'Kokiri Emerald', 'Goron Ruby', 'Zora Sapphire' ] bossRewardsMedallions = [ 'Forest Medallion', 'Fire Medallion', 'Water Medallion', 'Shadow Medallion', 'Spirit Medallion', 'Light Medallion' ] # text that appears at altar as a child. text = '\x08' text += get_raw_text( getHint('Spiritual Stone Text Start', world.clearer_hints).text) for reward in bossRewardsSpiritualStones: text += buildBossString(reward, world) text = setRewardColor(text) text += get_raw_text( getHint('Spiritual Stone Text End', world.clearer_hints).text) text += '\x0B' update_message_by_id(messages, 0x707a, text, 0x20) # text that appears at altar as an adult. start = '\x08When evil rules all, an awakening\x01voice from the Sacred Realm will\x01call those destined to be Sages,\x01who dwell in the \x05\x41five temples\x05\x40.\x04' text = '' for reward in bossRewardsMedallions: text += buildBossString(reward, world) text = setRewardColor(text) text += get_raw_text( getHint('Medallion Text End', world.clearer_hints).text) text += '\x0B' update_message_by_id(messages, 0x7057, start + text, 0x20)
def writeGossipStoneHints(spoiler, world, messages): for id, gossip_text in spoiler.hints[world.id].items(): update_message_by_id(messages, id, str(gossip_text), 0x23)
def writeGossipStoneHintsHints(world, messages): for id, text in world.spoiler.hints.items(): update_message_by_id(messages, id, get_raw_text(text))
def update_hint(messages, id, text): update_message_by_id(messages, id, get_raw_text(text))