lorom
;Lava style damage block hack
;by Insom
;
;ONCE AGAIN... USE XKAS V.06 TO COMPILE...
;
;Not a whole lot to say about this one...
;To use, set the tiles you want to have this effect
;to block type $02 ("Air. Fool X-RAY.")
;with a BTS value of $03. There are PLENTY of blank
;spaces in the lookup table that I mention, so take
;advantage if you want to add other blocks. Just add
;another DW $xxxx after the first one to point to new
;code. For example, $94:98B2's pointer corresponds to
;the BTS value of $03, and $94:98B4's pointer would
;correspond to the BTS value of $04.
;
;Good luck!
;
;__________________________________________________
;
;Defines:

!value = #$7000
;Fractional damage per frame. I didn't include whole
;number damages, because even a whole number damage
;of $0001 would seem ridiculous. Feel free to experiment
;with this value.

!damage = $0A4E
;The address to store the damage value to.

;__________________________________________________


;Change the entry for this block type in the appropiate
;lookup table to point to where our code will be.

org $9498B2

	DW $B300



;Now that we've got our entry point, write the code.

org $94B300
	

	LDA !value
	CLC
	ADC !damage
	RTS
