Users browsing this thread: 6 Guest(s)
Pony Fantasy VI Remake
I see. It looks like his code rearranges the damage modification checks a bit, which is maybe why changing some stuff isn't working.
You can restore this whole routine to what it is in vanilla pretty easily. Do you know how to use xkas? Copy this whole thing into notepad, save it as e.g. vanilla-damage-modification.asm, then open up a command prompt in that folder and type in this:
NOTE: make sure your ROM is headered. If not, comment out the "header" line (add a semicolon in front of it).
You can restore this whole routine to what it is in vanilla pretty easily. Do you know how to use xkas? Copy this whole thing into notepad, save it as e.g. vanilla-damage-modification.asm, then open up a command prompt in that folder and type in this:
Code:
xkas vanilla-damage-modification.asm yourromfilename.smc
NOTE: make sure your ROM is headered. If not, comment out the "header" line (add a semicolon in front of it).
Code:
hirom
header ;comment this line out if your ROM has no header
org $C20C9E
PHP
REP #$20
LDA $11B0 ;(Maximum Damage)
STA $F0 ;
SEP #$20 ;(Set 8-bit Accumulator)
LDA $3414 ;
BNE $0CB0 ;
JMP $0D3B ;(Exit if $3414 = 0)
JSR $4B5A ;(Random number 0 to 255)
ORA #$E0 ;(Set bits 7,6,5; bits 0,1,2,3,4 are random)
STA $E8 ;(Random number [224..255])
JSR $0D3D ;(Damage randomness)
CLC ;
LDA $11A3 ;
BMI $0CC4 ;(Branch if Concern MP)
LDA $11A2 ;
LSR ;(isolate magical vs. physical property)
LDA $11A2 ;
BIT #$20 ;
BNE $0D22 ;(Branch if ignores defense)
PHP ;(save Carry flag, which equals
; (physical attack) AND NOT(Concern MP) )
LDA $3BB9,Y ;(Magic Defense)
BCC $0CD4 ;(Branch if concern MP or Magical damage)
LDA $3BB8,Y ;(Defense)
INC ;
BEQ $0CE7 ;(Branch if = 255)
XBA ;
LDA $3A82 ;
AND $3A83 ;
BMI $0CE3 ;(If Blocked by Golem or Dog, defense = 192)
LDA #$C1 ;
XBA ;
XBA ;
DEC ;
EOR #$FF ;
STA $E8 ;(= 255 - Defense)
JSR $0D3D ;(Multiply damage by (255 - Defense) / 256 ,
; then add 1)
LDA $01,S ;
LSR ;
LDA $3EF8,Y ;(Status byte 3)
BCS $0CF5 ;(Branch if physical attack without Concerns MP)
ASL ;
ASL ;
BPL $0CFF ;(Branch if no Safe / Shell on target)
LDA #$AA ;
STA $E8 ;
JSR $0D3D ;(Multiply damage by 170 / 256 , then add 1)
PLP ;
BCC $0D17 ;(Skip row check if magical attack or Concern MP)
LDA $3AA1,Y ;
BIT #$02 ;
BEQ $0D0D ;(Branch if target not defending)
LSR $F1 ;
ROR $F0 ;(Cut damage in half)
BIT #$20 ;(Check row)
BEQ $0D22 ;(Branch if target in front row)
LSR $F1 ;
ROR $F0 ;(Cut damage in half)
BRA $0D22 ;(Skip morph if physical attack)
LDA $3EF9,Y ;
BIT #$08 ;
BEQ $0D22 ;(Branch if target not morphed)
LSR $F1 ;
ROR $F0 ;(Cut damage in half)
REP #$20 ;(Set 16-bit Accumulator)
LDA $11A4 ;
LSR ;
BCS $0D34 ;(Branch if heal; heal skips self damage theory)
CPY #$08 ;
BCS $0D34 ;(Branch if target is a monster)
CPX #$08 ;
BCS $0D34 ;(Branch if attacker is monster)
LSR $F0 ;(Cut damage in half if party attacks party)
LDA $F0 ;
JSR $370B ;(Increment damage using $BC)
STA $F0
PLP
RTS
« Next Oldest | Next Newest »
Users browsing this thread: 6 Guest(s)