Some further fixes to Prize Shuffle

This commit is contained in:
codemann8
2024-05-24 16:19:37 -05:00
parent 39dc0abb53
commit 747f5fae98
5 changed files with 8 additions and 8 deletions

View File

@@ -2696,6 +2696,8 @@ def calc_used_dungeon_items(builder, world, player):
base += 1
if not world.mapshuffle[player] and (builder.name != 'Agahnims Tower' or not basic_flag):
base += 1
if world.prizeshuffle[player] == 'dungeon' and builder.name not in ['Hyrule Castle', 'Agahnims Tower', 'Ganons Tower']:
base += 1
return base

View File

@@ -291,7 +291,7 @@ dungeon_table = {
'Desert Palace': DungeonInfo(2, 1, True, True, True, False, 3, [0x1209E, 0x53F3C, 0x53F3D, 0x180053, 0x180072, 0x186FE3], 0x06, 0x12),
'Tower of Hera': DungeonInfo(2, 1, True, True, True, False, 0, [0x120A5, 0x53F4A, 0x53F4B, 0x18005A, 0x180071, 0x186FEA], 0x14, None),
'Agahnims Tower': DungeonInfo(0, 2, False, False, False, False, 2, None, 0x08, None),
'Palace of Darkness': DungeonInfo(5, 6, True, True, True, False, 0, [0x120A1, 0x53F22, 0x53F43, 0x180056, 0x180073, 0x186FE6], 0x0C, None),
'Palace of Darkness': DungeonInfo(5, 6, True, True, True, False, 0, [0x120A1, 0x53F42, 0x53F43, 0x180056, 0x180073, 0x186FE6], 0x0C, None),
'Swamp Palace': DungeonInfo(6, 1, True, True, True, False, 5, [0x120A0, 0x53F40, 0x53F41, 0x180055, 0x180079, 0x186FE5], 0x0A, None),
'Skull Woods': DungeonInfo(2, 3, True, True, True, False, 2, [0x120A3, 0x53F46, 0x53F47, 0x180058, 0x180074, 0x186FE8], 0x10, 0x20),
'Thieves Town': DungeonInfo(4, 1, True, True, True, False, 2, [0x120A6, 0x53F4C, 0x53F4D, 0x18005B, 0x180076, 0x186FEB], 0x16, None),

View File

@@ -270,7 +270,7 @@ def track_dungeon_items(item, location, world):
def is_dungeon_item(item, world):
return ((item.prize and world.prizeshuffle[item.player] == 'none')
return ((item.prize and world.prizeshuffle[item.player] in ['none', 'dungeon'])
or (item.smallkey and world.keyshuffle[item.player] == 'none')
or (item.bigkey and not world.bigkeyshuffle[item.player])
or (item.compass and not world.compassshuffle[item.player])

10
Rom.py
View File

@@ -43,7 +43,7 @@ from source.enemizer.Enemizer import write_enemy_shuffle_settings
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '361d9f67bfd927c7993426cacd778e8f'
RANDOMIZERBASEHASH = '096e6adebfa630e827c662f12f79b4cd'
class JsonRom(object):
@@ -477,7 +477,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
rom.write_byte(location.address, itemid)
for dungeon in [d for d in world.dungeons if d.player == player]:
if dungeon.prize:
# crystals
# prizes
for address, value in zip(dungeon_table[dungeon.name].prize, prize_item_table[dungeon.prize.name]):
rom.write_byte(address, value)
@@ -1211,8 +1211,6 @@ def patch_rom(world, rom, player, team, is_mystery=False):
rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp
rom.write_byte(0x180174, 0x01 if world.fix_fake_world[player] else 0x00)
rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles
# fix for allowing prize itemgets being able to update the HUD (buying prizes in shops and updating rupees)
rom.write_bytes(snes_to_pc(0x0799FB), [0x80, 0x11, 0xEA])
# Starting equipment
if world.pseudoboots[player]:
@@ -1437,8 +1435,8 @@ def patch_rom(world, rom, player, team, is_mystery=False):
return reveal_bytes.get(dungeon.name, 0x0000)
return 0x0000
write_int16(rom, 0x18017A, get_reveal_bytes('Green Pendant') if world.mapshuffle[player] else 0x0000) # Sahasrahla reveal
write_int16(rom, 0x18017C, get_reveal_bytes('Crystal 5')|get_reveal_bytes('Crystal 6') if world.mapshuffle[player] else 0x0000) # Bomb Shop Reveal
write_int16(rom, 0x18017A, get_reveal_bytes('Green Pendant')) # Sahasrahla reveal
write_int16(rom, 0x18017C, get_reveal_bytes('Crystal 5')|get_reveal_bytes('Crystal 6')) # Bomb Shop Reveal
rom.write_byte(0x180172, 0x01 if world.keyshuffle[player] == 'universal' else 0x00) # universal keys
rom.write_byte(0x180175, 0x01 if world.bow_mode[player].startswith('retro') else 0x00) # rupee bow

Binary file not shown.