Users browsing this thread: 1 Guest(s)
Gaining a greater health from Potions?
Copy the potion regular properties first, set item power to 250 then apply this code. No guarantee no refund!
Code:
hirom
;header
org $C38B47
JSR enabl ;check healing items
LDA $E0
BEQ continue ;check if we don't heal
BRA heal
org $C38B54
continue:
JSR $8C2B
org $C38BC4
heal:
org $C38C4D
JSR freeSpace
NOP
org $C3FFD0 ;change to free space in $C3 (32 bytes needed)
freeSpace:
JSR $8C2B ;load item index
CMP #$FA ;do we have superbowl?
BNE notSb ;branch if no
REP #$21
LDA $B2 ;load item power
ASL
ASL ;multiply by 4
BRA exit
notSb:
REP #$21
LDA $B2 ;load item power
exit:
RTS
enabl:
STZ $E0
CMP #$FE ; Dried Meat?
BEQ setBit ; Branch if so
CMP #$E8 ; Tonic?
BEQ setBit ; Branch if so
CMP #$E9 ; Potion?
BEQ setBit ; Branch if so
CMP #$EA ; X-Potion?
BEQ setBit ; Branch if so
CMP #$FA ; Superbowl?
BEQ setBit ; Branch if so
RTS
setBit:
LDA #$01
STA $E0
RTS
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)