Merge branch 'Archipelago_Main' into new_shops

This commit is contained in:
Fabian Dill
2021-09-13 02:52:03 +02:00
8 changed files with 104 additions and 150 deletions

View File

@@ -20,7 +20,6 @@ def parse_arguments(argv, no_defaults=False):
multiargs, _ = parser.parse_known_args(argv)
parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('--create_spoiler', help='Output a Spoiler File', action='store_true')
parser.add_argument('--logic', default=defval('noglitches'), const='noglitches', nargs='?', choices=['noglitches', 'minorglitches', 'owglitches', 'hybridglitches', 'nologic'],
help='''\
Select Enforcement of Item Requirements. (default: %(default)s)
@@ -46,17 +45,6 @@ def parse_arguments(argv, no_defaults=False):
Requires the moon pearl to be Link in the Light World
instead of a bunny.
''')
parser.add_argument('--swordless', action='store_true',
help='''\
Toggles Swordless Mode
Swordless: No swords. Curtains in Skull Woods and Agahnim\'s
Tower are removed, Agahnim\'s Tower barrier can be
destroyed with hammer. Misery Mire and Turtle Rock
can be opened without a sword. Hammer damages Ganon.
Ether and Bombos Tablet can be activated with Hammer
(and Book). Bombos pads have been added in Ice
Palace, to allow for an alternative to firerod.
''')
parser.add_argument('--goal', default=defval('ganon'), const='ganon', nargs='?',
choices=['ganon', 'pedestal', 'bosses', 'triforcehunt', 'localtriforcehunt', 'ganontriforcehunt', 'localganontriforcehunt', 'crystals', 'ganonpedestal'],
help='''\
@@ -206,10 +194,6 @@ def parse_arguments(argv, no_defaults=False):
time).
''', type=int)
parser.add_argument('--retro', default=defval(False), help='''\
Keys are universal, shooting arrows costs rupees,
and a few other little things make this more like Zelda-1.
''', action='store_true')
parser.add_argument('--local_items', default=defval(''),
help='Specifies a list of items that will not spread across the multiworld (separated by commas)')
parser.add_argument('--non_local_items', default=defval(''),
@@ -223,9 +207,6 @@ def parse_arguments(argv, no_defaults=False):
Locations: You will be able to reach every location in the game.
None: You will be able to reach enough locations to beat the game.
''')
parser.add_argument('--hints', default=defval(False), help='''\
Make telepathic tiles and storytellers give helpful hints.
''', action='store_true')
# included for backwards compatibility
parser.add_argument('--shuffleganon', help=argparse.SUPPRESS, action='store_true', default=defval(True))
parser.add_argument('--no-shuffleganon', help='''\
@@ -243,18 +224,13 @@ def parse_arguments(argv, no_defaults=False):
parser.add_argument('--gui', help='Launch the GUI', action='store_true')
parser.add_argument('--progression_balancing', action='store_true', default=defval(False),
help="Enable Multiworld Progression balancing.")
parser.add_argument('--skip_playthrough', action='store_true', default=defval(False))
parser.add_argument('--enemizercli', default=defval('EnemizerCLI/EnemizerCLI.Core'))
parser.add_argument('--shufflebosses', default=defval('none'), choices=['none', 'basic', 'normal', 'chaos',
"singularity"])
parser.add_argument('--enemy_shuffle', action='store_true')
parser.add_argument('--killable_thieves', action='store_true')
parser.add_argument('--tile_shuffle', action='store_true')
parser.add_argument('--bush_shuffle', action='store_true')
parser.add_argument('--enemy_health', default=defval('default'),
choices=['default', 'easy', 'normal', 'hard', 'expert'])
parser.add_argument('--enemy_damage', default=defval('default'), choices=['default', 'shuffled', 'chaos'])
parser.add_argument('--shufflepots', default=defval(False), action='store_true')
parser.add_argument('--beemizer', default=defval(0), type=lambda value: min(max(int(value), 0), 4))
parser.add_argument('--shop_shuffle', default='', help='''\
combine letters for options:
@@ -272,7 +248,6 @@ def parse_arguments(argv, no_defaults=False):
For unlit dark rooms, require the Lamp to be considered in logic by default.
Torches means additionally easily accessible Torches that can be lit with Fire Rod are considered doable.
None means full traversal through dark rooms without tools is considered doable.''')
parser.add_argument('--restrict_dungeon_item_on_boss', default=defval(False), action="store_true")
parser.add_argument('--multi', default=defval(1), type=lambda value: min(max(int(value), 1), 255))
parser.add_argument('--names', default=defval(''))
parser.add_argument('--outputpath')
@@ -307,19 +282,19 @@ def parse_arguments(argv, no_defaults=False):
for player in range(1, multiargs.multi + 1):
playerargs = parse_arguments(shlex.split(getattr(ret, f"p{player}")), True)
for name in ['logic', 'mode', 'swordless', 'goal', 'difficulty', 'item_functionality',
for name in ['logic', 'mode', 'goal', 'difficulty', 'item_functionality',
'shuffle', 'open_pyramid', 'timer',
'countdown_start_time', 'red_clock_time', 'blue_clock_time', 'green_clock_time',
'local_items', 'non_local_items', 'retro', 'accessibility', 'hints', 'beemizer',
'shufflebosses', 'enemy_shuffle', 'enemy_health', 'enemy_damage', 'shufflepots',
'local_items', 'non_local_items', 'accessibility', 'beemizer',
'shufflebosses', 'enemy_health', 'enemy_damage',
'sprite',
"progression_balancing", "triforce_pieces_available",
"triforce_pieces_required", "shop_shuffle",
"required_medallions", "start_hints",
"plando_items", "plando_texts", "plando_connections", "er_seeds",
'dungeon_counters', 'killable_thieves',
'tile_shuffle', 'bush_shuffle', 'shuffle_prizes', 'sprite_pool', 'dark_room_logic',
'restrict_dungeon_item_on_boss', 'game']:
'dungeon_counters',
'shuffle_prizes', 'sprite_pool', 'dark_room_logic',
'game']:
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
if player == 1:
setattr(ret, name, {1: value})

View File

@@ -126,6 +126,59 @@ class Progressive(Choice):
return random.choice([True, False]) if self.value == self.option_grouped_random else bool(self.value)
class Swordless(Toggle):
"""No swords. Curtains in Skull Woods and Agahnim\'s
Tower are removed, Agahnim\'s Tower barrier can be
destroyed with hammer. Misery Mire and Turtle Rock
can be opened without a sword. Hammer damages Ganon.
Ether and Bombos Tablet can be activated with Hammer
(and Book)."""
displayname = "Swordless"
class Retro(Toggle):
"""Zelda-1 like mode. You have to purchase a quiver to shoot arrows using rupees
and there are randomly placed take-any caves that contain one Sword and choices of Heart Container/Blue Potion."""
displayname = "Retro"
class RestrictBossItem(Toggle):
"""Don't place dungeon-native items on the dungeon's boss."""
displayname = "Prevent Dungeon Item on Boss"
class Hints(DefaultOnToggle):
"""Put item and entrance placement hints on telepathic tiles and some NPCs.
Additionally King Zora and Bottle Merchant say what they're selling."""
displayname = "Hints"
class EnemyShuffle(Toggle):
"""Randomize every enemy spawn.
If mode is Standard, Hyrule Castle is left out (may result in visually wrong enemy sprites in that area.)"""
displayname = "Enemy Shuffle"
class KillableThieves(Toggle):
"""Makes Thieves killable."""
displayname = "Killable Thieves"
class BushShuffle(Toggle):
"""Randomize chance that a bush contains an enemy as well as which enemy may spawn."""
displayname = "Bush Shuffle"
class TileShuffle(Toggle):
"""Randomize flying tiles floor patterns."""
displayname = "Tile Shuffle"
class PotShuffle(Toggle):
"""Shuffle contents of pots within "supertiles" (item will still be nearby original placement)."""
displayname = "Pot Shuffle"
class Palette(Choice):
option_default = 0
option_good = 1
@@ -226,7 +279,16 @@ alttp_options: typing.Dict[str, type(Option)] = {
"compass_shuffle": compass_shuffle,
"map_shuffle": map_shuffle,
"progressive": Progressive,
"swordless": Swordless,
"retro": Retro,
"hints": Hints,
"restrict_dungeon_item_on_boss": RestrictBossItem,
"pot_shuffle": PotShuffle,
"enemy_shuffle": EnemyShuffle,
"killable_thieves": KillableThieves,
"bush_shuffle": BushShuffle,
"shop_item_slots": ShopItemSlots,
"tile_shuffle": TileShuffle,
"ow_palettes": OWPalette,
"uw_palettes": UWPalette,
"hud_palettes": HUDPalette,

View File

@@ -323,7 +323,7 @@ def patch_enemizer(world, player: int, rom: LocalRom, enemizercli, output_direct
'GrayscaleMode': False,
'GenerateSpoilers': False,
'RandomizeLinkSpritePalette': False,
'RandomizePots': world.shufflepots[player],
'RandomizePots': world.pot_shuffle[player],
'ShuffleMusic': False,
'BootlegMagic': True,
'CustomBosses': False,

View File

@@ -258,7 +258,7 @@ class ALTTPWorld(World):
try:
use_enemizer = (world.boss_shuffle[player] != 'none' or world.enemy_shuffle[player]
or world.enemy_health[player] != 'default' or world.enemy_damage[player] != 'default'
or world.shufflepots[player] or world.bush_shuffle[player]
or world.pot_shuffle[player] or world.bush_shuffle[player]
or world.killable_thieves[player])
rom = LocalRom(world.alttp_rom)