mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
LttP: split Retro into Retro Bows and Retro Caves (#588)
This commit is contained in:
@@ -873,7 +873,7 @@ def patch_rom(world, rom, player, enemized):
|
||||
return 0x53 + int(num), 0x79 + int(num)
|
||||
|
||||
credits_total = 216
|
||||
if world.retro[player]: # Old man cave and Take any caves will count towards collection rate.
|
||||
if world.retro_caves[player]: # Old man cave and Take any caves will count towards collection rate.
|
||||
credits_total += 5
|
||||
if world.shop_item_slots[player]: # Potion shop only counts towards collection rate if included in the shuffle.
|
||||
credits_total += 30 if 'w' in world.shop_shuffle[player] else 27
|
||||
@@ -1037,7 +1037,7 @@ def patch_rom(world, rom, player, enemized):
|
||||
prize_replacements[0xE0] = 0xDF # Fairy -> heart
|
||||
prize_replacements[0xE3] = 0xD8 # Big magic -> small magic
|
||||
|
||||
if world.retro[player]:
|
||||
if world.retro_bow[player]:
|
||||
prize_replacements[0xE1] = 0xDA # 5 Arrows -> Blue Rupee
|
||||
prize_replacements[0xE2] = 0xDB # 10 Arrows -> Red Rupee
|
||||
|
||||
@@ -1130,7 +1130,7 @@ def patch_rom(world, rom, player, enemized):
|
||||
0x12, 0x01, 0x35, 0xFF, # lamp -> 5 rupees
|
||||
0x51, 0x06, 0x52, 0xFF, # 6 +5 bomb upgrades -> +10 bomb upgrade
|
||||
0x53, 0x06, 0x54, 0xFF, # 6 +5 arrow upgrades -> +10 arrow upgrade
|
||||
0x58, 0x01, 0x36 if world.retro[player] else 0x43, 0xFF, # silver arrows -> single arrow (red 20 in retro mode)
|
||||
0x58, 0x01, 0x36 if world.retro_bow[player] else 0x43, 0xFF, # silver arrows -> single arrow (red 20 in retro mode)
|
||||
0x3E, difficulty.boss_heart_container_limit, 0x47, 0xff, # boss heart -> green 20
|
||||
0x17, difficulty.heart_piece_limit, 0x47, 0xff, # piece of heart -> green 20
|
||||
0xFF, 0xFF, 0xFF, 0xFF, # end of table sentinel
|
||||
@@ -1270,12 +1270,12 @@ def patch_rom(world, rom, player, enemized):
|
||||
if startingstate.has('Silver Bow', player):
|
||||
equip[0x340] = 1
|
||||
equip[0x38E] |= 0x60
|
||||
if not world.retro[player]:
|
||||
if not world.retro_bow[player]:
|
||||
equip[0x38E] |= 0x80
|
||||
elif startingstate.has('Bow', player):
|
||||
equip[0x340] = 1
|
||||
equip[0x38E] |= 0x20 # progressive flag to get the correct hint in all cases
|
||||
if not world.retro[player]:
|
||||
if not world.retro_bow[player]:
|
||||
equip[0x38E] |= 0x80
|
||||
if startingstate.has('Silver Arrows', player):
|
||||
equip[0x38E] |= 0x40
|
||||
@@ -1413,7 +1413,7 @@ def patch_rom(world, rom, player, enemized):
|
||||
elif item.name in bombs:
|
||||
equip[0x343] += bombs[item.name]
|
||||
elif item.name in arrows:
|
||||
if world.retro[player]:
|
||||
if world.retro_bow[player]:
|
||||
equip[0x38E] |= 0x80
|
||||
equip[0x377] = 1
|
||||
else:
|
||||
@@ -1547,18 +1547,18 @@ def patch_rom(world, rom, player, enemized):
|
||||
|
||||
rom.write_byte(0x180172, 0x01 if world.smallkey_shuffle[
|
||||
player] == smallkey_shuffle.option_universal else 0x00) # universal keys
|
||||
rom.write_byte(0x18637E, 0x01 if world.retro[player] else 0x00) # Skip quiver in item shops once bought
|
||||
rom.write_byte(0x180175, 0x01 if world.retro[player] else 0x00) # rupee bow
|
||||
rom.write_byte(0x180176, 0x0A if world.retro[player] else 0x00) # wood arrow cost
|
||||
rom.write_byte(0x180178, 0x32 if world.retro[player] else 0x00) # silver arrow cost
|
||||
rom.write_byte(0x301FC, 0xDA if world.retro[player] else 0xE1) # rupees replace arrows under pots
|
||||
rom.write_byte(0x30052, 0xDB if world.retro[player] else 0xE2) # replace arrows in fish prize from bottle merchant
|
||||
rom.write_bytes(0xECB4E, [0xA9, 0x00, 0xEA, 0xEA] if world.retro[player] else [0xAF, 0x77, 0xF3,
|
||||
rom.write_byte(0x18637E, 0x01 if world.retro_bow[player] else 0x00) # Skip quiver in item shops once bought
|
||||
rom.write_byte(0x180175, 0x01 if world.retro_bow[player] else 0x00) # rupee bow
|
||||
rom.write_byte(0x180176, 0x0A if world.retro_bow[player] else 0x00) # wood arrow cost
|
||||
rom.write_byte(0x180178, 0x32 if world.retro_bow[player] else 0x00) # silver arrow cost
|
||||
rom.write_byte(0x301FC, 0xDA if world.retro_bow[player] else 0xE1) # rupees replace arrows under pots
|
||||
rom.write_byte(0x30052, 0xDB if world.retro_bow[player] else 0xE2) # replace arrows in fish prize from bottle merchant
|
||||
rom.write_bytes(0xECB4E, [0xA9, 0x00, 0xEA, 0xEA] if world.retro_bow[player] else [0xAF, 0x77, 0xF3,
|
||||
0x7E]) # Thief steals rupees instead of arrows
|
||||
rom.write_bytes(0xF0D96, [0xA9, 0x00, 0xEA, 0xEA] if world.retro[player] else [0xAF, 0x77, 0xF3,
|
||||
rom.write_bytes(0xF0D96, [0xA9, 0x00, 0xEA, 0xEA] if world.retro_bow[player] else [0xAF, 0x77, 0xF3,
|
||||
0x7E]) # Pikit steals rupees instead of arrows
|
||||
rom.write_bytes(0xEDA5,
|
||||
[0x35, 0x41] if world.retro[player] else [0x43, 0x44]) # Chest game gives rupees instead of arrows
|
||||
[0x35, 0x41] if world.retro_bow[player] else [0x43, 0x44]) # Chest game gives rupees instead of arrows
|
||||
digging_game_rng = local_random.randint(1, 30) # set rng for digging game
|
||||
rom.write_byte(0x180020, digging_game_rng)
|
||||
rom.write_byte(0xEFD95, digging_game_rng)
|
||||
@@ -1727,7 +1727,7 @@ def write_custom_shops(rom, world, player):
|
||||
item_code = get_nonnative_item_sprite(item['item'])
|
||||
else:
|
||||
item_code = ItemFactory(item['item'], player).code
|
||||
if item['item'] == 'Single Arrow' and item['player'] == 0 and world.retro[player]:
|
||||
if item['item'] == 'Single Arrow' and item['player'] == 0 and world.retro_bow[player]:
|
||||
rom.write_byte(0x186500 + shop.sram_offset + slot, arrow_mask)
|
||||
|
||||
item_data = [shop_id, item_code] + price_data + \
|
||||
@@ -1740,7 +1740,7 @@ def write_custom_shops(rom, world, player):
|
||||
items_data.extend([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF])
|
||||
rom.write_bytes(0x184900, items_data)
|
||||
|
||||
if world.retro[player]:
|
||||
if world.retro_bow[player]:
|
||||
retro_shop_slots.append(0xFF)
|
||||
rom.write_bytes(0x186540, retro_shop_slots)
|
||||
|
||||
|
Reference in New Issue
Block a user