Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AdjusterMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def adjust(args):
start = time.clock()
start = time.perf_counter()
logger = logging.getLogger('')
logger.info('Patching ROM.')

Expand All @@ -31,6 +31,6 @@ def adjust(args):
rom.write_to_file(output_path('%s.sfc' % outfilebase))

logger.info('Done. Enjoy.')
logger.debug('Total Time: %s', time.clock() - start)
logger.debug('Total Time: %s', time.perf_counter() - start)

return args
4 changes: 2 additions & 2 deletions BaseClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ def get_bytes(self):
# [id][roomID-low][roomID-high][doorID][zero][shop_config][shopkeeper_config][sram_index]
entrances = self.region.entrances
config = self.item_count
if len(entrances) == 1 and entrances[0].addresses:
door_id = entrances[0].addresses+1
if len(entrances) == 1 and entrances[0].name in door_addresses:
door_id = door_addresses[entrances[0].name][0]+1
else:
door_id = 0
config |= 0x40 # ignore door id
Expand Down
4 changes: 2 additions & 2 deletions ItemList.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def generate_itempool(world, player):
'Bonk Fairy (Dark)', 'Lake Hylia Healer Fairy', 'Swamp Healer Fairy', 'Desert Healer Fairy',
'Dark Lake Hylia Healer Fairy', 'Dark Lake Hylia Ledge Healer Fairy', 'Dark Desert Healer Fairy',
'Dark Death Mountain Healer Fairy', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave',
'Kakariko Gamble Game', 'Capacity Upgrade', '50 Rupee Cave', 'Lost Woods Gamble', 'Hookshot Fairy',
'Kakariko Gamble Game', '50 Rupee Cave', 'Lost Woods Gamble', 'Hookshot Fairy',
'Palace of Darkness Hint', 'East Dark World Hint', 'Archery Game', 'Dark Lake Hylia Ledge Hint',
'Dark Lake Hylia Ledge Spike Cave', 'Fortune Teller (Dark)', 'Dark Sanctuary Hint', 'Dark Desert Hint']

Expand Down Expand Up @@ -337,7 +337,7 @@ def set_up_shops(world, player):

# Randomized changes to Shops
if world.retro:
for shop in random.sample([s for s in world.shops if s.replaceable and s.region.player == player], 5):
for shop in random.sample([s for s in world.shops if s.replaceable and s.type == ShopType.Shop and s.region.player == player], 5):
shop.active = True
shop.add_inventory(0, 'Single Arrow', 80)
shop.add_inventory(1, 'Small Key (Universal)', 100)
Expand Down
4 changes: 2 additions & 2 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__version__ = '0.6.3-pre'

def main(args, seed=None):
start = time.clock()
start = time.perf_counter()

# 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)
Expand Down Expand Up @@ -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.perf_counter() - start)

return world

Expand Down
4 changes: 2 additions & 2 deletions Plando.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
__version__ = '0.2-dev'

def main(args):
start_time = time.clock()
start_time = time.perf_counter()

# initialize the world
world = World(1, 'vanilla', 'noglitches', 'standard', 'normal', 'none', 'on', 'ganon', 'freshness', False, False, False, args.quickswap, args.fastmenu, args.disablemusic, False, False, False, None, 'none', False)
Expand Down Expand Up @@ -89,7 +89,7 @@ def main(args):
world.spoiler.to_file('%s_Spoiler.txt' % outfilebase)

logger.info('Done. Enjoy.')
logger.debug('Total Time: %s', time.clock() - start_time)
logger.debug('Total Time: %s', time.perf_counter() - start_time)

return world

Expand Down
6 changes: 4 additions & 2 deletions Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,10 @@ def patch_rom(world, player, rom):
[difficulty.progressive_sword_limit, overflow_replacement,
difficulty.progressive_shield_limit, overflow_replacement,
difficulty.progressive_armor_limit, overflow_replacement,
difficulty.progressive_bottle_limit, overflow_replacement,
difficulty.progressive_bow_limit, overflow_replacement])
difficulty.progressive_bottle_limit, overflow_replacement])

#Work around for json patch ordering issues - write bow limit separately so that it is replaced in the patch
rom.write_bytes(0x180098, [difficulty.progressive_bow_limit, overflow_replacement])

if difficulty.progressive_bow_limit < 2 and world.swords == 'swordless':
rom.write_bytes(0x180098, [2, overflow_replacement])
Expand Down