Users browsing this thread: 1 Guest(s)
Antifreeze Hack
05-07-2023, 06:49 PM
DrakeyC encountered an oversight with this patch, wherein the Block Magitek flag continues to block the original statuses as well as the new one. This can cause some complications when Magitek mode inflicts Magitek status. As such, we worked together in Discord to create this amendment, which removes the Magitek protection and additionally makes the Block Clear flag protect against Slow and Stop.
I've also mangled your code to make it use xKas, because, well, I have xKas.
Apologies if this is overstepping, Madsiur; I can always remove it if that's your desire.
Code:
;; |-------------------------------------------|
;; | Antifreeze and Antislow Hack |
;; | by: madsiur (mangled by C-Dude) |
;; | version: 1.1 |
;; | released on: May 7th, 2023 |
;; | apply to: FF3us 1.0 (no header) |
;; | use xKas 0.6 |
;; |-------------------------------------------|
hirom
;;macro seek(variable offset) {
;; origin (offset & $3FFFFF)
;; base offset
;;}
;; equipment properties setting hook
org $C2291A
jsr free_space_a
nop
nop
;; monster properties setting hook
org $C22E24
jsr free_space_b
;; new code
org $C26469 ;; you can change this free space offset as long as it's in bank $C2
free_space_a:
eor $D2 ;; equipment immunities
ora #$0018 ;; exclude magitek and clear %%NEW%%
sta $331C,x ;; make not vulnerable to
lda #$ffff ;; start by assuming nothing is blocked
sta $3330,x ;; save it as blocked statuses 3 and 4 for this character
lda $D2 ;; equipment immunities
bit #$0008 ;; check if the "repel magitek" flag is set
beq exit_a ;; exit if not
lda $3330,x ;; get currently blocked statuses 3 and 4 for this character
and #$FDFF ;; remove Freeze bit
sta $3330,x ;; make not vulnerable to Freeze
lda $d2 ;; get $11D2 again, equipment immunities for status bytes 1 and 2
bit #$0010 ;; bit 4 of this status, which is Clear
beq exit_a ;; exit if not
lda $3330,x ;; currently blocked statuses 3 and 4
and #$ffeb ;; exclude Slow and Stop
sta $3330,x ;; save the result
exit_a:
rts
free_space_b:
ora #$0008 ;; exclude magitek %%NEW%%
sta $331C,y ;; original code
lda $CF0014,x ;; monster blocked status bytes 1-2
bit #$0008 ;; check if the "block magitek" flag is set
beq exit_b ;; exit if not
lda #$FDFF ;; not vulnerable to Freeze
and $3330,y
sta $3330,y ;; make monster not vulnerable to Freeze
exit_b:
rts
Apologies if this is overstepping, Madsiur; I can always remove it if that's your desire.
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)