From eb8f4393cf1af09c3cd06f1aa6e22e33e75804ab Mon Sep 17 00:00:00 2001 From: Fenhl Date: Sun, 9 Jul 2023 16:53:02 +0000 Subject: [PATCH] plando: Allow #Vanilla for dungeon reward locations --- Plandomizer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Plandomizer.py b/Plandomizer.py index 97a30cfc3..f99116632 100644 --- a/Plandomizer.py +++ b/Plandomizer.py @@ -799,7 +799,11 @@ def fill_bosses(self, world: World, prize_locs: list[Location], prizepool: list[ if record.player is not None and (record.player - 1) != self.id: raise RuntimeError('A boss can only give rewards in its own world') - valid_items = self.get_valid_items_from_record(prizepool, used_items, record) + valid_items = [] + if record.item == "#Vanilla": # Get vanilla item at this location from the location table + valid_items.append(location_table[name][4]) + else: # Do normal method of getting valid items for this location + valid_items = self.get_valid_items_from_record(prizepool, used_items, record) if valid_items: # Choices still available in the item pool, choose one, mark it as a used item record.item = random.choices(valid_items)[0] if used_items is not None: