Merge pull request #228 from Mathx2/main

Increase Location count and Item pool count
This commit is contained in:
Hussein Farran 2022-01-25 10:50:21 -05:00 committed by GitHub
commit b26bce8fde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -13,9 +13,9 @@ base_location_table = {
"Level Four": None,
"Level Five": None
}
# 37006 - 37106
# 37006 - 37506
item_pickups = {
f"ItemPickup{i}": 37005+i for i in range(1, 101)
f"ItemPickup{i}": 37005+i for i in range(1, 501)
}
location_table = {**base_location_table, **item_pickups}

View File

@ -6,13 +6,13 @@ class TotalLocations(Range):
"""Number of location checks which are added to the Risk of Rain playthrough."""
displayname = "Total Locations"
range_start = 10
range_end = 100
range_end = 500
default = 20
class TotalRevivals(Range):
"""Number of `Dio's Best Friend` item put in the item pool."""
displayname = "Total Revivals Available"
"""Total Percentage of `Dio's Best Friend` item put in the item pool."""
displayname = "Total Percentage Revivals Available"
range_start = 0
range_end = 10
default = 4
@ -166,4 +166,4 @@ ror2_options: typing.Dict[str, type(Option)] = {
"item_weights": ItemWeights,
"item_pool_presets": ItemPoolPresetToggle,
**ror2_weights
}
}

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))