Skip to content

Commit

Permalink
New option - NoFreeRoamFinale
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieCat45 committed Aug 29, 2023
1 parent 906c412 commit 1fd2a21
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 8 additions & 2 deletions worlds/ahit/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -432,6 +437,7 @@ class ParadeTrapWeight(Range):
"ActRandomizer": ActRandomizer,
"ShuffleAlpineZiplines": ShuffleAlpineZiplines,
"VanillaAlpine": VanillaAlpine,
"NoFreeRoamFinale": NoFreeRoamFinale,
"LogicDifficulty": LogicDifficulty,
"RandomizeHatOrder": RandomizeHatOrder,
"UmbrellaLogic": UmbrellaLogic,
Expand Down
13 changes: 13 additions & 0 deletions worlds/ahit/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@
"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 = {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1fd2a21

Please sign in to comment.