Implement pedestal ganon goal
This commit is contained in:
parent
5b16fd2552
commit
f17682e997
|
@ -66,7 +66,7 @@ def parse_arguments(argv, no_defaults=False):
|
|||
Vanilla: Swords are in vanilla locations.
|
||||
''')
|
||||
parser.add_argument('--goal', default=defval('ganon'), const='ganon', nargs='?',
|
||||
choices=['ganon', 'pedestal', 'dungeons', 'triforcehunt', 'localtriforcehunt', 'ganontriforcehunt', 'localganontriforcehunt', 'crystals'],
|
||||
choices=['ganon', 'pedestal', 'dungeons', 'triforcehunt', 'localtriforcehunt', 'ganontriforcehunt', 'localganontriforcehunt', 'crystals', 'ganonpedestal'],
|
||||
help='''\
|
||||
Select completion goal. (default: %(default)s)
|
||||
Ganon: Collect all crystals, beat Agahnim 2 then
|
||||
|
|
2
Gui.py
2
Gui.py
|
@ -269,7 +269,7 @@ def guiMain(args=None):
|
|||
goalVar = StringVar()
|
||||
goalVar.set('ganon')
|
||||
goalOptionMenu = OptionMenu(goalFrame, goalVar, 'ganon', 'pedestal', 'dungeons', 'triforcehunt',
|
||||
'localtriforcehunt', 'ganontriforcehunt', 'localganontriforcehunt', 'crystals')
|
||||
'localtriforcehunt', 'ganontriforcehunt', 'localganontriforcehunt', 'crystals', 'ganonpedestal')
|
||||
goalOptionMenu.pack(side=RIGHT)
|
||||
goalLabel = Label(goalFrame, text='Game goal')
|
||||
goalLabel.pack(side=LEFT)
|
||||
|
|
|
@ -171,7 +171,7 @@ def generate_itempool(world, player: int):
|
|||
if world.difficulty[player] not in difficulties:
|
||||
raise NotImplementedError(f"Diffulty {world.difficulty[player]}")
|
||||
if world.goal[player] not in {'ganon', 'pedestal', 'dungeons', 'triforcehunt', 'localtriforcehunt',
|
||||
'ganontriforcehunt', 'localganontriforcehunt', 'crystals'}:
|
||||
'ganontriforcehunt', 'localganontriforcehunt', 'crystals', 'ganonpedestal'}:
|
||||
raise NotImplementedError(f"Goal {world.goal[player]}")
|
||||
if world.mode[player] not in {'open', 'standard', 'inverted'}:
|
||||
raise NotImplementedError(f"Mode {world.mode[player]}")
|
||||
|
|
|
@ -318,6 +318,7 @@ def roll_settings(weights):
|
|||
'fast_ganon': 'crystals',
|
||||
'dungeons': 'dungeons',
|
||||
'pedestal': 'pedestal',
|
||||
'ganon_pedestal': 'ganonpedestal',
|
||||
'triforce_hunt': 'triforcehunt',
|
||||
'triforce-hunt': 'triforcehunt', # deprecated, moving all goals to `_`
|
||||
'local_triforce_hunt': 'localtriforcehunt',
|
||||
|
@ -327,7 +328,7 @@ def roll_settings(weights):
|
|||
|
||||
# TODO consider moving open_pyramid to an automatic variable in the core roller, set to True when
|
||||
# fast ganon + ganon at hole
|
||||
ret.open_pyramid = goal in {'fast_ganon', 'ganon_triforce_hunt', 'local_ganon_triforce_hunt'}
|
||||
ret.open_pyramid = goal in {'fast_ganon', 'ganon_triforce_hunt', 'local_ganon_triforce_hunt', 'ganon_pedestal'}
|
||||
|
||||
ret.crystals_gt = get_choice('tower_open', weights)
|
||||
|
||||
|
|
6
Rom.py
6
Rom.py
|
@ -1,5 +1,5 @@
|
|||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||
RANDOMIZERBASEHASH = '81f4d813ffe5041853858b53d536dddc'
|
||||
RANDOMIZERBASEHASH = '31d50ce7f1dd3bc33bdc3b2e90f0104e'
|
||||
|
||||
import io
|
||||
import json
|
||||
|
@ -1227,6 +1227,8 @@ def patch_rom(world, rom, player, team, enemized):
|
|||
rom.write_byte(0x18003E, 0x01) # make ganon invincible
|
||||
elif world.goal[player] in ['ganontriforcehunt', 'localganontriforcehunt']:
|
||||
rom.write_byte(0x18003E, 0x05) # make ganon invincible until enough triforce pieces are collected
|
||||
elif world.goal[player] in ['ganonpedestal']:
|
||||
rom.write_byte(0x18003E, 0x06)
|
||||
elif world.goal[player] in ['dungeons']:
|
||||
rom.write_byte(0x18003E, 0x02) # make ganon invincible until all dungeons are beat
|
||||
elif world.goal[player] in ['crystals']:
|
||||
|
@ -1915,6 +1917,8 @@ def write_strings(rom, world, player, team):
|
|||
|
||||
if world.goal[player] == 'dungeons':
|
||||
tt['sign_ganon'] = 'You need to complete all the dungeons.'
|
||||
if world.goal[player] == 'ganonpedestal':
|
||||
tt['sign_ganon'] = 'You need to pull the pedestal to defeat Ganon.'
|
||||
elif world.goal[player] == "ganon":
|
||||
if world.crystals_needed_for_ganon[player] == 1:
|
||||
tt['sign_ganon'] = 'You need 1 crystal to beat Ganon and have beaten Agahnim atop Ganons Tower.'
|
||||
|
|
2
Rules.py
2
Rules.py
|
@ -423,6 +423,8 @@ def global_rules(world, player):
|
|||
set_rule(ganon, lambda state: GanonDefeatRule(state, player))
|
||||
if world.goal[player] in ['ganontriforcehunt', 'localganontriforcehunt']:
|
||||
add_rule(ganon, lambda state: state.has_triforce_pieces(world.treasure_hunt_count[player], player))
|
||||
elif world.goal[player] == 'ganonpedestal':
|
||||
add_rule(world.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player))
|
||||
else:
|
||||
add_rule(ganon, lambda state: state.has_crystals(world.crystals_needed_for_ganon[player], player))
|
||||
set_rule(world.get_entrance('Ganon Drop', player), lambda state: state.has_beam_sword(player)) # need to damage ganon to get tiles to drop
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue