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
6 changes: 3 additions & 3 deletions EntranceRandomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _get_help_string(self, action):
that it is not impossible to be in.
vt21: Unbiased in its selection, but has tendency to put
Ice Rod in Turtle Rock.
vt22: Drops off stale locations after 1/3 of progress
vt22: Drops off stale locations after 1/3 of progression
items were placed to try to circumvent vt21\'s
shortcomings.
Freshness: Keep track of stale locations (ones that cannot be
Expand Down Expand Up @@ -160,10 +160,10 @@ def _get_help_string(self, action):
exit(1)
if args.sprite is not None and not os.path.isfile(args.sprite):
if not args.jsonout:
input('Could not find link sprite sheet at given location. \nPress Enter to exit.' % args.sprite)
input('Could not find a Link Sprite Sheet at given location. \nPress Enter to exit.' % args.sprite)
exit(1)
else:
raise IOError('Cannot find sprite file at %s' % args.sprite)
raise IOError('Cannot find Sprite File at %s' % args.sprite)

# set up logger
loglevel = {'error': logging.ERROR, 'info': logging.INFO, 'warning': logging.WARNING, 'debug': logging.DEBUG}[args.loglevel]
Expand Down
22 changes: 11 additions & 11 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main(args, seed=None):
logger.info('Fill the world.')

if args.algorithm == 'flood':
flood_items(world) # different algo, biased towards early game progress items
flood_items(world) # different algo, biased towards early game progression items
elif args.algorithm == 'vt21':
distribute_items_cutoff(world, 1)
elif args.algorithm == 'vt22':
Expand Down Expand Up @@ -149,12 +149,12 @@ def distribute_items_cutoff(world, cutoffrate=0.33):
item_to_place = candidate_item_to_place
placed_advancement_items += 1
else:
# we placed all available progress items. Maybe the game can be beaten anyway?
# we placed all available progression items. Maybe the game can be beaten anyway?
if world.can_beat_game():
logging.getLogger('').warning('Not all locations reachable. Game beatable anyway.')
progress_done = True
continue
raise RuntimeError('No more progress items left to place.')
raise RuntimeError('No more progression items left to place.')

spot_to_fill = None
for location in (fill_locations if placed_advancement_items/total_advancement_items < cutoffrate else reversed(fill_locations)):
Expand Down Expand Up @@ -217,12 +217,12 @@ def distribute_items_staleness(world):
if candidate_item_to_place is not None:
item_to_place = candidate_item_to_place
else:
# we placed all available progress items. Maybe the game can be beaten anyway?
# we placed all available progression items. Maybe the game can be beaten anyway?
if world.can_beat_game():
logging.getLogger('').warning('Not all locations reachable. Game beatable anyway.')
progress_done = True
continue
raise RuntimeError('No more progress items left to place.')
raise RuntimeError('No more progression items left to place.')

spot_to_fill = None
for location in fill_locations:
Expand Down Expand Up @@ -370,7 +370,7 @@ def flood_items(world):
progress_done = True
continue

# need to place a progress item instead of an already placed item, find candidate
# need to place a progression item instead of an already placed item, find candidate
item_to_place = None
candidate_item_to_place = None
for item in itempool:
Expand All @@ -385,9 +385,9 @@ def flood_items(world):
if candidate_item_to_place is not None:
item_to_place = candidate_item_to_place
else:
raise RuntimeError('No more progress items left to place.')
raise RuntimeError('No more progression items left to place.')

# find item to replace with progress item
# find item to replace with progression item
location_list = world.get_reachable_locations()
random.shuffle(location_list)
for location in location_list:
Expand Down Expand Up @@ -526,7 +526,7 @@ def copy_world(world):
for item in world.itempool:
ret.itempool.append(Item(item.name, item.advancement, item.priority, item.key))

# copy progress items in state
# copy progression items in state
ret.state.prog_items = list(world.state.prog_items)

set_rules(ret)
Expand Down Expand Up @@ -569,7 +569,7 @@ def create_playthrough(world):

collection_spheres.append(sphere)

logging.getLogger('').debug('Calculated sphere %i, containing %i of %i progress items.' % (len(collection_spheres), len(sphere), len(prog_locations)))
logging.getLogger('').debug('Calculated sphere %i, containing %i of %i progression items.' % (len(collection_spheres), len(sphere), len(prog_locations)))

if not sphere:
logging.getLogger('').debug('The following items could not be reached: %s' % ['%s at %s' % (location.item.name, location.name) for location in sphere_candidates])
Expand Down Expand Up @@ -598,7 +598,7 @@ def create_playthrough(world):
for location in to_delete:
sphere.remove(location)

# we are now down to just the required progress items in collection_spheres in a minimum number of spheres. As a cleanup, we right trim empty spheres (can happen if we have multiple triforces)
# we are now down to just the required progression items in collection_spheres in a minimum number of spheres. As a cleanup, we right trim empty spheres (can happen if we have multiple triforces)
collection_spheres = [sphere for sphere in collection_spheres if sphere]

# store the required locations for statistical analysis
Expand Down
4 changes: 2 additions & 2 deletions Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ def create_region(name, locations=None, exits=None):
'[dungeon-A2-6F] Ganons Tower - Room before Moldorm': (0xEB03, False, 'atop My Tower'),
'[dungeon-A2-6F] Ganons Tower - Moldorm Room': (0xEB06, False, 'atop My Tower'),
'Ganon': (None, False, 'from me'),
'Agahnim 1': (None, False, 'from my wizardry from'),
'Agahnim 2': (None, False, 'from my wizardry from'),
'Agahnim 1': (None, False, 'from my wizardry form'),
'Agahnim 2': (None, False, 'from my wizardry form'),
'Armos - Pendant': ([0x1209D, 0x53EF8, 0x53EF9, 0x180052, 0x18007C, 0xC6FE], True, 'Eastern Palace'),
'Lanmolas - Pendant': ([0x1209E, 0x53F1C, 0x53F1D, 0x180053, 0x180078, 0xC6FF], True, 'Desert Palace'),
'Moldorm - Pendant': ([0x120A5, 0x53F0A, 0x53F0B, 0x18005A, 0x18007A, 0xC706], True, 'Tower of Hera'),
Expand Down