diff --git a/worlds/ahit/Items.py b/worlds/ahit/Items.py index fc6d82b1af..699568678c 100644 --- a/worlds/ahit/Items.py +++ b/worlds/ahit/Items.py @@ -75,12 +75,12 @@ def create_junk_items(world: World, count: int) -> typing.List[Item]: trap_list[name] = world.multiworld.ParadeTrapWeight[world.player].value for i in range(count): - if trap_chance > 0 and world.multiworld.random.randint(1, 100) <= trap_chance: + if trap_chance > 0 and world.random.randint(1, 100) <= trap_chance: junk_pool += [world.create_item( - world.multiworld.random.choices(list(trap_list.keys()), weights=list(trap_list.values()), k=1)[0])] + world.random.choices(list(trap_list.keys()), weights=list(trap_list.values()), k=1)[0])] else: junk_pool += [world.create_item( - world.multiworld.random.choices(list(junk_list.keys()), weights=list(junk_list.values()), k=1)[0])] + world.random.choices(list(junk_list.keys()), weights=list(junk_list.values()), k=1)[0])] return junk_pool diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index 05bb706dff..7102c5c434 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -422,7 +422,7 @@ def create_tasksanity_locations(world: World): def randomize_act_entrances(world: World): region_list: typing.List[Region] = get_act_regions(world) - world.multiworld.random.shuffle(region_list) + world.random.shuffle(region_list) separate_rifts: bool = bool(world.multiworld.ActRandomizer[world.player].value == 1) @@ -543,7 +543,7 @@ def randomize_act_entrances(world: World): candidate_list.append(candidate) - candidate: Region = candidate_list[world.multiworld.random.randint(0, len(candidate_list)-1)] + candidate: Region = candidate_list[world.random.randint(0, len(candidate_list)-1)] shuffled_list.append(candidate) # Vanilla @@ -635,8 +635,8 @@ def create_badge_seller(world: World) -> Region: max_items: int = 0 if world.multiworld.BadgeSellerMaxItems[world.player].value > 0: - max_items = world.multiworld.random.randint(world.multiworld.BadgeSellerMinItems[world.player].value, - world.multiworld.BadgeSellerMaxItems[world.player].value) + max_items = world.random.randint(world.multiworld.BadgeSellerMinItems[world.player].value, + world.multiworld.BadgeSellerMaxItems[world.player].value) if max_items <= 0: world.badge_seller_count = 0 @@ -731,7 +731,7 @@ def create_thug_shops(world: World): pass if count == -1: - count = world.multiworld.random.randint(min_items, max_items) + count = world.random.randint(min_items, max_items) world.nyakuza_thug_items.setdefault(data.nyakuza_thug, count) if count <= 0: continue diff --git a/worlds/ahit/Rules.py b/worlds/ahit/Rules.py index 91568e5af5..73da7b02c8 100644 --- a/worlds/ahit/Rules.py +++ b/worlds/ahit/Rules.py @@ -111,7 +111,7 @@ def set_rules(world: World): chapter_list.append(ChapterIndex.METRO) chapter_list.remove(starting_chapter) - world.multiworld.random.shuffle(chapter_list) + world.random.shuffle(chapter_list) if starting_chapter is not ChapterIndex.ALPINE and dlc1 or dlc2: index1: int = 69 @@ -129,7 +129,7 @@ def set_rules(world: World): if lowest_index == 0: pos = 0 else: - pos = world.multiworld.random.randint(0, lowest_index) + pos = world.random.randint(0, lowest_index) chapter_list.insert(pos, ChapterIndex.ALPINE) @@ -147,10 +147,10 @@ def set_rules(world: World): if min_range >= highest_cost: min_range = highest_cost-1 - value: int = world.multiworld.random.randint(min_range, min(highest_cost, + value: int = world.random.randint(min_range, min(highest_cost, max(lowest_cost, last_cost + cost_increment))) - cost = world.multiworld.random.randint(value, min(value + cost_increment, highest_cost)) + cost = world.random.randint(value, min(value + cost_increment, highest_cost)) if loop_count >= 1: if last_cost + min_difference > cost: cost = last_cost + min_difference @@ -160,7 +160,7 @@ def set_rules(world: World): last_cost = cost loop_count += 1 - world.set_chapter_cost(final_chapter, world.multiworld.random.randint( + world.set_chapter_cost(final_chapter, world.random.randint( world.multiworld.FinalChapterMinCost[world.player].value, world.multiworld.FinalChapterMaxCost[world.player].value)) diff --git a/worlds/ahit/__init__.py b/worlds/ahit/__init__.py index cd6da357eb..02cff1950d 100644 --- a/worlds/ahit/__init__.py +++ b/worlds/ahit/__init__.py @@ -100,7 +100,7 @@ class HatInTimeWorld(World): itempool += yarn_pool if self.multiworld.RandomizeHatOrder[self.player].value > 0: - self.multiworld.random.shuffle(hat_craft_order[self.player]) + self.random.shuffle(hat_craft_order[self.player]) for name in item_table.keys(): if name == "Yarn":