Users browsing this thread: 1 Guest(s)
Gaining a greater health from Potions?

#35
Posts: 3,971
Threads: 279
Thanks Received: 237
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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
  Find
Quote  



Messages In This Thread
RE: Gaining a greater health from Potions? - by madsiur - 08-13-2016, 04:45 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite