Skip to content

Commit 740616d

Browse files
threeandthreeeAustinSumigray
authored andcommitted
LADX: Open Mabe Option (ArchipelagoMW#3964)
* open mabe option swaps east mabe rocks for bushes * add open mabe to slot data * use upstream overworld option Instead of a standalone option, use upstream's "overworld" option, which we don't use yet but it leaves better space for the future * use ladxr_setting for consistency * newline
1 parent 095aa49 commit 740616d

File tree

6 files changed

+36
-22
lines changed

6 files changed

+36
-22
lines changed

worlds/ladx/LADXR/generator.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,14 @@
5858

5959
from .patches import bank34
6060
from .utils import formatText
61-
from ..Options import TrendyGame, Palette, Warps
6261
from .roomEditor import RoomEditor, Object
6362
from .patches.aesthetics import rgb_to_bin, bin_to_rgb
6463

6564
from .locations.keyLocation import KeyLocation
6665

6766
from BaseClasses import ItemClassification
6867
from ..Locations import LinksAwakeningLocation
69-
from ..Options import TrendyGame, Palette, MusicChangeCondition, BootsControls
68+
from ..Options import TrendyGame, Palette, MusicChangeCondition, Warps
7069

7170
if TYPE_CHECKING:
7271
from .. import LinksAwakeningWorld
@@ -157,6 +156,8 @@ def generateRom(args, world: "LinksAwakeningWorld"):
157156
if not world.ladxr_settings.rooster:
158157
patches.maptweaks.tweakMap(rom)
159158
patches.maptweaks.tweakBirdKeyRoom(rom)
159+
if world.ladxr_settings.overworld == "openmabe":
160+
patches.maptweaks.openMabe(rom)
160161
patches.chest.fixChests(rom)
161162
patches.shop.fixShop(rom)
162163
patches.rooster.patchRooster(rom)
@@ -248,7 +249,7 @@ def generateRom(args, world: "LinksAwakeningWorld"):
248249
patches.core.quickswap(rom, 1)
249250
elif world.ladxr_settings.quickswap == 'b':
250251
patches.core.quickswap(rom, 0)
251-
252+
252253
patches.core.addBootsControls(rom, world.options.boots_controls)
253254

254255

@@ -398,7 +399,7 @@ def gen_hint():
398399
# Then put new text in
399400
for bucket_idx, (orig_idx, data) in enumerate(bucket):
400401
rom.texts[shuffled[bucket_idx][0]] = data
401-
402+
402403

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

worlds/ladx/LADXR/logic/overworld.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ def __init__(self, options, world_setup, r):
144144
self._addEntrance("moblin_cave", graveyard, moblin_cave, None)
145145

146146
# "Ukuku Prairie"
147-
ukuku_prairie = Location().connect(mabe_village, POWER_BRACELET).connect(graveyard, POWER_BRACELET)
147+
ukuku_prairie = Location()
148+
if options.overworld == "openmabe":
149+
ukuku_prairie.connect(mabe_village, r.bush)
150+
else:
151+
ukuku_prairie.connect(mabe_village, POWER_BRACELET)
152+
ukuku_prairie.connect(graveyard, POWER_BRACELET)
148153
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x07B, TRADING_ITEM_STICK)), TRADING_ITEM_BANANAS)
149154
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x087, TRADING_ITEM_HONEYCOMB)), TRADING_ITEM_STICK)
150155
self._addEntrance("prairie_left_phone", ukuku_prairie, None, None)

worlds/ladx/LADXR/patches/maptweaks.py

+9
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,12 @@ def tweakBirdKeyRoom(rom):
3838
re.moveObject(2, 5, 3, 6)
3939
re.addEntity(3, 5, 0x9D)
4040
re.store(rom)
41+
42+
43+
def openMabe(rom):
44+
# replaces rocks on east side of Mabe Village with bushes
45+
re = RoomEditor(rom, 0x094)
46+
re.changeObject(5, 1, 0x5C)
47+
re.overlay[5 + 1 * 10] = 0x5C
48+
re.overlay[5 + 2 * 10] = 0x5C
49+
re.store(rom)

worlds/ladx/LADXR/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __init__(self, ap_options):
169169
[Never] you can never steal from the shop."""),
170170
Setting('bowwow', 'Special', 'g', 'Good boy mode', options=[('normal', '', 'Disabled'), ('always', 'a', 'Enabled'), ('swordless', 's', 'Enabled (swordless)')], default='normal',
171171
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.'),
172-
Setting('overworld', 'Special', 'O', 'Overworld', options=[('normal', '', 'Normal'), ('dungeondive', 'D', 'Dungeon dive'), ('nodungeons', 'N', 'No dungeons'), ('random', 'R', 'Randomized')], default='normal',
172+
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',
173173
description="""
174174
[Dungeon Dive] Create a different overworld where all the dungeons are directly accessible and almost no chests are located in the overworld.
175175
[No dungeons] All dungeons only consist of a boss fight and a instrument reward. Rest of the dungeon is removed.

worlds/ladx/Options.py

+14-16
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TextShuffle(DefaultOffToggle):
5757

