Users browsing this thread: 3 Guest(s)
Shock Ability

#31
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Per the other thread, TA DA. Shock usable once (PER CHARACTER!) per battle.

I can't imagine you're giving Shock to more than one character, but it makes the patch a little more versatile/extensible for other people's use. Uses the upper nibble of $3F2E in battle; the lower nibble tracks whether or not a character has used an esper. $3F2F could also have been used, as it uses the low nibble to track whether or not a character has used a Desperation Attack.

Code:
hirom
; header

; Allow Shock only once per battle

; Defines
!Freespace_1 = $C2A65A              ; 26 bytes, or 68 total
!Shock_ID = $1B

org $C2171A
orgShock:   JMP newShock
           NOP
       
org $C24A62
           JSR finalShock          ; Adding a jump for an extra TRB so Shock is usable
                                   ; on each tier of the final battle
       
org $C252C6
           LDX #$0008
           CMP.l c2_table1,X       ; Moved table to free space because it's being expanded        
       
org $C252D2
           JSR (c2_table2,X)       ; Moved table to free space because it's being expanded
           
org $C2531B
C2531B:                             ; Setting label for branch below to Magic/Lore code            
           
org $C252E9
; Using space cleared by moving two expanded tables
dis_Shock:  LDA $3018,Y             ; Get character bit
           ASL #4                  ; And shuffle it into the high nibble
           BIT $3F2E               ; Check if this character has used Shock
           BNE C2531B              ; Branch and set carry if so
           RTS                     ;
       
       
org !Freespace_1
; New function adds bit check on Shock            ; 15 Bytes
newShock:   LDA $3018,Y             ; Get character bit
           ASL #4                  ; and shuffle it into the high nibble
           TSB $3F2E               ; Set bit 7 of $3F2F to show that Shock has been used
           PHX : TYX
           INC $2F30,X             ; Set character's menu to be redrawn
           PLX
           LDA #$82                ; ("Megahit" spell, which is what has Shock's data)
           JMP $1720               ; (go set that as spell/animation)
           
finalShock: TRB $3F2F               ; Make eligible for a Desperation attack
           ASL #4                  ; Shuffle bit into high nibble
           TRB $2F2E               ; And make eligible for another Shock
           RTS
           
; Two tables moved to make room to expand them
c2_table1:  db $03, $0B, $07, $0C                 ; 9 Bytes
           db $17, $02, $06, $00
           db !Shock_ID

c2_table2:  dw $5326, $5322, $531D, $5314         ; 18 Bytes
           dw $5314, $5314, $5310, $5310
           dw dis_Shock  

Like all my code lately, it seems, it's not SUPER heavily tested, but so far it works the way it's supposed to. I haven't actually checked the code that reallows Shock for successive tiers of the final battle, but I can't see why it WOULDN'T work as written.

ETA: Oh, and yeah, the original patch would definitely conflict with all three of those, Gi Nattak, some of them game-breakingly.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  
[-] The following 3 users say Thank You to GrayShadows for this post:
  • madsiur (07-20-2018), PowerPanda (07-20-2018), Warrax (07-20-2018)



Messages In This Thread
Shock Ability - by Lightning - 05-22-2018, 01:48 AM
RE: Shock Ability - by madsiur - 05-22-2018, 02:34 AM
RE: Shock Ability - by Lightning - 05-22-2018, 11:16 AM
RE: Shock Ability - by ShadowDreamer - 05-23-2018, 12:48 AM
RE: Shock Ability - by Turbotastic - 05-25-2018, 06:18 PM
RE: Shock Ability - by Tenkarider - 05-24-2018, 11:41 AM
RE: Shock Ability - by GrayShadows - 05-26-2018, 11:15 AM
RE: Shock Ability - by Turbotastic - 05-27-2018, 04:19 PM
RE: Shock Ability - by Lightning - 05-27-2018, 04:33 PM
RE: Shock Ability - by madsiur - 05-27-2018, 05:43 PM
RE: Shock Ability - by Lightning - 05-27-2018, 10:52 PM
RE: Shock Ability - by madsiur - 05-28-2018, 01:33 AM
RE: Shock Ability - by GrayShadows - 05-31-2018, 07:32 PM
RE: Shock Ability - by Lightning - 05-31-2018, 08:46 PM
RE: Shock Ability - by GrayShadows - 06-01-2018, 10:33 AM
RE: Shock Ability - by Lightning - 06-01-2018, 01:51 PM
RE: Shock Ability - by Warrax - 06-01-2018, 03:37 PM
RE: Shock Ability - by GrayShadows - 06-01-2018, 04:26 PM
RE: Shock Ability - by Lightning - 06-01-2018, 10:26 PM
RE: Shock Ability - by Turbotastic - 06-02-2018, 09:21 AM
RE: Shock Ability - by Lightning - 06-02-2018, 10:15 AM
RE: Shock Ability - by dn - 06-02-2018, 01:53 PM
RE: Shock Ability - by Turbotastic - 06-02-2018, 07:21 PM
RE: Shock Ability - by Lightning - 06-02-2018, 08:35 PM
RE: Shock Ability - by GrayShadows - 06-05-2018, 09:38 PM
RE: Shock Ability - by Lightning - 06-05-2018, 10:38 PM
RE: Shock Ability - by Lightning - 07-10-2018, 06:37 PM
RE: Shock Ability - by Lightning - 09-06-2018, 12:28 AM
RE: Shock Ability - by Gi Nattak - 07-10-2018, 07:35 PM
RE: Shock Ability - by Lightning - 07-10-2018, 11:05 PM
RE: Shock Ability - by Lightning - 07-19-2018, 03:52 PM
RE: Shock Ability - by GrayShadows - 07-20-2018, 12:53 AM
RE: Shock Ability - by Warrax - 07-20-2018, 01:24 AM
RE: Shock Ability - by PowerPanda - 07-20-2018, 12:19 PM
RE: Shock Ability - by GrayShadows - 07-20-2018, 12:26 PM
RE: Shock Ability - by Lightning - 07-20-2018, 05:44 PM
RE: Shock Ability - by Warrax - 07-20-2018, 05:56 PM
RE: Shock Ability - by Lightning - 07-20-2018, 05:58 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 10:53 AM
RE: Shock Ability - by Lightning - 09-10-2018, 01:01 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 01:37 PM
RE: Shock Ability - by Lightning - 09-10-2018, 01:42 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 02:13 PM
RE: Shock Ability - by Lightning - 09-10-2018, 03:20 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 04:22 PM
RE: Shock Ability - by Lightning - 09-10-2018, 06:44 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 07:46 PM
RE: Shock Ability - by Lightning - 09-10-2018, 09:03 PM
RE: Shock Ability - by madsiur - 09-10-2018, 09:31 PM
RE: Shock Ability - by Lightning - 09-10-2018, 09:41 PM
RE: Shock Ability - by PowerPanda - 09-10-2018, 10:35 PM
RE: Shock Ability - by Subtraction - 09-11-2018, 02:16 AM
RE: Shock Ability - by Lightning - 09-11-2018, 03:57 AM
RE: Shock Ability - by Warrax - 09-11-2018, 08:39 AM
RE: Shock Ability - by madsiur - 09-11-2018, 10:52 AM
RE: Shock Ability - by PowerPanda - 09-11-2018, 09:15 AM
RE: Shock Ability - by Lightning - 09-11-2018, 03:47 PM
RE: Shock Ability - by PowerPanda - 09-11-2018, 06:28 PM
RE: Shock Ability - by Lightning - 09-11-2018, 06:47 PM

Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite