Skip to content

Commit

Permalink
Merge 'plando: Allow #Vanilla for dungeon reward locations' (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohnson57 committed Jul 16, 2023
2 parents d85ff28 + eb8f439 commit 75f4783
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ issue. You should always Hard Reset to avoid this issue entirely.
* Gossip stone text colors are no longer specified in reverse order.
* Music groups will now add to each other if you have multiple groups of the same name, instead of the last one simply overwriting the others.
* The legacy starting items dictionary has been renamed to `starting_inventory` to make it more distinct from the new `starting_items` which is part of the Settings dictionary.
* The `#Vanilla` item category is now usable for dungeon rewards.

### 7.1

Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '7.1.146'
__version__ = '7.1.147'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 0
Expand Down

0 comments on commit 75f4783

Please sign in to comment.