Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SM64: Move Randomizer Content Update #2569

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion worlds/sm64ex/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ class SM64Item(Item):
"1Up Mushroom": 3626184
}

action_item_table = {
"Double Jump": 3626185,
"Triple Jump": 3626186,
"Long Jump": 3626187,
"Backflip": 3626188,
"Side Flip": 3626189,
"Wall Kick": 3626190,
"Dive": 3626191,
"Ground Pound": 3626192,
"Kick": 3626193,
"Climb": 3626194,
"Ledge Grab": 3626195
}


cannon_item_table = {
"Cannon Unlock BoB": 3626200,
"Cannon Unlock WF": 3626201,
Expand All @@ -29,4 +44,4 @@ class SM64Item(Item):
"Cannon Unlock RR": 3626214
}

item_table = {**generic_item_table, **cannon_item_table}
item_table = {**generic_item_table, **action_item_table, **cannon_item_table}
88 changes: 58 additions & 30 deletions worlds/sm64ex/Options.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import typing
from Options import Option, DefaultOnToggle, Range, Toggle, DeathLink, Choice

from .Items import action_item_table

class EnableCoinStars(DefaultOnToggle):
"""Disable to Ignore 100 Coin Stars. You can still collect them, but they don't do anything"""
"""Disable to Ignore 100 Coin Stars. You can still collect them, but they don't do anything.
Removes 15 locations from the pool."""
display_name = "Enable 100 Coin Stars"


Expand All @@ -13,56 +14,63 @@ class StrictCapRequirements(DefaultOnToggle):


class StrictCannonRequirements(DefaultOnToggle):
"""If disabled, Stars that expect cannons may have to be acquired without them. Only makes a difference if Buddy
Checks are enabled"""
"""If disabled, Stars that expect cannons may have to be acquired without them.
Has no effect if Buddy Checks and Move Randomizer are disabled"""
display_name = "Strict Cannon Requirements"


class FirstBowserStarDoorCost(Range):
"""How many stars are required at the Star Door to Bowser in the Dark World"""
"""What percent of the total stars are required at the Star Door to Bowser in the Dark World"""
display_name = "First Star Door Cost %"
range_start = 0
range_end = 50
default = 8
range_end = 40
default = 7


class BasementStarDoorCost(Range):
"""How many stars are required at the Star Door in the Basement"""
"""What percent of the total stars are required at the Star Door in the Basement"""
display_name = "Basement Star Door %"
range_start = 0
range_end = 70
default = 30
range_end = 50
default = 25


class SecondFloorStarDoorCost(Range):
"""How many stars are required to access the third floor"""
"""What percent of the total stars are required to access the third floor"""
display_name = 'Second Floor Star Door %'
range_start = 0
range_end = 90
default = 50
range_end = 70
default = 42


class MIPS1Cost(Range):
"""How many stars are required to spawn MIPS the first time"""
"""What percent of the total stars are required to spawn MIPS the first time"""
display_name = "MIPS 1 Star %"
range_start = 0
range_end = 40
default = 15
range_end = 35
default = 12


class MIPS2Cost(Range):
"""How many stars are required to spawn MIPS the second time."""
"""What percent of the total stars are required to spawn MIPS the second time."""
display_name = "MIPS 2 Star %"
range_start = 0
range_end = 80
default = 50
range_end = 70
default = 42


class StarsToFinish(Range):
"""How many stars are required at the infinite stairs"""
display_name = "Endless Stairs Stars"
"""What percent of the total stars are required at the infinite stairs"""
display_name = "Endless Stairs Star %"
range_start = 0
range_end = 100
default = 70
range_end = 90
default = 58


class AmountOfStars(Range):
"""How many stars exist. Disabling 100 Coin Stars removes 15 from the Pool. At least max of any Cost set"""
"""How many stars exist.
If there aren't enough locations to hold the given total, the total will be reduced."""
display_name = "Total Power Stars"
range_start = 35
range_end = 120
default = 120
Expand All @@ -83,11 +91,13 @@ class BuddyChecks(Toggle):


class ExclamationBoxes(Choice):
"""Include 1Up Exclamation Boxes during randomization"""
"""Include 1Up Exclamation Boxes during randomization.
Adds 29 locations to the pool."""
display_name = "Randomize 1Up !-Blocks"
option_Off = 0
option_1Ups_Only = 1


class CompletionType(Choice):
"""Set goal for game completion"""
display_name = "Completion Goal"
Expand All @@ -96,25 +106,43 @@ class CompletionType(Choice):


class ProgressiveKeys(DefaultOnToggle):
"""Keys will first grant you access to the Basement, then to the Secound Floor"""
"""Keys will first grant you access to the Basement, then to the Second Floor"""
display_name = "Progressive Keys"

class StrictMoveRequirements(DefaultOnToggle):
"""If disabled, Stars that expect certain moves may have to be acquired without them. Only makes a difference
if Move Randomization is enabled"""
display_name = "Strict Move Requirements"

def getMoveRandomizerOption(action: str):
class MoveRandomizerOption(Toggle):
"""Mario is unable to perform this action until a corresponding item is picked up.
This option is incompatible with builds using a 'nomoverando' branch."""
display_name = f"Randomize {action}"
return MoveRandomizerOption


sm64_options: typing.Dict[str, type(Option)] = {
"AreaRandomizer": AreaRandomizer,
"BuddyChecks": BuddyChecks,
"ExclamationBoxes": ExclamationBoxes,
"ProgressiveKeys": ProgressiveKeys,
"EnableCoinStars": EnableCoinStars,
"AmountOfStars": AmountOfStars,
"StrictCapRequirements": StrictCapRequirements,
"StrictCannonRequirements": StrictCannonRequirements,
"StrictMoveRequirements": StrictMoveRequirements,
"AmountOfStars": AmountOfStars,
"FirstBowserStarDoorCost": FirstBowserStarDoorCost,
"BasementStarDoorCost": BasementStarDoorCost,
"SecondFloorStarDoorCost": SecondFloorStarDoorCost,
"MIPS1Cost": MIPS1Cost,
"MIPS2Cost": MIPS2Cost,
"StarsToFinish": StarsToFinish,
"death_link": DeathLink,
"BuddyChecks": BuddyChecks,
"ExclamationBoxes": ExclamationBoxes,
"CompletionType" : CompletionType,
"CompletionType": CompletionType,
}

for action in action_item_table:
# HACK: Disable randomization of double jump
if action == 'Double Jump': continue
sm64_options[f"MoveRandomizer{action.replace(' ','')}"] = getMoveRandomizerOption(action)
Loading
Loading