Add --require_ganon_item option

This commit is contained in:
2026-06-08 23:27:18 -05:00
parent 2039159d36
commit 0bc1a5c2ad
6 changed files with 26 additions and 7 deletions

7
Rom.py
View File

@@ -1452,7 +1452,12 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
"byrna": 0x12,
"none": 0x7F,
}
rom.write_byte(0x18002E, ganon_item_byte[world.ganon_item[player]])
ganon_item_value = ganon_item_byte[world.ganon_item[player]]
if world.require_ganon_item[player] and world.ganon_item[player] != "none":
if world.swords[player] != "swordless" or world.ganon_item[player] not in ["bombos", "ether", "quake"]:
ganon_item_value |= 0x80
rom.write_byte(0x18002E, ganon_item_value)
# block HC upstairs doors in rain state in standard mode
prevent_rain = world.mode[player] == 'standard' and world.shuffle[player] != 'vanilla' and world.logic[player] != 'nologic'