Convert revives to a percent of total locations

This commit is contained in:
Mathx2 2022-01-24 14:43:42 -08:00 committed by GitHub
parent 8550c071a2
commit 341fefda01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -73,12 +73,12 @@ class RiskOfRainWorld(World):
itempool = []
# Add revive items for the player
itempool += ["Dio's Best Friend"] * self.world.total_revivals[self.player]
itempool += ["Dio's Best Friend"] * int(self.world.total_revivals[self.player] / 100 * self.world.total_locations[self.player])
# Fill remaining items with randomly generated junk
itempool += self.world.random.choices(list(junk_pool.keys()), weights=list(junk_pool.values()),
k=self.world.total_locations[self.player] -
self.world.total_revivals[self.player])
int(self.world.total_revivals[self.player] / 100 * self.world.total_locations[self.player]))
# Convert itempool into real items
itempool = list(map(lambda name: self.create_item(name), itempool))