Files
Grinch-AP/worlds/ladx/LADXR/patches/bomb.py
zig-for 81a239325d Links Awakening: Implement New Game (#1334)
Adds Link's Awakening: DX. Fully imports and forks LADXR, with permission - https://github.com/daid/LADXR
2023-03-20 17:26:03 +01:00

20 lines
567 B
Python

from ..assembler import ASM
def onlyDropBombsWhenHaveBombs(rom):
rom.patch(0x03, 0x1FC5, ASM("call $608C"), ASM("call $50B2"))
# We use some of the unused chest code space here to remove the bomb if you do not have bombs in your inventory.
rom.patch(0x03, 0x10B2, 0x112A, ASM("""
ld e, INV_SIZE
ld hl, $DB00
ld a, $02
loop:
cp [hl]
jr z, resume
dec e
inc hl
jr nz, loop
jp $3F8D ; unload entity
resume:
jp $608C
"""), fill_nop=True)