Users browsing this thread: 6 Guest(s)
Pony Fantasy VI Remake
08-06-2016, 09:39 PM
Ya'll wanted a Sketch improvement patch?
Code:
hirom
;header
!freespace = $C2A65A
;(Put attacker level [or Sketcher if applicable] in $11AF) (Modified by Synchysi)
org $C22C21
PHX
LDA $3417 ;(Get Sketcher)
JSR newfunc ;(New function)
LDA $3B18,x ;(Level)
STA $11AF ;(Level)
PLX
RTS
org !freespace
newfunc:
;(original code)
BMI exit ;(Branch if no Sketcher)
TAX ;(if there's a valid Sketcher, use their Level
;for attack)
;(end original code)
;(new code)
LDA $11A2 ;(Spell Properties)
LSR A ;(Check if Physical/Magical)
LDA $3B41,x ;(Sketcher's Mag.Pwr)
BCC magical ;(Branch if not physical damage)
;physical
;LDA $3B2C,X ;(Attacker's Vigor * 2)
CLC
ADC $3B2C,Y ;(Target's Vigor? [not sure if doubled, but shouldn't be, for monsters])
;BCC nocap
;LDA #$FF ;(If Vigor + Magic was larger than 255, make it 255)
;nocap:
LSR A ;(A = [Sketcher's Magic + Sketchee's Vigor] / 2)
;add overflow check and cap here
magical:
STA $11AE ;(Set Attacker's Magic or Vigor)
exit:
RTS
« Next Oldest | Next Newest »
Users browsing this thread: 6 Guest(s)