Add glitchless condition to ganon's castle junk fill
This commit is contained in:
parent
b0d5a51768
commit
4e18f24f3b
|
@ -654,26 +654,28 @@ class OOTWorld(World):
|
|||
self.world.itempool.remove(item_to_place)
|
||||
|
||||
# Exclude locations in Ganon's Castle proportional to the number of items required to make the bridge
|
||||
if self.bridge == 'medallions':
|
||||
ganon_junk_fill = self.bridge_medallions / 9
|
||||
elif self.bridge == 'stones':
|
||||
ganon_junk_fill = self.bridge_stones / 9
|
||||
elif self.bridge == 'dungeons':
|
||||
ganon_junk_fill = self.bridge_rewards / 9
|
||||
elif self.bridge == 'vanilla':
|
||||
ganon_junk_fill = 2 / 9
|
||||
elif self.bridge == 'tokens':
|
||||
ganon_junk_fill = self.bridge_tokens / 100
|
||||
elif self.bridge == 'open':
|
||||
ganon_junk_fill = 0
|
||||
else:
|
||||
raise Exception("Unexpected bridge setting")
|
||||
# Check for dungeon ER later
|
||||
if self.logic_rules == 'glitchless':
|
||||
if self.bridge == 'medallions':
|
||||
ganon_junk_fill = self.bridge_medallions / 9
|
||||
elif self.bridge == 'stones':
|
||||
ganon_junk_fill = self.bridge_stones / 9
|
||||
elif self.bridge == 'dungeons':
|
||||
ganon_junk_fill = self.bridge_rewards / 9
|
||||
elif self.bridge == 'vanilla':
|
||||
ganon_junk_fill = 2 / 9
|
||||
elif self.bridge == 'tokens':
|
||||
ganon_junk_fill = self.bridge_tokens / 100
|
||||
elif self.bridge == 'open':
|
||||
ganon_junk_fill = 0
|
||||
else:
|
||||
raise Exception("Unexpected bridge setting")
|
||||
|
||||
gc = next(filter(lambda dungeon: dungeon.name == 'Ganons Castle', self.dungeons))
|
||||
locations = [loc.name for region in gc.regions for loc in region.locations if loc.item is None]
|
||||
junk_fill_locations = self.world.random.sample(locations, round(len(locations) * ganon_junk_fill))
|
||||
print(junk_fill_locations)
|
||||
exclusion_rules(self.world, self.player, junk_fill_locations)
|
||||
gc = next(filter(lambda dungeon: dungeon.name == 'Ganons Castle', self.dungeons))
|
||||
locations = [loc.name for region in gc.regions for loc in region.locations if loc.item is None]
|
||||
junk_fill_locations = self.world.random.sample(locations, round(len(locations) * ganon_junk_fill))
|
||||
print(junk_fill_locations)
|
||||
exclusion_rules(self.world, self.player, junk_fill_locations)
|
||||
|
||||
# Locations which are not sendable must be converted to events
|
||||
# This includes all locations for which show_in_spoiler is false, and shuffled shop items.
|
||||
|
|
Loading…
Reference in New Issue