[SM64] Separate Entrance Shuffle pools option and MIPS cost option improvement (#1137)
* Add separate pool option for entrance shuffle and swap MIPS costs if MIPS1Cost is greater * Changes based on N00by's suggestions * split into secret_entrance_ids and course_entrance_ids
This commit is contained in:
parent
c09e089f9d
commit
813ea6ef8b
|
@ -46,7 +46,7 @@ class MIPS1Cost(Range):
|
||||||
|
|
||||||
|
|
||||||
class MIPS2Cost(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_start = 0
|
||||||
range_end = 80
|
range_end = 80
|
||||||
default = 50
|
default = 50
|
||||||
|
@ -72,7 +72,8 @@ class AreaRandomizer(Choice):
|
||||||
display_name = "Entrance Randomizer"
|
display_name = "Entrance Randomizer"
|
||||||
option_Off = 0
|
option_Off = 0
|
||||||
option_Courses_Only = 1
|
option_Courses_Only = 1
|
||||||
option_Courses_and_Secrets = 2
|
option_Courses_and_Secrets_Separate = 2
|
||||||
|
option_Courses_and_Secrets = 3
|
||||||
|
|
||||||
|
|
||||||
class BuddyChecks(Toggle):
|
class BuddyChecks(Toggle):
|
||||||
|
|
|
@ -11,13 +11,14 @@ def fix_reg(entrance_ids, reg, invalidspot, swaplist, world):
|
||||||
|
|
||||||
def set_rules(world, player: int, area_connections):
|
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
|
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:
|
secret_entrance_ids = list(range(len(sm64paintings), len(sm64paintings) + len(sm64secrets)))
|
||||||
entrance_ids = list(range(len(sm64paintings + sm64secrets)))
|
course_entrance_ids = list(range(len(sm64paintings)))
|
||||||
if world.AreaRandomizer[player].value >= 1: # Some randomization is happening, randomize Courses
|
if world.AreaRandomizer[player].value >= 1: # Some randomization is happening, randomize Courses
|
||||||
entrance_ids = list(range(len(sm64paintings)))
|
world.random.shuffle(course_entrance_ids)
|
||||||
world.random.shuffle(entrance_ids)
|
if world.AreaRandomizer[player].value == 2: # Randomize Secrets as well
|
||||||
entrance_ids = entrance_ids + list(range(len(sm64paintings), len(sm64paintings) + len(sm64secrets)))
|
world.random.shuffle(secret_entrance_ids)
|
||||||
if world.AreaRandomizer[player].value == 2: # Secret Regions as well
|
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)
|
world.random.shuffle(entrance_ids)
|
||||||
# Guarantee first entrance is a course
|
# Guarantee first entrance is a course
|
||||||
swaplist = list(range(len(entrance_ids)))
|
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))
|
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:
|
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 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))
|
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))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue