File Name: | No coins |
Submitted: | by Noise |
Authors: | Noise |
Type: | Global |
Includes GFX: | No |
Includes Hijack: | No |
Featured: | No |
Description: | This ASM will kill the player whenever a coin is collected Be aware of a smw vanilla glitch where you can cancel the death animation via power up animation (GIF below) |
Tags: | code, counter, level, player |
Screenshots: | ![]() ![]() ![]() |
Instead of:
Code
you could do:Main: lda $0dbf and #$01 bne change rtl change: (...)
Code
if the player has no coins, jump over the entire code and return; instead of jumping to the code, and returning if the check fails. This way of doing it is a lot nicer. And.. that "and #$01" is not needed (also added "|!addr" at the end of "$0dbf" to make the code SA-1 compatible)Main: lda $0dbf|!addr beq return (...) return: RTL
Instead of recreating the entire death routine (everything under the "change:" label in the original code), why not just call it?
Code
you could just replace all that with this... (added "|!bank" to give fastrom users a tiny boost)jsl $00F606|!bank
And finally
Code
you could just do(...) rtl return: rtl
Code
(...) return: rtl
Tested with:
-Lunar Magic 3.31
-bsnes v115
-UberASMTool 1.4
-SA-1 1.40
