diff --git a/worlds/sm64ex/Options.py b/worlds/sm64ex/Options.py index f29a65c5..88d27bb3 100644 --- a/worlds/sm64ex/Options.py +++ b/worlds/sm64ex/Options.py @@ -46,7 +46,7 @@ class MIPS1Cost(Range): class MIPS2Cost(Range): - """How many stars are required to spawn MIPS the secound time. Must be bigger or equal MIPS1Cost""" + """How many stars are required to spawn MIPS the second time.""" range_start = 0 range_end = 80 default = 50 @@ -72,7 +72,8 @@ class AreaRandomizer(Choice): display_name = "Entrance Randomizer" option_Off = 0 option_Courses_Only = 1 - option_Courses_and_Secrets = 2 + option_Courses_and_Secrets_Separate = 2 + option_Courses_and_Secrets = 3 class BuddyChecks(Toggle): diff --git a/worlds/sm64ex/Rules.py b/worlds/sm64ex/Rules.py index 24622062..2397f2c8 100644 --- a/worlds/sm64ex/Rules.py +++ b/worlds/sm64ex/Rules.py @@ -11,13 +11,14 @@ def fix_reg(entrance_ids, reg, invalidspot, swaplist, world): def set_rules(world, player: int, area_connections): destination_regions = list(range(13)) + [12,13,14] + list(range(15,15+len(sm64secrets))) # Two instances of Destination Course THI. Past normal course idx are secret regions - if world.AreaRandomizer[player].value == 0: - entrance_ids = list(range(len(sm64paintings + sm64secrets))) - if world.AreaRandomizer[player].value >= 1: # Some randomization is happening, randomize Courses - entrance_ids = list(range(len(sm64paintings))) - world.random.shuffle(entrance_ids) - entrance_ids = entrance_ids + list(range(len(sm64paintings), len(sm64paintings) + len(sm64secrets))) - if world.AreaRandomizer[player].value == 2: # Secret Regions as well + secret_entrance_ids = list(range(len(sm64paintings), len(sm64paintings) + len(sm64secrets))) + course_entrance_ids = list(range(len(sm64paintings))) + if world.AreaRandomizer[player].value >= 1: # Some randomization is happening, randomize Courses + world.random.shuffle(course_entrance_ids) + if world.AreaRandomizer[player].value == 2: # Randomize Secrets as well + world.random.shuffle(secret_entrance_ids) + entrance_ids = course_entrance_ids + secret_entrance_ids + if world.AreaRandomizer[player].value == 3: # Randomize Courses and Secrets in one pool world.random.shuffle(entrance_ids) # Guarantee first entrance is a course swaplist = list(range(len(entrance_ids))) @@ -117,7 +118,7 @@ def set_rules(world, player: int, area_connections): add_rule(world.get_location("Toad (Third Floor)", player), lambda state: state.can_reach("Third Floor", 'Region', player) and state.has("Power Star", player, 35)) if world.MIPS1Cost[player].value > world.MIPS2Cost[player].value: - world.MIPS2Cost[player].value = world.MIPS1Cost[player].value + (world.MIPS2Cost[player].value, world.MIPS1Cost[player].value) = (world.MIPS1Cost[player].value, world.MIPS2Cost[player].value) add_rule(world.get_location("MIPS 1", player), lambda state: state.can_reach("Basement", 'Region', player) and state.has("Power Star", player, world.MIPS1Cost[player].value)) add_rule(world.get_location("MIPS 2", player), lambda state: state.can_reach("Basement", 'Region', player) and state.has("Power Star", player, world.MIPS2Cost[player].value))