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

LADX: enable upstream options #3962

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
107 changes: 72 additions & 35 deletions worlds/ladx/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os.path
import typing
import logging
from Options import Choice, Toggle, DefaultOnToggle, Range, FreeText, PerGameCommonOptions, OptionGroup
from Options import Choice, Toggle, DefaultOnToggle, Range, FreeText, PerGameCommonOptions, OptionGroup, Visibility
from collections import defaultdict
import Utils

Expand Down Expand Up @@ -278,11 +278,21 @@ class MusicChangeCondition(Choice):
# [Start with 1] normal game, you just start with 1 heart instead of 3.
# [Low max] replace heart containers with heart pieces."""),

# Setting('hardmode', 'Gameplay', 'X', 'Hard mode', options=[('none', '', 'Disabled'), ('oracle', 'O', 'Oracle'), ('hero', 'H', 'Hero'), ('ohko', '1', 'One hit KO')], default='none',
# description="""
# [Oracle] Less iframes and heath from drops. Bombs damage yourself. Water damages you without flippers. No piece of power or acorn.
# [Hero] Switch version hero mode, double damage, no heart/fairy drops.
# [One hit KO] You die on a single hit, always."""),

class HardMode(Choice, LADXROption):
"""
[Oracle] Less iframes and health from drops. Bombs damage yourself. Water damages you without flippers. No piece of power or acorn.
[Hero] Switch version hero mode, double damage, no heart/fairy drops.
[One hit KO] You die on a single hit, always.
"""
display_name = "Hard Mode"
ladxr_name = "hardmode"
option_none = 0
option_oracle = 1
option_hero = 2
option_ohko = 3
default = option_none


# Setting('steal', 'Gameplay', 't', 'Stealing from the shop',
# options=[('always', 'a', 'Always'), ('never', 'n', 'Never'), ('default', '', 'Normal')], default='default',
Expand Down Expand Up @@ -317,35 +327,54 @@ class Overworld(Choice, LADXROption):

# Setting('superweapons', 'Special', 'q', 'Enable super weapons', default=False,
# description='All items will be more powerful, faster, harder, bigger stronger. You name it.'),
# Setting('quickswap', 'User options', 'Q', 'Quickswap', options=[('none', '', 'Disabled'), ('a', 'a', 'Swap A button'), ('b', 'b', 'Swap B button')], default='none',
# description='Adds that the select button swaps with either A or B. The item is swapped with the top inventory slot. The map is not available when quickswap is enabled.',
# aesthetic=True),
# Setting('textmode', 'User options', 'f', 'Text mode', options=[('fast', '', 'Fast'), ('default', 'd', 'Normal'), ('none', 'n', 'No-text')], default='fast',
# description="""[Fast] makes text appear twice as fast.
# [No-Text] removes all text from the game""", aesthetic=True),
# Setting('lowhpbeep', 'User options', 'p', 'Low HP beeps', options=[('none', 'D', 'Disabled'), ('slow', 'S', 'Slow'), ('default', 'N', 'Normal')], default='slow',
# description='Slows or disables the low health beeping sound', aesthetic=True),
# Setting('noflash', 'User options', 'l', 'Remove flashing lights', default=True,
# description='Remove the flashing light effects from Mamu, shopkeeper and MadBatter. Useful for capture cards and people that are sensitive for these things.',
# aesthetic=True),
# Setting('nagmessages', 'User options', 'S', 'Show nag messages', default=False,
# description='Enables the nag messages normally shown when touching stones and crystals',
# aesthetic=True),
# Setting('gfxmod', 'User options', 'c', 'Graphics', options=gfx_options, default='',
# description='Generally affects at least Link\'s sprite, but can alter any graphics in the game',
# aesthetic=True),
# Setting('linkspalette', 'User options', 'C', "Link's color",
# options=[('-1', '-', 'Normal'), ('0', '0', 'Green'), ('1', '1', 'Yellow'), ('2', '2', 'Red'), ('3', '3', 'Blue'),
# ('4', '4', '?? A'), ('5', '5', '?? B'), ('6', '6', '?? C'), ('7', '7', '?? D')], default='-1', aesthetic=True,
# description="""Allows you to force a certain color on link.
# [Normal] color of link depends on the tunic.
# [Green/Yellow/Red/Blue] forces link into one of these colors.
# [?? A/B/C/D] colors of link are usually inverted and color depends on the area you are in."""),
# Setting('music', 'User options', 'M', 'Music', options=[('', '', 'Default'), ('random', 'r', 'Random'), ('off', 'o', 'Disable')], default='',
# description="""
# [Random] Randomizes overworld and dungeon music'
# [Disable] no music in the whole game""",
# aesthetic=True),


class Quickswap(Choice, LADXROption):
"""
Adds that the select buttons swaps with either A or B. The item is swapped with the top inventory slot. The map is not available when quickswap is enabled.
"""
display_name = "Quickswap"
ladxr_name = "quickswap"
option_none = 0
option_a = 1
option_b = 2
default = option_none


class TextMode(Choice, LADXROption):
"""
[Fast] Makes text appear twice as fast
[No-Text] Removes all text from the game
"""
display_name = "Text Mode"
ladxr_name = "textmode"
option_default = 0
option_fast = 1
option_none = 2
default = option_default
visibility = Visibility.none


class LowHpBeep(Choice, LADXROption):
"""
Slows or disables the low health beeping sound.
"""
display_name = "Low HP Beep"
ladxr_name = "lowhpbeep"
option_default = 0
option_slow = 1
option_none = 2
default = option_default


class NoFlash(DefaultOnToggle, LADXROption):
"""
Remove the flashing light effects from Mamu, shopkeeper and MadBatter. Useful for capture cards and people that are sensitive for these things.
"""
display_name = "No Flash"
ladxr_name = "noflash"
visibility = Visibility.none


class BootsControls(Choice):
"""
Expand Down Expand Up @@ -523,6 +552,9 @@ class AdditionalWarpPoints(DefaultOffToggle):
Rooster,
TrendyGame,
NagMessages,
Quickswap,
HardMode,
LowHpBeep,
BootsControls
]),
OptionGroup("Experimental", [
Expand Down Expand Up @@ -579,3 +611,8 @@ class LinksAwakeningOptions(PerGameCommonOptions):
nag_messages: NagMessages
ap_title_screen: APTitleScreen
boots_controls: BootsControls
quickswap: Quickswap
hard_mode: HardMode
low_hp_beep: LowHpBeep
text_mode: TextMode
no_flash: NoFlash
20 changes: 16 additions & 4 deletions worlds/ladx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,22 @@ def fill_slot_data(self):
slot_options = ["instrument_count"]

slot_options_display_name = [
"goal", "logic", "tradequest", "rooster",
"experimental_dungeon_shuffle", "experimental_entrance_shuffle", "trendy_game", "gfxmod",
"shuffle_nightmare_keys", "shuffle_small_keys", "shuffle_maps",
"shuffle_compasses", "shuffle_stone_beaks", "shuffle_instruments", "nag_messages"
"goal",
"logic",
"tradequest",
"rooster",
"experimental_dungeon_shuffle",
"experimental_entrance_shuffle",
"trendy_game",
"gfxmod",
"shuffle_nightmare_keys",
"shuffle_small_keys",
"shuffle_maps",
"shuffle_compasses",
"shuffle_stone_beaks",
"shuffle_instruments",
"nag_messages",
"hard_mode",
]

# use the default behaviour to grab options
Expand Down
Loading