5858
class Rooster(DefaultOnToggle, LADXROption):
5959
"""
60-
[On] Adds the rooster to the item pool.
60+
[On] Adds the rooster to the item pool.
6161
[Off] The rooster spot is still a check giving an item. But you will never find the rooster. In that case, any rooster spot is accessible without rooster by other means.
6262
"""
6363
display_name = "Rooster"
@@ -70,7 +70,7 @@ class Boomerang(Choice):
7070
[Gift] The boomerang salesman will give you a random item, and the boomerang is shuffled.
7171
"""
7272
display_name = "Boomerang"
73-
73+
7474
normal = 0
7575
gift = 1
7676
default = gift
@@ -156,7 +156,7 @@ class ShuffleSmallKeys(DungeonItemShuffle):
156156
[Own Dungeons] The item will be within a dungeon in your world
157157
[Own World] The item will be somewhere in your world
158158
[Any World] The item could be anywhere
159-
[Different World] The item will be somewhere in another world
159+
[Different World] The item will be somewhere in another world
160160
"""
161161
display_name = "Shuffle Small Keys"
162162
ladxr_item = "KEY"
@@ -223,7 +223,7 @@ class Goal(Choice, LADXROption):
223223
The Goal of the game
224224
[Instruments] The Wind Fish's Egg will only open if you have the required number of Instruments of the Sirens, and play the Ballad of the Wind Fish.
225225
[Seashells] The Egg will open when you bring 20 seashells. The Ballad and Ocarina are not needed.
226-
[Open] The Egg will start pre-opened.
226+
[Open] The Egg will start pre-opened.
227227
"""
228228
display_name = "Goal"
229229
ladxr_name = "goal"
@@ -313,15 +313,12 @@ class Bowwow(Choice):
313313

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

327324

@@ -472,7 +469,7 @@ def to_ladxr_option(self, all_options):
472469

473470
class Palette(Choice):
474471
"""
475-
Sets the palette for the game.
472+
Sets the palette for the game.
476473
Note: A few places aren't patched, such as the menu and a few color dungeon tiles.
477474
[Normal] The vanilla palette
478475
[1-Bit] One bit of color per channel
@@ -530,7 +527,6 @@ class InGameHints(DefaultOnToggle):
530527
display_name = "In-game Hints"
531528

532529

533-
534530
class ForeignItemIcons(Choice):
535531
"""
536532
Choose how to display foreign items.
@@ -562,6 +558,7 @@ class ForeignItemIcons(Choice):
562558
OptionGroup("Miscellaneous", [
563559
TradeQuest,
564560
Rooster,
561+
Overworld,
565562
TrendyGame,
566563
InGameHints,
567564
NagMessages,
@@ -591,12 +588,12 @@ class ForeignItemIcons(Choice):
591588
@dataclass
592589
class LinksAwakeningOptions(PerGameCommonOptions):
593590
logic: Logic
594-
# 'heartpiece': DefaultOnToggle, # description='Includes heart pieces in the item pool'),
595-
# 'seashells': DefaultOnToggle, # description='Randomizes the secret sea shells hiding in the ground/trees. (chest are always randomized)'),
596-
# 'heartcontainers': DefaultOnToggle, # description='Includes boss heart container drops in the item pool'),
597-
# 'instruments': DefaultOffToggle, # description='Instruments are placed on random locations, dungeon goal will just contain a random item.'),
591+
# 'heartpiece': DefaultOnToggle, # description='Includes heart pieces in the item pool'),
592+
# 'seashells': DefaultOnToggle, # description='Randomizes the secret sea shells hiding in the ground/trees. (chest are always randomized)'),
593+
# 'heartcontainers': DefaultOnToggle, # description='Includes boss heart container drops in the item pool'),
594+
# 'instruments': DefaultOffToggle, # description='Instruments are placed on random locations, dungeon goal will just contain a random item.'),
598595
tradequest: TradeQuest # description='Trade quest items are randomized, each NPC takes its normal trade quest item, but gives a random item'),
599-
# 'witch': DefaultOnToggle, # description='Adds both the toadstool and the reward for giving the toadstool to the witch to the item pool'),
596+
# 'witch': DefaultOnToggle, # description='Adds both the toadstool and the reward for giving the toadstool to the witch to the item pool'),
600597
rooster: Rooster # description='Adds the rooster to the item pool. Without this option, the rooster spot is still a check giving an item. But you will never find the rooster. Any rooster spot is accessible without rooster by other means.'),
601598
# 'boomerang': Boomerang,
602599
# 'randomstartlocation': DefaultOffToggle, # 'Randomize where your starting house is located'),
@@ -633,6 +630,7 @@ class LinksAwakeningOptions(PerGameCommonOptions):
633630
text_mode: TextMode
634631
no_flash: NoFlash
635632
in_game_hints: InGameHints
633+
overworld: Overworld
636634

637635
warp_improvements: Removed
638636
additional_warp_points: Removed

worlds/ladx/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ def fill_slot_data(self):
530530
"shuffle_instruments",
531531
"nag_messages",
532532
"hard_mode",
533+
"overworld",
533534
]
534535

535536
# use the default behaviour to grab options

0 commit comments

Comments
 (0)