Users browsing this thread: 1 Guest(s)
Patch: Quake reveals invisible floaters

#1
Posts: 241
Threads: 18
Thanks Received: 101
Thanks Given: 41
Joined: Mar 2014
Reputation: 8
Status
None
I couldn't come up with a catchy name. Anyway, that's what it does. Or rather, doesn't do, with this patch applied.

Normally, when Quake misses due to Float, Clear (Vanish) status is still removed from the target. This patch makes it so Quake doesn't even target Floating characters, meaning you won't even see the "Miss!" message. If ALL targets are floating, untargeting all of them would cause spell animation issues, so if that's the case it uses the original targets and sets the "ignore Clear" property for the attack instead. Meaning, you'll see the "Miss!" message pop up for everyone, but it won't remove Clear.

Code:
; Quake removes Clear status even when missing Floating targets fix
; Version 1.1
; Fixed an issue with the casting animation for spells using this effect
; by Seibaby

;xkas 0.06
hirom
;header
!freespace = $C2A65A

; Spell Effect Pointer $25: Quake (Once-per-strike)
org $C2432B
dw groundBased

; Untarget Floating targets, except if all targets are Floating
org !freespace
reset bytes
groundBased:
        LDA #$10
        TSB $B0           ; Set bit 4 of $B0, to prevent C2/57C2 from disabling casting animation
        REP #$20          ; Set 16-bit Accumulator
        LDA $A2
        STA $EE           ; Copy targets to temporary variable
        LDX #$12
.loop   LDA $3EF8,X       ; Current status byte 3-4
        BPL .next         ; Check next target if this one is not floating
        LDA $3018,X
        TRB $EE           ; Clear this monster from potential targets
.next   DEX
        DEX
        BPL .loop         ; Loop for all 10 targets
        LDA $EE
        BNE .save         ; Branch if any target(s) left
        LDA #$0080
        TRB $B3           ; No targets valid, so set Ignore Clear
        LDA $A2           ; Else, use original Targets
.save   STA $B8           ; save target(s)
        TYX
        JMP $57C2
print bytes
  Find
Quote  
[-] The following 3 users say Thank You to seibaby for this post:
  • Gi Nattak (06-13-2018), Giro (04-29-2018), SSJ Rick (02-22-2019)

#2
Posts: 241
Threads: 18
Thanks Received: 101
Thanks Given: 41
Joined: Mar 2014
Reputation: 8
Status
None
Gi Nattak found an issue with this patch that I missed in testing. Using it will disable the cast animation (the orange glowy orb around the caster) for any spell with the "Quake" special effect (Miss floating targets). This is due to me calling another function that will do so when a certain bit is unset. Setting the bit before calling that function fixes the issue. I've updated the code in the parent post.
  Find
Quote  
[-] The following 1 user says Thank You to seibaby for this post:
  • SSJ Rick (02-22-2019)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite