Users browsing this thread: 1 Guest(s)
Runic question
...Perhaps the check could be made more comprehensive. It'd take more freespace, though.
I think this would check if the target is a monster or not, then runic so long as the caster is on the OPPOSITE team. It would replace the section by the same name in Hatzen08's RunicForever2_1. I'd test this like I did with the other post, but I'd have to put it in by hand (because xkas doesn't like me and Asar likes introducing errors) and I don't have the room near the RunicForever code in my rom.
EDIT: If you assemble this and your characters runic their own spells, that means .party_yes and .party_no are labelled wrong and need to be swapped. If you assemble it and it crashes... then I have no idea!
EDIT: Hopefully you didn't grab this in the middle of the night. I forgot a BRA command.
Code:
;-------------------------------------------------------------------------------
; check runic for fighter Y
;-------------------------------------------------------------------------------
check_runic:
LDA $3AA0,Y
LSR ;check for valid target
BCC .runic_no ;don't runic if invalid target
PEA $80C0 ;check for sleep, death, petrify 80E1 [Adds Blind and Moogle to the restrictions]
C2/3544: F4 E1 80
80E0 [Remove the blind restriction, since Cover doesn't have that]
PEA $2210 ;check for freeze, hide, stop
C2/3547:
JSR $5864 ;routine to check for status
BCC .runic_no ;don't runic if any status found
LDA $3E4C,Y $3EF8,Y
C2/354F: B9 F8 3E
BIT #$06 ;check for runic flags BIT #$10 [Former STOP bit]
C2/3552: 89 10
BEQ .runic_no ;don't runic if spell can't be absorbed
STX $EE ;spell target
TYA ;target
CMP #$08 ;check if battle slot is a party slot?
BCC .party_yes ;handle party runicker
BRA .party_no ;handle monster runicker
.party_yes
TXA ;caster
CMP #$08 ;check if battle slot is a party slot?
BCC .runic_no ;don't runic for party caster
BRA .runic_yes ;otherwise runic
.party_no
TXA ;caster
CMP #$08 ;check if battle slot is a party slot?
BCS .runic_no ;don't runic for monster caster
;don't need an otherwise branch here since .runic_yes is next
.runic_yes
SEC
RTS
.runic_no
CLC
RTS
EDIT: If you assemble this and your characters runic their own spells, that means .party_yes and .party_no are labelled wrong and need to be swapped. If you assemble it and it crashes... then I have no idea!
EDIT: Hopefully you didn't grab this in the middle of the night. I forgot a BRA command.
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)