This is a block that when collected, will award Fire Power that can be used for a single shot. Collecting multiple blocks will give the player the respective amount of shots. When the player's shots have been used up, they will revert to big Mario.
See the asm file for some customization options. Requires a few small helper patches (inserted with the block) to handle the fireball counter.
I inserted this and the block itself works perfectly fine, but whenever I go into any other level the game crashes as soon as I take damage after having collected a mushroom. I can die normally or hit munchers or anything without issues, the crash only occurs if I collected a mushroom before. Of course I don't know why exactly this happens and there are many other patches I have inserted into my hack but I just thought I should let you know. Definitely has something to do with this because the crashes only happen when this block is inserted.
I'm unable to recreate that issue on a clean ROM. I recommend that you go through all your patches and check to see if there are any which are using the same freeRAM as the block, or if there are any hijack conflicts - look for all instances of "ORG" in your patch asms, and then check the address after it. If it matches any of the hijacks in the Block asm or is a similar address then there's probably a conflict.
autoclean JML CheckShots ; Checks the number of shots left when shooting a fireball, and handles reverting.
autoclean dl ZeroShots ; Zero the number of shots when taking damage.
autoclean JML ZeroShotsDeath ; Zero the number of shots when dying.
STA $1DFC|!addr ; Restore code.
JML $028008|!bank ; Zero freeram then return to normal routine.
JML $00F60F|!bank ; Zero freeram then restore original code.
Very interesting, you can combine things. I have a feeling that some can be converted to uberasm tool code.