diff --git a/worlds/ladx/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index f40e398608..f7faed7449 100644 --- a/worlds/ladx/LADXR/generator.py +++ b/worlds/ladx/LADXR/generator.py @@ -231,6 +231,12 @@ 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 == 'disabled': + 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': diff --git a/worlds/ladx/LADXR/logic/overworld.py b/worlds/ladx/LADXR/logic/overworld.py index 6bce5143c5..607379a9c1 100644 --- a/worlds/ladx/LADXR/logic/overworld.py +++ b/worlds/ladx/LADXR/logic/overworld.py @@ -40,7 +40,7 @@ class World: self._addEntrance("start_house", mabe_village, start_house, None) shop = Location("Shop") - if options.steal: + if options.steal == "inlogic": Location().add(ShopItem(0)).connect(shop, OR(COUNT("RUPEES", 500), SWORD)) Location().add(ShopItem(1)).connect(shop, OR(COUNT("RUPEES", 1480), SWORD)) else: diff --git a/worlds/ladx/LADXR/settings.py b/worlds/ladx/LADXR/settings.py index 33bb550c44..a6955a2fb1 100644 --- a/worlds/ladx/LADXR/settings.py +++ b/worlds/ladx/LADXR/settings.py @@ -161,8 +161,12 @@ Note, some entrances can lead into water, use the warp-to-home from the save&qui [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', default=False, - description='Toggle if stealing is in logic.'), + Setting('steal', 'Gameplay', 't', 'Stealing from the shop', + options=[('inlogic', 'a', 'In logic'), ('disabled', 'n', 'Disabled'), ('outoflogic', '', 'Out of logic')], default='outoflogic', + description="""Effects when you can steal from the shop and if it is 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('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', @@ -282,7 +286,7 @@ Note, some entrances can lead into water, use the warp-to-home from the save&qui if self.goal in ("bingo", "bingo-full"): req("overworld", "normal", "Bingo goal does not work with dungeondive") req("accessibility", "all", "Bingo goal needs 'all' accessibility") - dis("steal", "never", "default", "With bingo goal, stealing should be allowed") + dis("steal", "disabled", "default", "With bingo goal, stealing should be allowed") dis("boss", "random", "shuffle", "With bingo goal, bosses need to be on normal or shuffle") dis("miniboss", "random", "shuffle", "With bingo goal, minibosses need to be on normal or shuffle") if self.overworld == "dungeondive": diff --git a/worlds/ladx/Options.py b/worlds/ladx/Options.py index 6956200da7..a0b6559158 100644 --- a/worlds/ladx/Options.py +++ b/worlds/ladx/Options.py @@ -285,12 +285,16 @@ class MusicChangeCondition(Choice): # [One hit KO] You die on a single hit, always."""), -class StealingInLogic(DefaultOffToggle, LADXROption): +class Stealing(Choice, LADXROption): """ Puts stealing from the shop in logic if the player has a sword. """ - display_name = "Stealing in Logic" + display_name = "Stealing" ladxr_name = "steal" + option_in_logic = 1 + option_out_of_logic = 2 + option_disabled = 3 + default = option_out_of_logic class Bowwow(Choice): @@ -527,7 +531,7 @@ ladx_option_groups = [ OptionGroup("Miscellaneous", [ TradeQuest, Rooster, - StealingInLogic, + Stealing, TrendyGame, InGameHints, NagMessages, @@ -586,7 +590,7 @@ class LinksAwakeningOptions(PerGameCommonOptions): nag_messages: NagMessages ap_title_screen: APTitleScreen boots_controls: BootsControls - stealing_in_logic: StealingInLogic + stealing: Stealing in_game_hints: InGameHints warp_improvements: Removed