This block can consume a Yoshi and a shell of any colour, and combine them to produce a Yoshi with the colour of the shell it was fed. It can retain the Yoshi and/or shell it was fed across sublevels, and will only accept the first Yoshi/shell it's given until a Yoshi has been spawned. It will also refuse to spawn a Yoshi if there is already a Yoshi or Baby Yoshi in the level.
Note that it will not work with the special "double hit" green shell (sprite #$DF).
Uses 1 byte of freeram.
Includes an optional exanimated AN2 file and an UberASM to control the exanimation trigger (uses custom trigger 0 by default).
Tested with: LM 3.11, GPS 1.4.1, SA-1 1.32, UberASMTool 1.4, Snes9x 1.60.
A very neat idea! The block works perfectly from what I can tell, so accepted.
During moderation I added a .mwl file with the exanimation already set up, and modified the UberASM code a bit to include a !trigger define (if you want to use something else than trigger 0) and made the trigger reset on level load so it doesn't show the wrong animation for a split second when the level loads.
Edit: one small optimization remark: you don't need to search for Yoshi by looping through all sprites, since his slot (+1) is stored at $18DF.