In SMBX the player is downgraded to Small Mario when they take damage while under the effect of a Stage 3 power-up like the Fire Flower. Ever play some Mario Maker and get used to only being downgraded one stage when you take damage? That's what happened to me! Returning to SMBX and being one hit away from death after taking damage as Fire Mario was jarring. It's quite punishing!
Powerup Guard was made to bring the modern Mario series power-up regression to SMBX. If the player takes damage while under effect of the Fire Flower, Super Leaf or any other power-up with this script active then they'll only be downgraded to Super Mario, not
Small Mario. This will effectively make damage less punishing and make it easier to return back to Mario's strongest forms; and it may even allow you more room to design more threatening obstacles in your levels without making it more difficult than intended! You may also find that this script pairs well with another script that disables or nerfs the Reserve Box.
Powerup Guard doesn't effect Peach, Toad and Link. They already have a similar mechanic, and I don't want to interfere with it. I also didn't test it with any of the custom characters added to SMBX2, so be wary of unintended behavior. It might work, but Maker discretion is advised.
A download link can be found here: https://mega.nz/#!FIMmUSZb!fueiw9pev5E8 ... gb9GZHWC7U
Powerup Guard runs under the internal name "powerupGuard". Load it through API.load and you're set! There are no parameters to configure.