New option - NoFreeRoamFinale

This commit is contained in:
CookieCat
2023-08-28 22:19:57 -04:00
parent 906c41275e
commit 1fd2a21e5b
2 changed files with 21 additions and 2 deletions

View File

@@ -81,6 +81,11 @@ class VanillaAlpine(Choice):
default = 0
class NoFreeRoamFinale(Toggle):
"""If enabled, prevent Free Roam acts from being shuffled onto chapter finales."""
default = 1
class LogicDifficulty(Choice):
"""Choose the difficulty setting for logic. Note that Hard or above will force SDJ logic on."""
display_name = "Logic Difficulty"
@@ -264,7 +269,7 @@ class ChapterCostMinDifference(Range):
class LowestChapterCost(Range):
"""Value determining the lowest possible cost for a chapter.
Chapter costs will, progressively, be calculated based on this value (except for Chapter 5)."""
Chapter costs will, progressively, be calculated based on this value (except for the final chapter)."""
display_name = "Lowest Possible Chapter Cost"
range_start = 0
range_end = 10
@@ -273,7 +278,7 @@ class LowestChapterCost(Range):
class HighestChapterCost(Range):
"""Value determining the highest possible cost for a chapter.
Chapter costs will, progressively, be calculated based on this value (except for Chapter 5)."""
Chapter costs will, progressively, be calculated based on this value (except for the final chapter)."""
display_name = "Highest Possible Chapter Cost"
range_start = 15
range_end = 45
@@ -432,6 +437,7 @@ ahit_options: typing.Dict[str, type(Option)] = {
"ActRandomizer": ActRandomizer,
"ShuffleAlpineZiplines": ShuffleAlpineZiplines,
"VanillaAlpine": VanillaAlpine,
"NoFreeRoamFinale": NoFreeRoamFinale,
"LogicDifficulty": LogicDifficulty,
"RandomizeHatOrder": RandomizeHatOrder,
"UmbrellaLogic": UmbrellaLogic,

View File

@@ -237,6 +237,14 @@ purple_time_rifts = [
"Time Rift - Rumbi Factory",
]
chapter_finales = [
"Dead Bird Studio Basement",
"Your Contract has Expired",
"The Illness has Spread",
"Rock the Boat",
"Rush Hour",
]
# Acts blacklisted in act shuffle
# entrance: region
blacklisted_acts = {
@@ -473,6 +481,11 @@ def randomize_act_entrances(world: World):
candidate_list.append(region)
break
if world.multiworld.NoFreeRoamFinale[world.player].value > 0 and "Free Roam" in candidate.name:
# CTR entrance isn't a finale, but has a fuck ton of unlock requirements
if region.name in chapter_finales or region.name == "Cheating the Race":
continue
if region.name == "Rush Hour":
if world.multiworld.EndGoal[world.player].value == 2 or \
world.multiworld.VanillaMetro[world.player].value == 2: