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: stealing logic option #3965

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 0 additions & 6 deletions worlds/ladx/LADXR/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ def generateRom(args, world: "LinksAwakeningWorld"):
# The default rom has this build in, just need to set a flag and we get this save.
rom.patch(0, 0x0003, "00", "01")

# Patch the sword check on the shopkeeper turning around.
if world.ladxr_settings.steal == 'never':
rom.patch(4, 0x36F9, "FA4EDB", "3E0000")
elif world.ladxr_settings.steal == 'always':
rom.patch(4, 0x36F9, "FA4EDB", "3E0100")

if world.ladxr_settings.hpmode == 'inverted':
patches.health.setStartHealth(rom, 9)
elif world.ladxr_settings.hpmode == '1':
Expand Down
8 changes: 6 additions & 2 deletions worlds/ladx/LADXR/logic/overworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ def __init__(self, options, world_setup, r):
self._addEntrance("start_house", mabe_village, start_house, None)

shop = Location("Shop")
Location().add(ShopItem(0)).connect(shop, OR(COUNT("RUPEES", 500), SWORD))
Location().add(ShopItem(1)).connect(shop, OR(COUNT("RUPEES", 1480), SWORD))
if options.steal:
Location().add(ShopItem(0)).connect(shop, OR(COUNT("RUPEES", 500), SWORD))
Location().add(ShopItem(1)).connect(shop, OR(COUNT("RUPEES", 1480), SWORD))
else:
Location().add(ShopItem(0)).connect(shop, COUNT("RUPEES", 500))
Location().add(ShopItem(1)).connect(shop, COUNT("RUPEES", 1480))
self._addEntrance("shop", mabe_village, shop, None)

dream_hut = Location("Dream Hut")
Expand Down
8 changes: 2 additions & 6 deletions worlds/ladx/LADXR/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,8 @@ def __init__(self, ap_options):
[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."""),
Setting('steal', 'Gameplay', 't', 'Stealing from the shop',
options=[('always', 'a', 'Always'), ('never', 'n', 'Never'), ('default', '', 'Normal')], default='default',
description="""Effects when you can steal from the shop. Stealing is bad and never in logic.
[Normal] requires the sword before you can steal.
[Always] you can always steal from the shop
[Never] you can never steal from the shop."""),
Setting('steal', 'Gameplay', 't', 'Stealing from the shop', default=False,
description='Toggle if stealing is in logic.'),
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',
Expand Down
17 changes: 11 additions & 6 deletions worlds/ladx/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,15 @@ class MusicChangeCondition(Choice):
# [Hero] Switch version hero mode, double damage, no heart/fairy drops.
# [One hit KO] You die on a single hit, always."""),

# Setting('steal', 'Gameplay', 't', 'Stealing from the shop',
# options=[('always', 'a', 'Always'), ('never', 'n', 'Never'), ('default', '', 'Normal')], default='default',
# description="""Effects when you can steal from the shop. Stealing is bad and never in logic.
# [Normal] requires the sword before you can steal.
# [Always] you can always steal from the shop
# [Never] you can never steal from the shop."""),

class StealingInLogic(DefaultOffToggle, LADXROption):
"""
Puts stealing from the shop in logic if the player has a sword.
"""
display_name = "Stealing in Logic"
ladxr_name = "steal"


class Bowwow(Choice):
"""Allows BowWow to be taken into any area. Certain enemies and bosses are given a new weakness to BowWow.
[Normal] BowWow is in the item pool, but can be logically expected as a damage source.
Expand Down Expand Up @@ -521,6 +524,7 @@ class AdditionalWarpPoints(DefaultOffToggle):
OptionGroup("Miscellaneous", [
TradeQuest,
Rooster,
StealingInLogic,
TrendyGame,
NagMessages,
BootsControls
Expand Down Expand Up @@ -579,3 +583,4 @@ class LinksAwakeningOptions(PerGameCommonOptions):
nag_messages: NagMessages
ap_title_screen: APTitleScreen
boots_controls: BootsControls
stealing_in_logic: StealingInLogic
2 changes: 1 addition & 1 deletion worlds/ladx/docs/en_Links Awakening DX.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Title screen graphics by toomanyteeth✨ (https://instagram.com/toomanyyyteeth)
<p>The walrus is moved a bit, so that you can access the desert without taking Marin on a date.</p>

<h3>Logic</h3>
<p>Depending on your options, you can only steal after you find the sword, always, or never.</p>
<p>Depending on your options, you can only steal after you find the sword.</p>
<p>Do not forget that there are two items in the rafting ride. You can access this with just Hookshot or Flippers.</p>
<p>Killing enemies with bombs is in normal logic. You can switch to casual logic if you do not want this.</p>
<p>D7 confuses some people, but by dropping down pits on the 2nd floor you can access almost all of this dungeon, even without feather and power bracelet.</p>
Expand Down
Loading