From 9f126ad0d070c0eb42bdf416a11775aa7d01307f Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 22 Oct 2023 06:48:06 +0200 Subject: [PATCH] The Witness: Fix random events not having the correct probabilities (#2340) --- worlds/witness/__init__.py | 2 +- worlds/witness/hints.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index faaafd59..28eaba64 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -66,7 +66,7 @@ class WitnessWorld(World): def _get_slot_data(self): return { - 'seed': self.multiworld.per_slot_randoms[self.player].randint(0, 1000000), + 'seed': self.random.randrange(0, 1000000), 'victory_location': int(self.player_logic.VICTORY_LOCATION, 16), 'panelhex_to_id': self.locat.CHECK_PANELHEX_TO_ID, 'item_id_to_door_hexes': StaticWitnessItems.get_item_to_door_mappings(), diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 5d8bd5d3..4fd0edc4 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -306,7 +306,7 @@ def make_hints(multiworld: MultiWorld, player: int, hint_amount: int): else: hints.append((f"{loc} contains {item[0]}.", item[2])) - next_random_hint_is_item = multiworld.per_slot_randoms[player].randint(0, 2) + next_random_hint_is_item = multiworld.per_slot_randoms[player].randrange(0, 2) # Moving this to the new system is in the bigger refactoring PR while len(hints) < hint_amount: if next_random_hint_is_item: