Dungeon Counters option

This commit is contained in:
Mike A. Trethewey
2020-02-19 03:32:01 -08:00
parent 8c4bc60312
commit 6e47cd78e0
5 changed files with 30 additions and 4 deletions

4
CLI.py
View File

@@ -187,6 +187,7 @@ def parse_arguments(argv, no_defaults=False):
base game. base game.
''') ''')
parser.add_argument('--experimental', default=defval(False), help='Enable experimental features', action='store_true') parser.add_argument('--experimental', default=defval(False), help='Enable experimental features', action='store_true')
parser.add_argument('--dungeon_counters', default=defval('off'), 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'], parser.add_argument('--crystals_ganon', default=defval('7'), const='7', nargs='?', choices=['random', '0', '1', '2', '3', '4', '5', '6', '7'],
help='''\ help='''\
How many crystals are needed to defeat ganon. Any other How many crystals are needed to defeat ganon. Any other
@@ -306,7 +307,7 @@ def parse_arguments(argv, no_defaults=False):
for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality', for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality',
'shuffle', 'door_shuffle', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'shuffle', 'door_shuffle', 'crystals_ganon', 'crystals_gt', 'openpyramid',
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters',
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots', 'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep', 'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep',
'remote_items']: 'remote_items']:
@@ -340,6 +341,7 @@ def get_settings():
"shuffle": "vanilla", "shuffle": "vanilla",
"door_shuffle": "basic", "door_shuffle": "basic",
"experimental": 0, "experimental": 0,
"dungeon_counters": "off",
"heartbeep": "normal", "heartbeep": "normal",
"heartcolor": "red", "heartcolor": "red",
"fastmenu": "normal", "fastmenu": "normal",

View File

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

6
Rom.py
View File

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

View File

@@ -126,7 +126,8 @@ def create_guiargs(parent):
"smallkeyshuffle": "keyshuffle", "smallkeyshuffle": "keyshuffle",
"bigkeyshuffle": "bigkeyshuffle", "bigkeyshuffle": "bigkeyshuffle",
"dungeondoorshuffle": "door_shuffle", "dungeondoorshuffle": "door_shuffle",
"experimental": "experimental" "experimental": "experimental",
"dungeon_counters": "dungeon_counters"
}, },
"multiworld": { "multiworld": {
"names": "names" "names": "names"

View File

@@ -24,5 +24,25 @@
"label": { "label": {
"text": "Enable Experimental Features" "text": "Enable Experimental Features"
} }
},
"dungeon_counters": {
"type": "selectbox",
"label": {
"text": "Dungeon Chest Counters"
},
"packAttrs": {
"label": {
"side": "left"
},
"selectbox": {
"side": "right"
},
"default": "Off"
},
"options": {
"Off": "off",
"On": "on",
"On Compass Pickup": "pickup"
}
} }
} }