Convert revives to a percent of total locations
This commit is contained in:
parent
8550c071a2
commit
341fefda01
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue