Fixes item validation issues with traps

This commit is contained in:
MarioSpore
2025-08-25 17:07:21 -04:00
parent 9a6f6f7a75
commit 069355778d
2 changed files with 6 additions and 4 deletions

View File

@@ -216,4 +216,6 @@ class GrinchClient(BizHawkClient):
await bizhawk.write(ctx.bizhawk_ctx, [(address_to_validate, expected_value.to_bytes(byte_size, "little"), "MainRAM")])
current_value = int.from_bytes((await bizhawk.read(ctx.bizhawk_ctx, [(address_to_validate, byte_size, "MainRAM")]))[0], "little")
if not current_value == expected_value:
if address_to_validate == 0x010000 or address_to_validate == 0x08FB94:
return
raise Exception("Unable to update address as expected. Address: "+ str(address_to_validate)+"; Expected Value: "+str(expected_value))

View File

@@ -182,13 +182,13 @@ TRAPS_TABLE: dict[str, GrinchItemData] = {
# "Tip Toe Trap": GrinchItemData("Traps", 603, IC.trap, [GrinchRamData()]),
# This item may not function properly if you receive it during a loading screen or in Mount Crumpit
# "Damage Trap": GrinchItemData("Traps", 604, IC.trap, [GrinchRamData(0x0E8FDC, value=-20, update_existing_value=True)]),
# "Depletion Trap": GrinchItemData("Traps", 605, IC.trap, [GrinchRamData(0x010058, value=0, bit_size=2)]),
# "Dump it to Crumpit": GrinchItemData("Traps", 606, IC.trap, #Alias to Home Trap for traplink
# [GrinchRamData(0x010000, value=0x05), GrinchRamData(0x08FB94, value=1)])
"Depletion Trap": GrinchItemData("Traps", 605, IC.trap, [GrinchRamData(0x010058, value=0, bit_size=2)]),
"Dump it to Crumpit": GrinchItemData("Traps", 606, IC.trap, #Alias to Home Trap for traplink
[GrinchRamData(0x010000, value=0x05), GrinchRamData(0x08FB94, value=1)]),
#alias to Spring Trap for traplink
# "Rocket Spring Trap": GrinchItemData("Traps", 607, IC.trap, [GrinchRamData()]),
#alias to Home Trap for traplink
# "Who sent me back?": GrinchItemData("Traps", 608, IC.trap, [GrinchRamData(0x08FB94, value=1)]),
"Who sent me back?": GrinchItemData("Traps", 608, IC.trap, [GrinchRamData(0x08FB94, value=1)]),
# "Cutscene Trap": GrinchItemData("Traps", 609, IC.trap, [GrinchRamData()]),
# "No Vac Trap": GrinchItemData("Traps", 610, IC.trap, [GrinchRamData(0x0102DA, value=0]),
# "Invisible Trap": GrinchItemData("Traps", 611, IC.trap, [GrinchRamData(0x0102DA, value=0, bit_size=4)])