Links Awakening: Implement New Game (#1334)

Adds Link's Awakening: DX. Fully imports and forks LADXR, with permission - https://github.com/daid/LADXR
This commit is contained in:
zig-for
2023-03-21 01:26:03 +09:00
committed by GitHub
parent 67bf12369a
commit 81a239325d
180 changed files with 24191 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
from .constants import *
from .itemInfo import ItemInfo
class Witch(ItemInfo):
def __init__(self):
super().__init__(0x2A2)
def configure(self, options):
if not options.witch:
self.OPTIONS = [MAGIC_POWDER]
def patch(self, rom, option, *, multiworld=None):
if multiworld or option != MAGIC_POWDER:
rom.banks[0x3E][self.room + 0x3800] = CHEST_ITEMS[option]
if multiworld is not None:
rom.banks[0x3E][0x3300 + self.room] = multiworld
else:
rom.banks[0x3E][0x3300 + self.room] = 0
#rom.patch(0x05, 0x08D5, "09", "%02x" % (CHEST_ITEMS[option]))
def read(self, rom):
if rom.banks[0x05][0x08EF] != 0x00:
return MAGIC_POWDER
value = rom.banks[0x05][0x08D5]
for k, v in CHEST_ITEMS.items():
if v == value:
return k
raise ValueError("Could not find witch contents in ROM (0x%02x)" % (value))