This patch makes it so that you lose all your coins when you get hit, and that you die when you get hit while not having any coins. Compatible with the 3 Digit Coin Counter patch, just check the defines.
Tester's note: If you're going to use the 3 Digit Coin Counter compatible version, you need to get the Three-Digit Coin Counter from the patches section, it's not integrated into this patch.
4-1-2019: Updated for Asar, and SA-1. The normal and 3 Digit Coin Counter versions have been merged together and can be set in the defines.
I was made aware that there's a couple of buggy side effects when using this patch with AddmusicK. The first one of them is a broken damage sound effect, probably as a result of an oopsie I made in the past. To fix this, change the lines
The second one is broken death music, as a result of AddmusicK moving around indices of default music. To fix this one, change the lines
I don't know if it's possible to detect AMK via a patch, but if so, it might be worth submitting an update to this patch with an automatic fix.
I'd be fine with like three or four coins, or even just one coin since that's what happened in the 8-bit Sonic games. I was hoping to make a Sonic in SMW hack sometime with this and that would help sell the illusion.