diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index 064f96b1..6fe506ff 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -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 diff --git a/Gui.py b/Gui.py index 7e326bfb..1b8fb6a6 100755 --- a/Gui.py +++ b/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) diff --git a/ItemPool.py b/ItemPool.py index f531dcca..132785a1 100644 --- a/ItemPool.py +++ b/ItemPool.py @@ -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]}") diff --git a/Mystery.py b/Mystery.py index ed1726e5..376e296a 100644 --- a/Mystery.py +++ b/Mystery.py @@ -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) diff --git a/Rom.py b/Rom.py index ef047a83..e0df62ed 100644 --- a/Rom.py +++ b/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.' diff --git a/Rules.py b/Rules.py index c2a4744d..88dca7af 100644 --- a/Rules.py +++ b/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 diff --git a/data/basepatch.bmbp b/data/basepatch.bmbp index 28e62a01..98ecc814 100644 Binary files a/data/basepatch.bmbp and b/data/basepatch.bmbp differ