Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plando: Allow #Vanilla for dungeon reward locations #2036

Merged
merged 1 commit into from
Jul 16, 2023
Merged
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: 5 additions & 1 deletion Plandomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down