Tip: If you give a Muncher tile custom graphics, it will still act like a coin when a silver P-switch is active, whether it looks like a coin or not. So make sure to use ExAnimation if there's a silver P-switch in the area.
I'm modifying the level_ender sprite built into PIXI. I want Mario to receive a 1-up if he has big, fire or cape after he has finished a boss dungeon full of enemies. It's a reward for completing a difficult section without taking damage.
However, it crashes the game upon finishing the level, but only when Mario is big/fire/cape. I'm not sure what could be causing this issue. I checked the RAM map and all the addresses seem to be correct.
The modified sprite is here: https://pastebin.com/sTeHJVA2
I'm a newbie to ASM so I apologise if this is a dumb question.
Also you'll want to move the state check & branch code to the bottom of .continue, otherwise the sprite will just continuously loop through RewardMario and never follow through with the rest of the code.