diff --git a/Gui.py b/Gui.py index df53a9e0..7e326bfb 100755 --- a/Gui.py +++ b/Gui.py @@ -1437,6 +1437,7 @@ class SpriteSelector(object): self.randomOnExitVar = IntVar() self.randomOnSlashVar = IntVar() self.randomOnItemVar = IntVar() + self.randomOnBonkVar = IntVar() button = Checkbutton(frame, text="Hit", command=self.update_random_button, variable=self.randomOnHitVar) button.pack(side=LEFT, padx=(0, 5)) @@ -1453,6 +1454,9 @@ class SpriteSelector(object): button = Checkbutton(frame, text="Item", command=self.update_random_button, variable=self.randomOnItemVar) button.pack(side=LEFT, padx=(0, 5)) + button = Checkbutton(frame, text="Bonk", command=self.update_random_button, variable=self.randomOnBonkVar) + button.pack(side=LEFT, padx=(0, 5)) + if adjuster: button = Button(frame, text="Current sprite from rom", command=self.use_default_sprite) button.pack(side=LEFT, padx=(0, 5)) @@ -1621,6 +1625,7 @@ class SpriteSelector(object): randomon += "-exit" if self.randomOnExitVar.get() else "" randomon += "-slash" if self.randomOnSlashVar.get() else "" randomon += "-item" if self.randomOnItemVar.get() else "" + randomon += "-bonk" if self.randomOnBonkVar.get() else "" self.randomOnEventText.set(f"randomon{randomon}" if randomon else None) self.randomButtonText.set("Random On Event" if randomon else "Random") diff --git a/Rom.py b/Rom.py index ae32f3e6..bbde109b 100644 --- a/Rom.py +++ b/Rom.py @@ -1,5 +1,5 @@ JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '72e6e25f66bf57bb93016ce33a975506' +RANDOMIZERBASEHASH = 'a9f0b20fe7ada566e56dc7da722959fd' import io import json @@ -177,6 +177,7 @@ def apply_random_sprite_on_event(rom: LocalRom, sprite, local_random, allow_rand onevent += 0x04 if 'exit' in sprite else 0x00 onevent += 0x08 if 'slash' in sprite else 0x00 onevent += 0x10 if 'item' in sprite else 0x00 + onevent += 0x20 if 'bonk' in sprite else 0x00 sprite = Sprite(sprite) if os.path.isfile(sprite) else get_sprite_from_name(sprite, local_random) # write link sprite if required diff --git a/data/basepatch.bmbp b/data/basepatch.bmbp index 87e73387..8b8f0fba 100644 Binary files a/data/basepatch.bmbp and b/data/basepatch.bmbp differ diff --git a/playerSettings.yaml b/playerSettings.yaml index f6d790a3..21a6c4f8 100644 --- a/playerSettings.yaml +++ b/playerSettings.yaml @@ -306,7 +306,8 @@ rom: randomonenter: 0 # Random sprite on entering the underworld. randomonexit: 0 # Random sprite on exiting the underworld. randomonslash: 0 # Random sprite on sword slashes - randomonitem: 0 # Random sprite on getting items. + randomonitem: 0 # Random sprite on getting items. + randomonbonk: 0 # Random sprite on bonk. # You can combine these events like this. randomonhit-enter-exit if you want it on hit, enter, exit. randomonall: 0 # Random sprite on any and all currently supported events. Refer to above for the supported events. Link: 50 # To add other sprites: open the gui/Creator, go to adjust, select a sprite and write down the name the gui calls it