Risk of Rain 2: fix missing ItemPickup location (off by one itempool)
This commit is contained in:
parent
7599302920
commit
fafc17c7d3
|
@ -73,14 +73,13 @@ class RiskOfRainWorld(World):
|
||||||
if not self.world.enable_lunar[self.player]:
|
if not self.world.enable_lunar[self.player]:
|
||||||
junk_pool.pop("Lunar Item")
|
junk_pool.pop("Lunar Item")
|
||||||
|
|
||||||
|
|
||||||
# Fill remaining items with randomly generated junk
|
# Fill remaining items with randomly generated junk
|
||||||
itempool += self.world.random.choices(list(junk_pool.keys()), weights=list(junk_pool.values()),
|
itempool += self.world.random.choices(list(junk_pool.keys()), weights=list(junk_pool.values()),
|
||||||
k=self.world.total_locations[self.player] -
|
k=self.world.total_locations[self.player] -
|
||||||
self.world.total_revivals[self.player] - self.world.start_with_revive[self.player].value)
|
self.world.total_revivals[self.player])
|
||||||
|
|
||||||
# Convert itempool into real items
|
# Convert itempool into real items
|
||||||
itempool = [item for item in map(lambda name: self.create_item(name), itempool)]
|
itempool = list(map(lambda name: self.create_item(name), itempool))
|
||||||
|
|
||||||
self.world.itempool += itempool
|
self.world.itempool += itempool
|
||||||
|
|
||||||
|
@ -110,7 +109,7 @@ def create_regions(world, player: int):
|
||||||
create_region(world, player, 'Menu', None, ['Lobby']),
|
create_region(world, player, 'Menu', None, ['Lobby']),
|
||||||
create_region(world, player, 'Petrichor V',
|
create_region(world, player, 'Petrichor V',
|
||||||
[location for location in base_location_table] +
|
[location for location in base_location_table] +
|
||||||
[f"ItemPickup{i}" for i in range(1, world.total_locations[player])])
|
[f"ItemPickup{i}" for i in range(1, 1+world.total_locations[player])])
|
||||||
]
|
]
|
||||||
|
|
||||||
world.get_entrance("Lobby", player).connect(world.get_region("Petrichor V", player))
|
world.get_entrance("Lobby", player).connect(world.get_region("Petrichor V", player))
|
||||||
|
@ -127,7 +126,7 @@ def create_region(world: MultiWorld, player: int, name: str, locations=None, exi
|
||||||
ret.world = world
|
ret.world = world
|
||||||
if locations:
|
if locations:
|
||||||
for location in locations:
|
for location in locations:
|
||||||
loc_id = location_table.get(location, 0)
|
loc_id = location_table[location]
|
||||||
location = RiskOfRainLocation(player, location, loc_id, ret)
|
location = RiskOfRainLocation(player, location, loc_id, ret)
|
||||||
ret.locations.append(location)
|
ret.locations.append(location)
|
||||||
if exits:
|
if exits:
|
||||||
|
|
Loading…
Reference in New Issue