diff --git a/ItemList.py b/ItemList.py index b99f6941..8652f170 100644 --- a/ItemList.py +++ b/ItemList.py @@ -362,7 +362,7 @@ def get_pool_core(progressive, shuffle, difficulty, timer, goal, mode, swords, r if logic in ['owglitches', 'nologic']: precollected_items.append('Pegasus Boots') pool.remove('Pegasus Boots') - pool.extend['Rupees (20)'] + pool.extend(['Rupees (20)']) if want_progressives(): pool.extend(progressivegloves) diff --git a/Main.py b/Main.py index 9442c8ab..ad4184fb 100644 --- a/Main.py +++ b/Main.py @@ -21,7 +21,7 @@ from Utils import output_path __version__ = '0.6.3-pre' def main(args, seed=None): - start = time.clock() + start = time.process_time() # initialize the world world = World(args.multi, args.shuffle, args.logic, args.mode, args.swords, args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.accessibility, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.retro, args.custom, args.customitemarray, args.shufflebosses, args.hints) @@ -172,7 +172,7 @@ def main(args, seed=None): world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase)) logger.info('Done. Enjoy.') - logger.debug('Total Time: %s', time.clock() - start) + logger.debug('Total Time: %s', time.process_time() - start) return world diff --git a/Rom.py b/Rom.py index 2f548bfe..f84afeda 100644 --- a/Rom.py +++ b/Rom.py @@ -872,7 +872,7 @@ def patch_rom(world, player, rom): rom.write_byte(x, 0) # Zero the initial equipment array rom.write_byte(0x18302C, 0x18) # starting max health rom.write_byte(0x18302D, 0x18) # starting current health - rom.write_byte(0x183039, 0x68) # starting abilities, bit array + ability_flags = 0x68 # starting abilities, bit array; may be modified by precollected items for item in world.precollected_items: if item.player != player: @@ -882,9 +882,15 @@ def patch_rom(world, player, rom): rom.write_byte(0x183000+0x19, 0x01) rom.write_byte(0x0271A6+0x19, 0x01) rom.write_byte(0x180043, 0x01) # special starting sword byte + elif item.name == 'Pegasus Boots': + rom.write_byte(0x183015, 0x01) + ability_flags |= 0b00000100 else: raise RuntimeError("Unsupported pre-collected item: {}".format(item)) + # write ability flags after determined. + rom.write_byte(0x183039, ability_flags) + rom.write_byte(0x18004A, 0x00 if world.mode != 'inverted' else 0x01) # Inverted mode rom.write_byte(0x18005D, 0x00) # Hammer always breaks barrier rom.write_byte(0x2AF79, 0xD0 if world.mode != 'inverted' else 0xF0) # vortexes: Normal (D0=light to dark, F0=dark to light, 42 = both) diff --git a/Rules.py b/Rules.py index ea632740..c76335bf 100644 --- a/Rules.py +++ b/Rules.py @@ -995,7 +995,8 @@ def overworld_glitches_rules(world, player): # Regions that require the boots and some other stuff. if world.mode != 'inverted': - set_rule(world.get_entrance('Dark Desert Teleporter', player), lambda state: state.has('Ocarina', player) or (state.can_boots_clip_dw(player) and state.can_lift_heavy_rocks(player))) set_rule(world.get_entrance('Turtle Rock Teleporter', player), lambda state: (state.can_boots_clip_dw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)) + set_rule(world.get_entrance('Dark Desert Teleporter', player), lambda state: state.has('Ocarina', player) or (state.can_boots_clip_dw(player) and state.can_lift_heavy_rocks(player))) + set_rule(world.get_entrance('Turtle Rock Teleporter', player), lambda state: (state.can_boots_clip_dw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)) add_rule(world.get_entrance('Catfish Exit Rock', player), lambda state: state.can_boots_clip_dw(player), 'or') add_rule(world.get_entrance('East Dark World Broken Bridge Pass', player), lambda state: state.can_boots_clip_dw(player), 'or') add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_reach('Dark Death Mountain (West Bottom)', 'Region', player) and state.has_Mirror(player))