Finish support for variable crystal requirements
Note: We still do not have anything to reveal required Ganon crystal counts in inverted mode. For non-inverted it is revealed at a sign on the pyramid, which might be less than ideal.
This commit is contained in:
parent
418568df60
commit
0377d6b7bc
|
@ -162,6 +162,23 @@ def start():
|
||||||
The dungeon variants only mix up dungeons and keep the rest of
|
The dungeon variants only mix up dungeons and keep the rest of
|
||||||
the overworld vanilla.
|
the overworld vanilla.
|
||||||
''')
|
''')
|
||||||
|
parser.add_argument('--crystals_ganon', default='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
|
||||||
|
requirements for ganon for the selected goal still apply.
|
||||||
|
This setting does not apply when the all dungeons goal is
|
||||||
|
selected. (default: %(default)s)
|
||||||
|
Random: Picks a random value between 0 and 7 (inclusive).
|
||||||
|
0-7: Number of crystals needed
|
||||||
|
''')
|
||||||
|
parser.add_argument('--crystals_gt', default='7', const='7', nargs='?', choices=['random', '0', '1', '2', '3', '4', '5', '6', '7'],
|
||||||
|
help='''\
|
||||||
|
How many crystals are needed to open GT. For inverted mode
|
||||||
|
this applies to the castle tower door instead. (default: %(default)s)
|
||||||
|
Random: Picks a random value between 0 and 7 (inclusive).
|
||||||
|
0-7: Number of crystals needed
|
||||||
|
''')
|
||||||
|
|
||||||
parser.add_argument('--rom', default='Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', help='Path to an ALttP JAP(1.0) rom to use as a base.')
|
parser.add_argument('--rom', default='Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', help='Path to an ALttP JAP(1.0) rom to use as a base.')
|
||||||
parser.add_argument('--loglevel', default='info', const='info', nargs='?', choices=['error', 'info', 'warning', 'debug'], help='Select level of logging for output.')
|
parser.add_argument('--loglevel', default='info', const='info', nargs='?', choices=['error', 'info', 'warning', 'debug'], help='Select level of logging for output.')
|
||||||
parser.add_argument('--seed', help='Define seed number to generate.', type=int)
|
parser.add_argument('--seed', help='Define seed number to generate.', type=int)
|
||||||
|
|
5
Main.py
5
Main.py
|
@ -33,6 +33,9 @@ def main(args, seed=None):
|
||||||
world.seed = int(seed)
|
world.seed = int(seed)
|
||||||
random.seed(world.seed)
|
random.seed(world.seed)
|
||||||
|
|
||||||
|
world.crystals_needed_for_ganon = random.randint(0, 7) if args.crystals_ganon == 'random' else int(args.crystals_ganon)
|
||||||
|
world.crystals_needed_for_gt = random.randint(0, 7) if args.crystals_gt == 'random' else int(args.crystals_gt)
|
||||||
|
|
||||||
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)}
|
||||||
|
|
||||||
logger.info('ALttP Entrance Randomizer Version %s - Seed: %s\n\n', __version__, world.seed)
|
logger.info('ALttP Entrance Randomizer Version %s - Seed: %s\n\n', __version__, world.seed)
|
||||||
|
@ -200,6 +203,8 @@ def copy_world(world):
|
||||||
ret.difficulty_requirements = world.difficulty_requirements
|
ret.difficulty_requirements = world.difficulty_requirements
|
||||||
ret.fix_fake_world = world.fix_fake_world
|
ret.fix_fake_world = world.fix_fake_world
|
||||||
ret.lamps_needed_for_dark_rooms = world.lamps_needed_for_dark_rooms
|
ret.lamps_needed_for_dark_rooms = world.lamps_needed_for_dark_rooms
|
||||||
|
ret.crystals_needed_for_ganon = world.crystals_needed_for_ganon
|
||||||
|
ret.crystals_needed_for_gt = world.crystals_needed_for_gt
|
||||||
|
|
||||||
if world.mode != 'inverted':
|
if world.mode != 'inverted':
|
||||||
for player in range(1, world.players + 1):
|
for player in range(1, world.players + 1):
|
||||||
|
|
Loading…
Reference in New Issue