Users browsing this thread: 1 Guest(s)
Antifreeze Hack

#6
Posts: 383
Threads: 34
Thanks Received: 10
Thanks Given: 13
Joined: Dec 2018
Reputation: 18
Status
Moog
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.

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
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.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • DrakeyC (05-08-2023)



Messages In This Thread
Antifreeze Hack - by madsiur - 01-17-2022, 08:22 PM
RE: Antifreeze Hack - by Lightning - 01-21-2022, 04:52 PM
RE: Antifreeze Hack - by madsiur - 01-21-2022, 08:40 PM
RE: Antifreeze Hack - by madsiur - 02-12-2022, 04:20 PM
RE: Antifreeze Hack - by Lightning - 02-14-2022, 02:49 PM
RE: Antifreeze Hack - by C-Dude - 05-07-2023, 06:49 PM
RE: Antifreeze Hack - by madsiur - 05-08-2023, 12:48 AM
RE: Antifreeze Hack - by DrakeyC - 06-24-2023, 09:38 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite