OoT: place Deku Shields first in closed forest + shopsanity

This commit is contained in:
espeon65536 2021-10-01 09:20:40 -05:00 committed by Fabian Dill
parent 0d9e186e18
commit fa1b93252c
1 changed files with 5 additions and 1 deletions

View File

@ -641,7 +641,11 @@ class OOTWorld(World):
shop_locations = list(
filter(lambda location: location.type == 'Shop' and location.name not in self.shop_prices,
self.world.get_unfilled_locations(player=self.player)))
shop_items.sort(key=lambda item: int(item.advancement)) # place progression shop items first
shop_items.sort(key=lambda item: {
'Buy Deku Shield': 3*int(self.open_forest == 'closed'),
'Buy Goron Tunic': 2,
'Buy Zora Tunic': 2
}.get(item.name, int(item.advancement))) # place Deku Shields if needed, then tunics, then other advancement, then junk
self.world.random.shuffle(shop_locations)
for item in shop_items:
self.world.itempool.remove(item)