;pass on a defined # of coins
;by smkdan
;act like tile 25
db $42
JMP Code : JMP Code : JMP Code : JMP Return : JMP Return : JMP Return : JMP Return : JMP Code : JMP Code : JMP Code
;don't touch those

;amount of coins the player can pass on
!COINS = $64

MarioAbove:
MarioBelow:
MarioSide:
Code:

	LDA $16
	AND #$08
	BNE Check
	RTL

Check:

	LDA $140C	;load current coins
	CMP #!COINS	;compare to required coins
	BCC More		;return (act like 25) if carry clear

	LDA #$29
	STA $1DFC

	LDA #$05
	STA $71
	RTL

More:
	LDA #$2A
	STA $1DFC
Return:
	RTL