Fixes cases where Mario takes damage while riding Yoshi, instead of Yoshi running away. This occurs in vanilla SMW with Mega Moles, Wigglers, Dino-Torch fire, and the sides of hurt blocks (munchers/spikes).
Thanks Koopster for letting me use some code that handles some sa-1 pointer oddities.
Screenshots:
The patch works for the most part, but there's one bug that needs to be fixed before it can be accepted:
Although taking muncher/spike damage from the sides works as intended, taking damage from them from below causes Mario to instantly remount Yoshi as soon as damage is taken. Depending on how Mario clips the block, he can take Yoshi damage/remount a dozen or so times in very quick succession. This also triggers a vanilla glitch where quick dismount/remounting Yoshi increments the "enemies stomped" counter - the final result is that, if you then land on an enemy after taking muncher/spike damage, you can get an instant 1-up.
One way to fix this is to set !154C,x (prevent sprite-player contact timer) in the Yoshi hurt code, then hijack the Yoshi mount routine to prevent mounting if !154C,x is set ($01ED44 is a decent hijack spot for this).
Unrelated to the rejection, it's also worth noting that the bug this patch fixes is also present in the moving wooden "pencil" spikes, and the cluster boos in the Boo stream. The patch fixes these anyway though.
Tested with:
• Lunar Magic 3.21
• SA-1 Pack v1.32
• Asar v1.81
• Snes9x v1.60
• bsnes plus v05
Fixes cases where Mario takes damage while riding Yoshi, instead of Yoshi running away. This occurs in vanilla SMW with Mega Moles, Wigglers, Dino-Torch fire, moving wooden "pencil" spikes, cluster boos in the Boo stream, and the sides of hurt blocks (munchers/spikes).
Thanks to Koopster for letting me use some code that handles some sa-1 pointer oddities.
Also thanks to JamesD28 for pointing out a bug where Mario would instantly re-mount Yoshi if taking damage from above. This is now fixed.
Screenshots:
The muncher/spike bug is fixed, but there's now a different issue: When taking Yoshi damage from enemies, Mario either stays on Yoshi and gets teleported above the screen, or a few lag frames are caused before taking damage. This is because you switched from using $18E2 to $18DF, and I'm not sure why you did that - $18E2 is better to use in nearly all cases, since it isn't reset to 0 every frame. When you LDX $18DF then DEX it, the index becomes #$FF, which results in bogus values being read during the Yoshi hurt routine.
You've also loaded the Yoshi index twice unnecessarily, and I'd also recommend preserving X before overwriting it with Yoshi's index - X is preserved in the vanilla hurt routine, but your patch changes that, so it could have unintended side effects (one oddity I noticed is that dino-torches sometimes disappear for a frame when taking Yoshi damage from their fire - I can't verify this is caused by the X overwrite, but I'd imagine it is).
Tested with:
• Lunar Magic 3.21
• SA-1 Pack v1.32
• Asar v1.81
• Snes9x v1.60
• bsnes plus v05
Follow Us On