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)
|
self.world.itempool.remove(item_to_place)
|
||||||
|
|
||||||
# Exclude locations in Ganon's Castle proportional to the number of items required to make the bridge
|
# Exclude locations in Ganon's Castle proportional to the number of items required to make the bridge
|
||||||
if self.bridge == 'medallions':
|
# Check for dungeon ER later
|
||||||
ganon_junk_fill = self.bridge_medallions / 9
|
if self.logic_rules == 'glitchless':
|
||||||
elif self.bridge == 'stones':
|
if self.bridge == 'medallions':
|
||||||
ganon_junk_fill = self.bridge_stones / 9
|
ganon_junk_fill = self.bridge_medallions / 9
|
||||||
elif self.bridge == 'dungeons':
|
elif self.bridge == 'stones':
|
||||||
ganon_junk_fill = self.bridge_rewards / 9
|
ganon_junk_fill = self.bridge_stones / 9
|
||||||
elif self.bridge == 'vanilla':
|
elif self.bridge == 'dungeons':
|
||||||
ganon_junk_fill = 2 / 9
|
ganon_junk_fill = self.bridge_rewards / 9
|
||||||
elif self.bridge == 'tokens':
|
elif self.bridge == 'vanilla':
|
||||||
ganon_junk_fill = self.bridge_tokens / 100
|
ganon_junk_fill = 2 / 9
|
||||||
elif self.bridge == 'open':
|
elif self.bridge == 'tokens':
|
||||||
ganon_junk_fill = 0
|
ganon_junk_fill = self.bridge_tokens / 100
|
||||||
else:
|
elif self.bridge == 'open':
|
||||||
raise Exception("Unexpected bridge setting")
|
ganon_junk_fill = 0
|
||||||
|
else:
|
||||||
|
raise Exception("Unexpected bridge setting")
|
||||||
|
|
||||||
gc = next(filter(lambda dungeon: dungeon.name == 'Ganons Castle', self.dungeons))
|
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]
|
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))
|
junk_fill_locations = self.world.random.sample(locations, round(len(locations) * ganon_junk_fill))
|
||||||
print(junk_fill_locations)
|
print(junk_fill_locations)
|
||||||
exclusion_rules(self.world, self.player, junk_fill_locations)
|
exclusion_rules(self.world, self.player, junk_fill_locations)
|
||||||
|
|
||||||
# Locations which are not sendable must be converted to events
|
# 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.
|
# This includes all locations for which show_in_spoiler is false, and shuffled shop items.
|
||||||
|
|
Loading…
Reference in New Issue