13 Commits

11 changed files with 62 additions and 46 deletions

View File

@@ -872,7 +872,7 @@ def set_up_shops(world, player):
rss.locked = True
cap_shop = world.get_region('Capacity Upgrade', player).shop
cap_shop.inventory[1] = None # remove arrow capacity upgrades in retro
for shop in random.sample([s for s in world.shops[player] if not s.locked and s.region.player == player], 5):
for shop in random.sample([s for s in world.shops[player] if not s.locked and s.region.name != "Red Shield Shop" and s.region.player == player], 5):
shop.custom = True
shop.locked = True
if retro_bow:

View File

@@ -134,9 +134,9 @@ item_table = {'Bow': (True, False, None, 0x0B, 200, 'Bow!\nJoin the archer class
'Big Key (Agahnims Tower)': (False, False, 'BigKey', 0x9B, 60, 'A big key for\nAgahnim\'s Tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Castle Tower'),
'Compass (Agahnims Tower)': (False, True, 'Compass', 0x8B, 10, 'A compass for\nAgahnim\'s Tower', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds null again', 'a compass to Castle Tower'),
'Map (Agahnims Tower)': (False, True, 'Map', 0x7B, 10, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Castle Tower'),
'Small Key (Palace of Darkness)': (False, False, 'SmallKey', 0xA6, 40, 'A small key for\nDark Palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Palace of Darkness'),
'Big Key (Palace of Darkness)': (False, False, 'BigKey', 0x99, 60, 'A big key for\nDark Palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Palace of Darkness'),
'Compass (Palace of Darkness)': (False, True, 'Compass', 0x89, 10, 'A compass for\nDark Palace', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Palace of Darkness'),
'Small Key (Palace of Darkness)': (False, False, 'SmallKey', 0xA6, 40, 'A small key for\nPalace of Darkness', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Palace of Darkness'),
'Big Key (Palace of Darkness)': (False, False, 'BigKey', 0x99, 60, 'A big key for\nPalace of Darkness', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Palace of Darkness'),
'Compass (Palace of Darkness)': (False, True, 'Compass', 0x89, 10, 'A compass for\nPalace of Darkness', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Palace of Darkness'),
'Map (Palace of Darkness)': (False, True, 'Map', 0x79, 20, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Palace of Darkness'),
'Small Key (Thieves Town)': (False, False, 'SmallKey', 0xAB, 40, 'A small key for\nThieves Town', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Thieves\' Town'),
'Big Key (Thieves Town)': (False, False, 'BigKey', 0x94, 60, 'A big key for\nThieves Town', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Thieves\' Town'),

View File

@@ -509,7 +509,7 @@ boots_clips = [
mirror_clips_local = [
('Desert East Mirror Clip', 'Mire Area', 'Desert Mouth'),
('EDDM Mirror Clip', 'East Dark Death Mountain (Bottom Left)', 'East Dark Death Mountain (Bottom)'),
('EDDM Bridge Mirror Clip', 'East Dark Death Mountain (Bottom Left)', 'East Dark Death Mountain (Bottom)'),
('EDDM Mirror Clip', 'East Dark Death Mountain (Top)', 'Dark Death Mountain Ledge')
]
@@ -520,4 +520,4 @@ mirror_clips = [
mirror_offsets = [
(['DM Offset Mirror', 'DDM Offset Mirror'], ['West Death Mountain (Bottom)', 'West Dark Death Mountain (Bottom)'], ['Hyrule Castle Courtyard Northeast', 'Pyramid Crack'], ['Pyramid Area', 'Hyrule Castle Courtyard']),
(['DM To HC Ledge Offset Mirror', 'DDM To Pyramid Offset Mirror'], ['West Death Mountain (Bottom)', 'West Dark Death Mountain (Bottom)'], ['Hyrule Castle Ledge', 'Pyramid Area'], ['Pyramid Area', 'Hyrule Castle Area'])
]
]

58
Rom.py
View File

@@ -85,7 +85,7 @@ from Utils import int16_as_bytes, int32_as_bytes, local_path, snes_to_pc
from Versions import DRVersion, GKVersion, ORVersion
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '100c3e1da68680a0f3d8e1fc94568de6'
RANDOMIZERBASEHASH = 'abaa7ce289fd18e0ab898f2ca1263db1'
class JsonRom(object):
@@ -948,7 +948,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_byte(cr_pc+0x1e, 0xEE) # slash
rom.write_byte(cr_pc+0x1f, thousands_bot)
# modify stat config
stat_address = 0x23983E
stat_address = 0xA39895
stat_pc = snes_to_pc(stat_address)
rom.write_byte(stat_pc, 0xa9) # change to pos 21 (from b1)
rom.write_byte(stat_pc+2, 0xc0) # change to 12 bits (from a0)
@@ -1007,6 +1007,10 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_bytes(0x6D31B, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
rom.write_bytes(0x6D323, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
bridge_item = world.get_location("Hobo", player).item
if bridge_item is None or not bridge_item.name.startswith("Bottle"):
rom.write_bytes(0x1E9C0, [0xFB, 0xFF, 0x03, 0x00, 0xAB, 0x00, 0x00, 0x00])
# set light cones
if world.dark_rooms[player] == 'no_dark_rooms':
light_cone = 0x20
@@ -1497,37 +1501,40 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
loot_source = 0x09
if world.prizeshuffle[player] != 'none':
loot_source |= 0x10
if world.pottery[player] not in ['none', 'cave']:
if world.pottery[player] != 'none':
loot_source |= 0x02
if world.dropshuffle[player] != 'none':
loot_source |= 0x04
rom.write_byte(0x1CFF10, loot_source)
rom.write_byte(0x1CFF20, loot_source)
if world.loothud[player] == 'never':
rom.write_byte(0x1CFF12, 0x00)
rom.write_bytes(0x1CFF10, [0x00, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF17, 0x00)
elif world.loothud[player] == 'presence':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0x01, 0x01])
rom.write_bytes(0x1CFF10, [0x01, 0x01, 0x00, 0x00])
rom.write_byte(0x1CFF17, 0x01)
elif world.loothud[player] == 'value':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0xFF, 0xFF])
rom.write_bytes(0x1CFF10, [0x03, 0x03, 0x00, 0x00])
rom.write_byte(0x1CFF17, 0x01)
elif world.loothud[player] == 'dungeon_value':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0xFF, 0x01])
rom.write_bytes(0x1CFF10, [0x01, 0x03, 0x00, 0x00])
rom.write_byte(0x1CFF17, 0x01)
elif world.loothud[player] == 'cave_value':
rom.write_bytes(0x1CFF10, [0x03, 0x01, 0x00, 0x00])
rom.write_byte(0x1CFF17, 0x01)
if world.showloot[player] == 'never':
rom.write_bytes(0x1CFF08, [0x00, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF11, 0x00)
rom.write_byte(0x1CFF12, 0x00) # turn off hud icon too just to be safe
rom.write_byte(0x1CFF0F, 0x00)
elif world.showloot[player] == 'presence':
rom.write_bytes(0x1CFF08, [0x01, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF11, 0x00)
rom.write_byte(0x1CFF0F, 0x01)
elif world.showloot[player] == 'compass':
rom.write_bytes(0x1CFF08, [0x01, 0x00, 0x02, 0x00])
rom.write_byte(0x1CFF11, 0x01)
rom.write_bytes(0x1CFF08, [0x02, 0x00, 0x03, 0x00])
rom.write_byte(0x1CFF0F, 0x01)
elif world.showloot[player] == 'always':
rom.write_bytes(0x1CFF08, [0x02, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF11, 0x00)
rom.write_bytes(0x1CFF08, [0x03, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF0F, 0x01)
if world.showmap[player] == 'visited':
rom.write_bytes(0x1CFF00, [0x01, 0x00, 0x00, 0x05])
@@ -1541,7 +1548,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_byte(loot_icons + 0x52, 0x0B) # bomb bag is major
triforce_piece_ids = [0x6B, 0x6C]
if world.treasure_hunt_count[player] > 20:
if world.treasure_hunt_count[player] > 100:
for triforce_piece_id in triforce_piece_ids:
rom.write_byte(loot_icons + triforce_piece_id, 0x04)
@@ -1779,7 +1786,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_byte(0x180358, 0x01 if glitches_enabled else 0x00)
rom.write_byte(0x18008B, 0x01 if glitches_enabled else 0x00)
if uncle_location.item is None or uncle_location.item.name not in ['Sword and Shield']:
if uncle_location.item is None or uncle_location.item.name not in ['Blue Shield', 'Red Shield', 'Mirror Shield', 'Progressive Shield', 'Sword and Shield']:
# remove shield from uncle
rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D25B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
@@ -2485,6 +2492,15 @@ def write_strings(rom, world, player, team, is_mystery=False):
# For hints, first we write hints about entrances, some from the inconvenient list others from all reasonable entrances.
if world.hints[player]:
zoraitem = world.get_location('King Zora', player).item.hint_text
if len(zoraitem) <= 15:
tt['zora_meeting'] = f"Whaddaya want?\n{zoraitem.title()}\n Nothin'{{CHOICE}}"
else:
tt['zora_meeting'] = f"Do you want {zoraitem}?\n ≥ I'll pay\n No thanks{{CHOICE}}"
bottleitem = world.get_location('Bottle Merchant', player).item.hint_text
tt['bottle_vendor_choice'] = f"Do you want {bottleitem}?\n ≥ I'll take it\n No thanks!\n{{CHOICE}}"
tt['sign_north_of_links_house'] = '> Randomizer The telepathic tiles can have hints!'
hint_locations = HintLocations.copy()
random.shuffle(hint_locations)
@@ -2962,7 +2978,7 @@ def write_strings(rom, world, player, team, is_mystery=False):
+ "{PAUSE3} {CHANGEPIC}\nGanon has moved around all the items in Hyrule."
+ "{PAUSE7}\nYou will have to find all the items necessary to achieve your goal."
+ "{PAUSE7}\nThis is your chance to be a hero."
+ "{PAUSE3} {CHANGEPIC}\nYou must determine and achieve your goal."
+ "{PAUSE3} {CHANGEPIC}\nGood luck out there, and try not to die."
+ "{PAUSE9} {CHANGEPIC}", False)
elif world.mode[player] == 'inverted':
tt['intro_main'] = CompressedTextMapper.convert(

35
Text.py
View File

@@ -376,31 +376,30 @@ Sahasrahla_names = [
Kakariko_texts = ["{}'s homecoming"]
Blacksmiths_texts = [
'frogs for bread',
'That\'s not a sword',
'The Rupeesmiths'
] * 1 + [
"the dwarven breadsmiths"
"Frogs for bread",
"That's not a sword",
"The rupeesmiths",
"The dwarven breadsmiths",
]
DeathMountain_texts = [
"the lost old man",
"gary the old man",
"Your ad here"
"The lost old man",
"Gary the old man",
"Your ad here",
]
LostWoods_texts = [
'thieves\' stump',
] * 2 + [
"the forest thief",
"dancing pickles",
"flying crows",
"Thieves' stump",
"Thieves' stump",
"The forest thief",
"Dancing pickles",
"Flying crows",
]
WishingWell_texts = [
"venus. queen of faeries",
"Venus, Queen of Faeries",
"Venus was her name",
"I'm your Venus",
"Yeah, baby, shes got it",
"Yeah, baby, she's got it",
"Venus, I'm your fire",
"Venus, At your desire",
"Venus, at your desire",
"Venus Love Chain",
"Venus Crescent Beam",
]
@@ -1766,7 +1765,7 @@ class TextTable(object):
text['sign_catfish'] = CompressedTextMapper.convert("Toss rocks\nToss items\nToss cookies")
text['sign_north_village_of_outcasts'] = CompressedTextMapper.convert("↑ Skull Woods\n\n↓ Steve's Town")
text['sign_south_of_bumper_cave'] = CompressedTextMapper.convert("\n→ Karkats cave")
text['sign_east_of_pyramid'] = CompressedTextMapper.convert("\n Dark Palace")
text['sign_east_of_pyramid'] = CompressedTextMapper.convert("\n→ Palace of Darkness")
text['sign_east_of_bomb_shop'] = CompressedTextMapper.convert("\n← Bomb Shoppe")
text['sign_east_of_mire'] = CompressedTextMapper.convert("\n← Misery Mire\n no way in.\n no way out.")
text['sign_village_of_outcasts'] = CompressedTextMapper.convert("Have a Trulie Awesome Day!")
@@ -1870,7 +1869,7 @@ class TextTable(object):
# 100
text['dark_sanctuary_no'] = CompressedTextMapper.convert("Then go away!")
text['dark_sanctuary_hint_1'] = CompressedTextMapper.convert("There is a thief in the desert, he can open creepy chests that follow you. But now that we have that out of the way, Do you like my hair? I've spent eons getting it this way.")
text['dark_sanctuary_yes'] = CompressedTextMapper.convert("With Crystals 5&6, you can find a great fairy in the pyramid.\n\nFlomp Flomp, Whizzle Whomp")
text['dark_sanctuary_yes'] = CompressedTextMapper.convert("With crystals 5 and 6, you can find a great fairy in the pyramid.\n\nFlomp Flomp, Whizzle Whomp")
text['dark_sanctuary_hint_2'] = CompressedTextMapper.convert(
"All I can say is that my life is pretty plain,\n"
+ "I like watchin' the puddles gather rain,\n"

Binary file not shown.

BIN
patches/2way_mirror.ips Normal file

Binary file not shown.

Binary file not shown.

BIN
patches/colordorm.ips Normal file

Binary file not shown.

BIN
patches/quiet_zora.ips Normal file

Binary file not shown.

View File

@@ -491,7 +491,8 @@
"never",
"presence",
"value",
"dungeon_value"
"dungeon_value",
"cave_value"
]
},
"showmap": {