mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: Attribute per slot random directly to the World and discourage using MultiWorld's random (#1649)
* add a random object to the World * use it in The Messenger * the worlds don't exist until the end of set options * set seed in lttp tests * use world.random for shop shuffle
This commit is contained in:
@@ -102,7 +102,7 @@ class MessengerWorld(World):
|
||||
# make a list of all notes except those in the player's defined starting inventory, and adjust the
|
||||
# amount we need to put in the itempool and precollect based on that
|
||||
notes = [note for note in NOTES if note not in self.multiworld.precollected_items[self.player]]
|
||||
self.multiworld.per_slot_randoms[self.player].shuffle(notes)
|
||||
self.random.shuffle(notes)
|
||||
precollected_notes_amount = NotesNeeded.range_end - \
|
||||
self.multiworld.notes_needed[self.player] - \
|
||||
(len(NOTES) - len(notes))
|
||||
@@ -129,7 +129,7 @@ class MessengerWorld(World):
|
||||
filler_pool = dict(list(FILLER.items())[2:]) if remaining_fill < 10 else FILLER
|
||||
itempool += [self.create_item(filler_item)
|
||||
for filler_item in
|
||||
self.multiworld.random.choices(
|
||||
self.random.choices(
|
||||
list(filler_pool),
|
||||
weights=list(filler_pool.values()),
|
||||
k=remaining_fill
|
||||
|
||||
Reference in New Issue
Block a user