diff --git a/BaseClasses.py b/BaseClasses.py index 7c61ac96..1c065af2 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -7,7 +7,7 @@ from collections import OrderedDict class World(object): - def __init__(self, shuffle, logic, mode, difficulty, timer, progressive, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap, fastmenu, disable_music, keysanity, custom, customitemarray): + def __init__(self, shuffle, logic, mode, difficulty, timer, progressive, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap, fastmenu, disable_music, keysanity, retro, custom, customitemarray): self.shuffle = shuffle self.logic = logic self.mode = mode @@ -56,6 +56,7 @@ class World(object): self.fastmenu = fastmenu self.disable_music = disable_music self.keysanity = keysanity + self.retro = retro self.custom = custom self.customitemarray = customitemarray self.can_take_damage = True @@ -278,6 +279,7 @@ class World(object): markbool(self.check_beatable_only) markbool(self.shuffle_ganon) markbool(self.keysanity) + markbool(self.retro) assert id_value_max <= 0xFFFFFFFF return id_value diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index bc6d8451..0d91223e 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -165,6 +165,10 @@ def start(): Keys (and other dungeon items) are no longer restricted to their dungeons, but can be anywhere ''', action='store_true') + parser.add_argument('--retro', 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('--custom', default=False, help='Not supported.') parser.add_argument('--customitemarray', default=False, help='Not supported.') parser.add_argument('--nodungeonitems', help='''\ diff --git a/Gui.py b/Gui.py index 85cc0c4c..c33fe5e2 100755 --- a/Gui.py +++ b/Gui.py @@ -62,6 +62,8 @@ def guiMain(args=None): quickSwapCheckbutton = Checkbutton(checkBoxFrame, text="Enabled L/R Item quickswapping", variable=quickSwapVar) keysanityVar = IntVar() keysanityCheckbutton = Checkbutton(checkBoxFrame, text="Keysanity (keys anywhere)", variable=keysanityVar) + retroVar = IntVar() + retroCheckbutton = Checkbutton(checkBoxFrame, text="Retro mode (universal keys)", variable=retroVar) dungeonItemsVar = IntVar() dungeonItemsCheckbutton = Checkbutton(checkBoxFrame, text="Place Dungeon Items (Compasses/Maps)", onvalue=0, offvalue=1, variable=dungeonItemsVar) beatableOnlyVar = IntVar() @@ -78,6 +80,7 @@ def guiMain(args=None): suppressRomCheckbutton.pack(expand=True, anchor=W) quickSwapCheckbutton.pack(expand=True, anchor=W) keysanityCheckbutton.pack(expand=True, anchor=W) + retroCheckbutton.pack(expand=True, anchor=W) dungeonItemsCheckbutton.pack(expand=True, anchor=W) beatableOnlyCheckbutton.pack(expand=True, anchor=W) disableMusicCheckbutton.pack(expand=True, anchor=W) @@ -262,6 +265,7 @@ def guiMain(args=None): guiargs.create_spoiler = bool(createSpoilerVar.get()) guiargs.suppress_rom = bool(suppressRomVar.get()) guiargs.keysanity = bool(keysanityVar.get()) + guiargs.retro = bool(retroVar.get()) guiargs.nodungeonitems = bool(dungeonItemsVar.get()) guiargs.beatableonly = bool(beatableOnlyVar.get()) guiargs.quickswap = bool(quickSwapVar.get()) @@ -978,6 +982,7 @@ def guiMain(args=None): createSpoilerVar.set(int(args.create_spoiler)) suppressRomVar.set(int(args.suppress_rom)) keysanityVar.set(args.keysanity) + retroVar.set(args.retro) if args.nodungeonitems: dungeonItemsVar.set(int(not args.nodungeonitems)) beatableOnlyVar.set(int(args.beatableonly)) diff --git a/Items.py b/Items.py index 97b9c605..e8a88c66 100644 --- a/Items.py +++ b/Items.py @@ -157,6 +157,7 @@ item_table = {'Bow': (True, False, None, 0x0B, 'You have\nchosen the\narcher cla 'Big Key (Ganons Tower)': (False, False, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again'), 'Compass (Ganons Tower)': (False, True, 'Compass', 0x82, 'Now you can find Agahnim!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again'), 'Map (Ganons Tower)': (False, True, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again'), + 'Small Key (Universal)': (False, False, 'SmallKey', 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again'), 'Nothing': (False, False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again'), 'Beat Agahnim 1': (True, False, 'Event', None, None, None, None, None, None, None), 'Beat Agahnim 2': (True, False, 'Event', None, None, None, None, None, None, None)} diff --git a/Main.py b/Main.py index cb22a945..98cfa0e9 100644 --- a/Main.py +++ b/Main.py @@ -39,7 +39,7 @@ def main(args, seed=None): start = time.clock() # initialize the world - world = World(args.shuffle, args.logic, args.mode, args.difficulty, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.beatableonly, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.custom, args.customitemarray) + world = World(args.shuffle, args.logic, args.mode, args.difficulty, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.beatableonly, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.retro, args.custom, args.customitemarray) logger = logging.getLogger('') if seed is None: random.seed(None) @@ -111,7 +111,7 @@ def main(args, seed=None): else: sprite = None - outfilebase = 'ER_%s_%s-%s-%s%s_%s-%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", "-shuffleganon" if world.shuffle_ganon else "", world.seed) + outfilebase = 'ER_%s_%s-%s-%s%s_%s-%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-retro" if world.retro else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", world.seed) if not args.suppress_rom: if args.jsonout: @@ -139,7 +139,7 @@ def gt_filler(world): def copy_world(world): # ToDo: Not good yet - ret = World(world.shuffle, world.logic, world.mode, world.difficulty, world.timer, world.progressive, world.goal, world.algorithm, world.place_dungeon_items, world.check_beatable_only, world.shuffle_ganon, world.quickswap, world.fastmenu, world.disable_music, world.keysanity, world.custom, world.customitemarray) + ret = World(world.shuffle, world.logic, world.mode, world.difficulty, world.timer, world.progressive, world.goal, world.algorithm, world.place_dungeon_items, world.check_beatable_only, world.shuffle_ganon, world.quickswap, world.fastmenu, world.disable_music, world.keysanity, world.retro, world.custom, world.customitemarray) ret.required_medallions = list(world.required_medallions) ret.swamp_patch_required = world.swamp_patch_required ret.ganon_at_pyramid = world.ganon_at_pyramid diff --git a/Plando.py b/Plando.py index 941a8606..f2f68873 100755 --- a/Plando.py +++ b/Plando.py @@ -33,7 +33,7 @@ def main(args): start_time = time.clock() # initialize the world - world = World('vanilla', 'noglitches', 'standard', 'normal', 'none', 'on', 'ganon', 'freshness', False, False, False, args.quickswap, args.fastmenu, args.disablemusic, False, False, None) + world = World('vanilla', 'noglitches', 'standard', 'normal', 'none', 'on', 'ganon', 'freshness', False, False, False, args.quickswap, args.fastmenu, args.disablemusic, False, False, False, None) logger = logging.getLogger('') hasher = hashlib.md5()