Skip to content

Commit 755ce65

Browse files
author
Alex Nordstrom
committed
init
1 parent fe5b49e commit 755ce65

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

worlds/ladx/LADXR/generator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .patches import maptweaks as _
3131
from .patches import chest as _
3232
from .patches import bomb as _
33+
from .patches import powder as _
3334
from .patches import rooster as _
3435
from .patches import shop as _
3536
from .patches import trendy as _
@@ -233,6 +234,8 @@ def generateRom(base_rom: bytes, args, patch_data: Dict):
233234
# patches.reduceRNG.slowdownThreeOfAKind(rom)
234235
patches.reduceRNG.fixHorseHeads(rom)
235236
patches.bomb.onlyDropBombsWhenHaveBombs(rom)
237+
if ladxr_settings.blockfreepowder:
238+
patches.powder.onlyGivePowderWhenHavePowder(rom)
236239
if ladxr_settings.musicchange == 'always':
237240
patches.aesthetics.noSwordMusic(rom)
238241
patches.aesthetics.reduceMessageLengths(rom, random)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from ..assembler import ASM
2+
3+
4+
# remove calls to GiveInventoryItem(_trampoline)
5+
def onlyGivePowderWhenHavePowder(rom):
6+
# trendy game
7+
rom.patch(0x04, 0x366B, ASM("call $3E6B"), b"", fill_nop=True)
8+
9+
# floating powder
10+
rom.patch(0x06, 0x3BC1, ASM("call $3E6B"), b"", fill_nop=True)
11+
12+
# standing powder
13+
rom.patch(0x03, 0x2356, ASM("call $6472"), b"", fill_nop=True)

worlds/ladx/LADXR/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def __init__(self, settings_dict):
225225
options=[('guessbyname', 'g', 'Guess By Name'), ('indicateprogression', 'p', 'Indicate Progression')], default="guessbyname", aesthetic=True),
226226
Setting('aptitlescreen', 'User options', 'a', 'AP Title Screen', description="", default=True),
227227
Setting('textshuffle', 'User options', 'a', 'Text Shuffle', description="", default=False),
228+
Setting('blockfreepowder', 'User options', 'a', 'Block Free Powder', description="", default=False),
228229
]
229230
self.__by_key = {s.key: s for s in self.__all}
230231

worlds/ladx/Options.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,19 @@ class StabilizeItemPool(DefaultOffToggle):
593593
rich_text_doc = True
594594

595595

596+
class BlockFreePowder(DefaultOffToggle, LADXROption):
597+
"""
598+
Trendy game, floating, and freestanding magic powder won't do anything
599+
unless you have received/found the magic powder item.
600+
601+
This has no logic implications, because these powder pickups are never
602+
considered in logic.
603+
"""
604+
display_name = "Block Free Powder"
605+
rich_text_doc = True
606+
ladxr_name = 'blockfreepowder'
607+
608+
596609
class ForeignItemIcons(Choice, LADXROption):
597610
"""
598611
Choose how to display foreign items.
@@ -616,6 +629,7 @@ class ForeignItemIcons(Choice, LADXROption):
616629
TarinsGift,
617630
HardMode,
618631
TrendyGame,
632+
BlockFreePowder,
619633
]),
620634
OptionGroup("World Layout", [
621635
Overworld,
@@ -689,6 +703,7 @@ class LinksAwakeningOptions(PerGameCommonOptions):
689703
tarins_gift: TarinsGift
690704
overworld: Overworld
691705
stabilize_item_pool: StabilizeItemPool
706+
block_free_powder: BlockFreePowder
692707
start_inventory_from_pool: StartInventoryPool
693708

694709
warp_improvements: Removed

0 commit comments

Comments
 (0)