Merge branch 'chest-counters' of https://github.com/compiling/ALttPEntranceRandomizer into DoorDev

This commit is contained in:
aerinon
2020-02-18 13:35:02 -07:00
4 changed files with 9 additions and 1 deletions

View File

@@ -184,6 +184,7 @@ def parse_arguments(argv, no_defaults=False):
base game.
''')
parser.add_argument('--experimental', default=defval(False), help='Enable experimental features', action='store_true')
parser.add_argument('--dungeon_counters', default=defval(False), help='Enable dungeon chest counters', action='store_true')
parser.add_argument('--crystals_ganon', default=defval('7'), const='7', nargs='?', choices=['random', '0', '1', '2', '3', '4', '5', '6', '7'],
help='''\
How many crystals are needed to defeat ganon. Any other
@@ -302,7 +303,7 @@ def parse_arguments(argv, no_defaults=False):
for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality',
'shuffle', 'door_shuffle', 'crystals_ganon', 'crystals_gt', 'openpyramid',
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
'retro', 'accessibility', 'hints', 'beemizer', 'experimental',
'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters',
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep',
'remote_items']:

4
Gui.py
View File

@@ -87,6 +87,8 @@ def guiMain(args=None):
experimentCheckbutton = Checkbutton(checkBoxFrame, text="Enable Experimental Features", variable=experimentVar)
customVar = IntVar()
customCheckbutton = Checkbutton(checkBoxFrame, text="Use custom item pool", variable=customVar)
dungeonCounterVar = IntVar()
dungeonCounterbutton = Checkbutton(checkBoxFrame, text="Enable dungeon chest counters", variable=dungeonCounterVar)
createSpoilerCheckbutton.pack(expand=True, anchor=W)
suppressRomCheckbutton.pack(expand=True, anchor=W)
@@ -102,6 +104,7 @@ def guiMain(args=None):
hintsCheckbutton.pack(expand=True, anchor=W)
experimentCheckbutton.pack(expand=True, anchor=W)
customCheckbutton.pack(expand=True, anchor=W)
dungeonCounterbutton.pack(expand=True, anchor=W)
romOptionsFrame = LabelFrame(rightHalfFrame, text="Rom options")
romOptionsFrame.columnconfigure(0, weight=1)
@@ -472,6 +475,7 @@ def guiMain(args=None):
int(arrow1Var.get()), int(arrow10Var.get()), int(bomb1Var.get()), int(bomb3Var.get()), int(rupee1Var.get()), int(rupee5Var.get()), int(rupee20Var.get()), int(rupee50Var.get()), int(rupee100Var.get()),
int(rupee300Var.get()), int(rupoorVar.get()), int(blueclockVar.get()), int(greenclockVar.get()), int(redclockVar.get()), int(progbowVar.get()), int(bomb10Var.get()), int(triforcepieceVar.get()),
int(triforcecountVar.get()), int(triforceVar.get()), int(rupoorcostVar.get()), int(universalkeyVar.get())]
guiargs.dungeon_counters = bool(dungeonCounterVar.get())
guiargs.rom = romVar.get()
guiargs.sprite = sprite
guiargs.outputpath = args.outputpath if args else None

View File

@@ -56,6 +56,7 @@ def main(args, seed=None):
world.enemy_health = args.enemy_health.copy()
world.enemy_damage = args.enemy_damage.copy()
world.beemizer = args.beemizer.copy()
world.dungeon_counters = args.dungeon_counters.copy()
world.experimental = args.experimental.copy()
world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)}

2
Rom.py
View File

@@ -1159,6 +1159,8 @@ def patch_rom(world, rom, player, team, enemized):
# compasses showing dungeon count
if world.clock_mode != 'off':
rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location
elif world.dungeon_counters[player]:
rom.write_byte(0x18003C, 0x02) # show always
elif world.compassshuffle[player] or world.doorShuffle[player] != 'vanilla':
rom.write_byte(0x18003C, 0x01) # show on pickup
else: