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: open mabe option #3964

Merged
merged 11 commits into from
Dec 20, 2024
7 changes: 4 additions & 3 deletions worlds/ladx/LADXR/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

from .patches import bank34
from .utils import formatText
from ..Options import TrendyGame, Palette
from .roomEditor import RoomEditor, Object
from .patches.aesthetics import rgb_to_bin, bin_to_rgb

Expand Down Expand Up @@ -154,6 +153,8 @@ def generateRom(args, world: "LinksAwakeningWorld"):
patches.witch.updateWitch(rom)
patches.softlock.fixAll(rom)
patches.maptweaks.tweakMap(rom)
if world.ladxr_settings.overworld == "openmabe":
patches.maptweaks.openMabe(rom)
patches.chest.fixChests(rom)
patches.shop.fixShop(rom)
patches.rooster.patchRooster(rom)
Expand Down Expand Up @@ -249,7 +250,7 @@ def generateRom(args, world: "LinksAwakeningWorld"):
patches.core.quickswap(rom, 1)
elif world.ladxr_settings.quickswap == 'b':
patches.core.quickswap(rom, 0)

patches.core.addBootsControls(rom, world.options.boots_controls)


Expand Down Expand Up @@ -355,7 +356,7 @@ def gen_hint():
# Then put new text in
for bucket_idx, (orig_idx, data) in enumerate(bucket):
rom.texts[shuffled[bucket_idx][0]] = data


if world.options.trendy_game != TrendyGame.option_normal:

Expand Down
7 changes: 6 additions & 1 deletion worlds/ladx/LADXR/logic/overworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ def __init__(self, options, world_setup, r):
self._addEntrance("moblin_cave", graveyard, moblin_cave, None)

# "Ukuku Prairie"
ukuku_prairie = Location().connect(mabe_village, POWER_BRACELET).connect(graveyard, POWER_BRACELET)
ukuku_prairie = Location()
if options.overworld == "openmabe":
ukuku_prairie.connect(mabe_village, r.bush)
else:
ukuku_prairie.connect(mabe_village, POWER_BRACELET)
ukuku_prairie.connect(graveyard, POWER_BRACELET)
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x07B, TRADING_ITEM_STICK)), TRADING_ITEM_BANANAS)
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x087, TRADING_ITEM_HONEYCOMB)), TRADING_ITEM_STICK)
self._addEntrance("prairie_left_phone", ukuku_prairie, None, None)
Expand Down
9 changes: 9 additions & 0 deletions worlds/ladx/LADXR/patches/maptweaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ def addBetaRoom(rom):
re.store(rom)

rom.room_sprite_data_indoor[0x0FC] = rom.room_sprite_data_indoor[0x1A1]


def openMabe(rom):
# replaces rocks on east side of Mabe Village with bushes
re = RoomEditor(rom, 0x094)
re.changeObject(5, 1, 0x5C)
re.overlay[5 + 1 * 10] = 0x5C
re.overlay[5 + 2 * 10] = 0x5C
re.store(rom)
2 changes: 1 addition & 1 deletion worlds/ladx/LADXR/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, ap_options):
[Never] you can never steal from the shop."""),
Setting('bowwow', 'Special', 'g', 'Good boy mode', options=[('normal', '', 'Disabled'), ('always', 'a', 'Enabled'), ('swordless', 's', 'Enabled (swordless)')], default='normal',
description='Allows BowWow to be taken into any area, damage bosses and more enemies. If enabled you always start with bowwow. Swordless option removes the swords from the game and requires you to beat the game without a sword and just bowwow.'),
Setting('overworld', 'Special', 'O', 'Overworld', options=[('normal', '', 'Normal'), ('dungeondive', 'D', 'Dungeon dive'), ('nodungeons', 'N', 'No dungeons'), ('random', 'R', 'Randomized')], default='normal',
Setting('overworld', 'Special', 'O', 'Overworld', options=[('normal', '', 'Normal'), ('dungeondive', 'D', 'Dungeon dive'), ('nodungeons', 'N', 'No dungeons'), ('random', 'R', 'Randomized'), ('openmabe', 'M', 'Open Mabe')], default='normal',
description="""
[Dungeon Dive] Create a different overworld where all the dungeons are directly accessible and almost no chests are located in the overworld.
[No dungeons] All dungeons only consist of a boss fight and a instrument reward. Rest of the dungeon is removed.
Expand Down
10 changes: 5 additions & 5 deletions worlds/ladx/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,12 @@ class Bowwow(Choice):

class Overworld(Choice, LADXROption):
"""
[Dungeon Dive] Create a different overworld where all the dungeons are directly accessible and almost no chests are located in the overworld.
[Tiny dungeons] All dungeons only consist of a boss fight and a instrument reward. Rest of the dungeon is removed.
[Open Mabe] Replaces rock on the east side of Mabe Village with bushes, allowing access to Ukuku Prairie without Power Bracelet.
"""
display_name = "Overworld"
ladxr_name = "overworld"
option_normal = 0
option_dungeon_dive = 1
option_tiny_dungeons = 2
# option_shuffled = 3
option_open_mabe = 1
default = option_normal


Expand Down Expand Up @@ -501,6 +498,7 @@ class AdditionalWarpPoints(DefaultOffToggle):
"""
display_name = "Additional Warp Points"


ladx_option_groups = [
OptionGroup("Goal Options", [
Goal,
Expand All @@ -521,6 +519,7 @@ class AdditionalWarpPoints(DefaultOffToggle):
OptionGroup("Miscellaneous", [
TradeQuest,
Rooster,
Overworld,
TrendyGame,
NagMessages,
BootsControls
Expand Down Expand Up @@ -579,3 +578,4 @@ class LinksAwakeningOptions(PerGameCommonOptions):
nag_messages: NagMessages
ap_title_screen: APTitleScreen
boots_controls: BootsControls
overworld: Overworld
20 changes: 16 additions & 4 deletions worlds/ladx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,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",
"overworld",
]

# use the default behaviour to grab options
Expand Down
Loading