Difference between revisions of "Finger Guard"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
  Finger Guard:
+
  No Parameters - Returns Nothing
  001882f8: 3c048019 lui r4,0x8019             
+
  001882fc: 8c842d98 lw r4,0x2d98(r4)     Load Defender's Stats
+
If Unit can react and is using Finger Guard
  00188300: 27bdffe8 addiu r29,r29,0xffe8     
+
  - Roll react chances (random from 0 to 100 Vs Target's Brave)
  00188304: afbf0010 sw r31,0x0010(r29)    
+
  - If Target is reacting:- Set Action hit flag to MISS
  00188308: 0c063248 jal 0x0018c920     [[Check if unit can react 1]]
+
                            - Store 0x1c0 as reaction ID
  0018830c: 00000000 nop          
+
                            - Set Evade type = 0x0b
  00188310: 14400022 bne r2,r0,0x0018839c   Branch if unit can't react   
+
--------------------------------------------------------------------------------------------
  00188314: 00000000 nop          
+
  001882f8: 3c048019 lui r4,0x8019            |
  00188318: 3c058019 lui r5,0x8019    
+
  001882fc: 8c842d98 lw r4,0x2d98(r4)         |{{f/adr|<nowiki>r2 = Target data pointer</nowiki>}} {{f/adr|Load Defender's Stats}}
  0018831c: 8ca52d98 lw r5,0x2d98(r5)     Load Defender's Stats....
+
  00188300: 27bdffe8 addiu r29,r29,-0x0018    |
  00188320: 00000000 nop          
+
  00188304: afbf0010 sw r31,0x0010(r29)       |
  00188324: 90a2008e lbu r2,0x008e(r5)     Load 4th set of Reactions
+
  00188308: 0c063248 jal 0x0018c920           |{{f/jal|Check if unit can react 1|Check if unit can react 1}} r2 = 0x00 if unit can react (check status, depth, action state etc..)
  00188328: 00000000 nop          
+
  0018830c: 00000000 nop                     |
  0018832c: 30420020 andi r2,r2,0x0020     Branch if not equipped with Finger Guard
+
  00188310: 14400022 bne r2,r0,0x0018839c     {{f/Cond|If Unit can react}} /Else branch to {{f/loc|END}}
  00188330: 1040001a beq r2,r0,0x0018839c
+
  00188314: 00000000 nop                         |
  00188334: 34020064 ori r2,r0,0x0064     R2=100
+
  00188318: 3c058019 lui r5,0x8019               |
  00188338: 90a30024 lbu r3,0x0024(r5)    
+
  0018831c: 8ca52d98 lw r5,0x2d98(r5)             |{{f/adr|<nowiki>r5 = Target data pointer</nowiki>}}
  0018833c: 3c048019 lui r4,0x8019    
+
  00188320: 00000000 nop                         |
  00188340: 8c842d90 lw r4,0x2d90(r4)     Load Current Action Data Pointer
+
  00188324: 90a2008e lbu r2,0x008e(r5)           |{{f/load|<nowiki>r2 = Target Reaction Abilities (4th set)</nowiki>}}
  00188344: 00431023 subu r2,r2,r3     100 - Brave
+
  00188328: 00000000 nop                         |
  00188348: 1040000a beq r2,r0,0x00188374     Branch if Brave > 100?
+
  0018832c: 30420020 andi r2,r2,0x0020           |{{f/std|<nowiki>r2 = 0x20 if Target uses Finger Guard</nowiki>}}
  0018834c: a482002a sh r2,0x002a(r4)     Store Hit %
+
  00188330: 1040001a beq r2,r0,0x0018839c         {{f/Cond|If Target uses Finger Guard}} /Else branch to  {{f/loc|END}}
  00188350: 0c0634e1 jal 0x0018d384     chance to React
+
  00188334: 34020064 ori r2,r0,0x0064                 |{{f/std|<nowiki>r2 = 0x64 (100)</nowiki>}}
  00188354: 00a02021 addu r4,r5,r0    
+
  00188338: 90a30024 lbu r3,0x0024(r5)               |{{f/load|<nowiki>r3 = Target Brave</nowiki>}}
  00188358: 14400010 bne r2,r0,0x0018839c    
+
  0018833c: 3c048019 lui r4,0x8019                   |
  0018835c: 00000000 nop          
+
  00188340: 8c842d90 lw r4,0x2d90(r4)                 |{{f/adr|<nowiki>r4 = Target Current Action (TCA) data pointer</nowiki>}}
  00188360: 3c028019 lui r2,0x8019    
+
  00188344: 00431023 subu r2,r2,r3                   |{{f/std|<nowiki>r2 = 100 - Target's Brave</nowiki>}}
  00188364: 8c42f5fc lw r2,-0x0a04(r2)     Load Something to do with Damage Display?
+
  00188348: 1040000a beq r2,r0,0x00188374             {{f/Cond|If Target Brave < 100}} /Else 100% of guarding, branch to Attack fail section
  00188368: 00000000 nop          
+
  0018834c: a482002a sh r2,0x002a(r4)                 |{{f/store|<nowiki>Set TCA Hit% = 100 - Brave</nowiki>}}
  0018836c: 1440000b bne r2,r0,0x0018839c    
+
  00188350: 0c0634e1 jal 0x0018d384                       |{{f/jal|Chance_to_React|Chance_to_React}} Returns r2 = 0x00 if Target is reacting ( Random (0 to 100) < Target Brave)
  00188370: 00000000 nop          
+
  00188354: 00a02021 addu r4,r5,r0                       |{{f/std|<nowiki>r4 = Target data pointer</nowiki>}}
  00188374: 3c028019 lui r2,0x8019    
+
  00188358: 14400010 bne r2,r0,0x0018839c                 {{f/Cond|If Target is reacting}} /Else branch to  {{f/loc|END}}
  00188378: 8c422d90 lw r2,0x2d90(r2)     Load Current Action Data Pointer
+
  0018835c: 00000000 nop                                     |
  0018837c: 00000000 nop          
+
  00188360: 3c028019 lui r2,0x8019                           |
  00188380: a0400000 sb r0,0x0000(r2)     Change hit flag to miss
+
  00188364: 8c42f5fc lw r2,-0x0a04(r2)                       |{{f/adr|<nowiki>r2 = Action State</nowiki>}}
  00188384: 3c038019 lui r3,0x8019    
+
  00188368: 00000000 nop                                     |
  00188388: 8c632d90 lw r3,0x2d90(r3)     Load Current Action Data Pointer...
+
  0018836c: 1440000b bne r2,r0,0x0018839c                     {{f/Cond|If Action is being executed}} /Else branch to  {{f/loc|END}}
  0018838c: 340201c0 ori r2,r0,0x01c0    
+
  00188370: 00000000 nop                                         |
  00188390: a462000e sh r2,0x000e(r3)     Store Reaction ID
+
  00188374: 3c028019 lui r2,0x8019                   {{f/Cond|E}}          |
  00188394: 3402000b ori r2,r0,0x000b    
+
  00188378: 8c422d90 lw r2,0x2d90(r2)                             |{{f/adr|<nowiki>r2 = TCA data pointer</nowiki>}}
  00188398: a0620002 sb r2,0x0002(r3)     Store Evade type?
+
  0018837c: 00000000 nop                                         |
  0018839c: 8fbf0010 lw r31,0x0010(r29)    
+
  00188380: a0400000 sb r0,0x0000(r2)                             |{{f/store|Set TCA hit flag to MISS}}
  001883a0: 27bd0018 addiu r29,r29,0x0018    
+
  00188384: 3c038019 lui r3,0x8019                               |
  001883a4: 03e00008 jr r31        
+
  00188388: 8c632d90 lw r3,0x2d90(r3)                             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
 +
  0018838c: 340201c0 ori r2,r0,0x01c0                             |{{f/std|<nowiki>r2 = 0x1c0 (Finger Guard ID)</nowiki>}}
 +
  00188390: a462000e sh r2,0x000e(r3)                             |{{f/store|Store Finger Guard ID in TCA Reaction ID}}
 +
  00188394: 3402000b ori r2,r0,0x000b                             |{{f/std|<nowiki>r2 = 0x0b</nowiki>}}
 +
  00188398: a0620002 sb r2,0x0002(r3)                             |{{f/store|<nowiki>Store TCA Evade Type = 0x0b (shared with blade grasp)</nowiki>}}
 +
  0018839c: 8fbf0010 lw r31,0x0010(r29)       END
 +
  001883a0: 27bd0018 addiu r29,r29,0x0018
 +
  001883a4: 03e00008 jr r31
 
  001883a8: 00000000 nop
 
  001883a8: 00000000 nop
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
00189a20: 2A_Hit_(MA%2BX)%25_//_AffectBraveOrFaith(Y)

Latest revision as of 19:42, 22 April 2022

No Parameters - Returns Nothing

If Unit can react and is using Finger Guard
  - Roll react chances (random from 0 to 100 Vs Target's Brave)
  - If Target is reacting:- Set Action hit flag to MISS
                           - Store 0x1c0 as reaction ID 
                           - Set Evade type = 0x0b
--------------------------------------------------------------------------------------------
001882f8: 3c048019 lui r4,0x8019            |
001882fc: 8c842d98 lw r4,0x2d98(r4)         |r2 = Target data pointer Load Defender's Stats
00188300: 27bdffe8 addiu r29,r29,-0x0018    |
00188304: afbf0010 sw r31,0x0010(r29)       |
00188308: 0c063248 jal 0x0018c920           |-->Check if unit can react 1 r2 = 0x00 if unit can react (check status, depth, action state etc..)
0018830c: 00000000 nop                      |
00188310: 14400022 bne r2,r0,0x0018839c     #If Unit can react /Else branch to  END
00188314: 00000000 nop                          |
00188318: 3c058019 lui r5,0x8019                |
0018831c: 8ca52d98 lw r5,0x2d98(r5)             |r5 = Target data pointer
00188320: 00000000 nop                          |
00188324: 90a2008e lbu r2,0x008e(r5)            |r2 = Target Reaction Abilities (4th set)
00188328: 00000000 nop                          |
0018832c: 30420020 andi r2,r2,0x0020            |r2 = 0x20 if Target uses Finger Guard
00188330: 1040001a beq r2,r0,0x0018839c         #If Target uses Finger Guard /Else branch to  END
00188334: 34020064 ori r2,r0,0x0064                 |r2 = 0x64 (100)
00188338: 90a30024 lbu r3,0x0024(r5)                |r3 = Target Brave
0018833c: 3c048019 lui r4,0x8019                    |
00188340: 8c842d90 lw r4,0x2d90(r4)                 |r4 = Target Current Action (TCA) data pointer
00188344: 00431023 subu r2,r2,r3                    |r2 = 100 - Target's Brave
00188348: 1040000a beq r2,r0,0x00188374             #If Target Brave < 100 /Else 100% of guarding, branch to Attack fail section
0018834c: a482002a sh r2,0x002a(r4)                 |Set TCA Hit% = 100 - Brave
00188350: 0c0634e1 jal 0x0018d384                       |-->Chance_to_React Returns r2 = 0x00 if Target is reacting ( Random (0 to 100) < Target Brave)
00188354: 00a02021 addu r4,r5,r0                        |r4 = Target data pointer
00188358: 14400010 bne r2,r0,0x0018839c                 #If Target is reacting /Else branch to  END
0018835c: 00000000 nop                                      |
00188360: 3c028019 lui r2,0x8019                            |
00188364: 8c42f5fc lw r2,-0x0a04(r2)                        |r2 = Action State
00188368: 00000000 nop                                      |
0018836c: 1440000b bne r2,r0,0x0018839c                     #If Action is being executed /Else branch to  END
00188370: 00000000 nop                                          |
00188374: 3c028019 lui r2,0x8019                    #E          |
00188378: 8c422d90 lw r2,0x2d90(r2)                             |r2 = TCA data pointer
0018837c: 00000000 nop                                          |
00188380: a0400000 sb r0,0x0000(r2)                             |Set TCA hit flag to MISS
00188384: 3c038019 lui r3,0x8019                                |
00188388: 8c632d90 lw r3,0x2d90(r3)                             |r3 = TCA data pointer
0018838c: 340201c0 ori r2,r0,0x01c0                             |r2 = 0x1c0 (Finger Guard ID)
00188390: a462000e sh r2,0x000e(r3)                             |Store Finger Guard ID in TCA Reaction ID
00188394: 3402000b ori r2,r0,0x000b                             |r2 = 0x0b
00188398: a0620002 sb r2,0x0002(r3)                             |Store TCA Evade Type = 0x0b (shared with blade grasp)
0018839c: 8fbf0010 lw r31,0x0010(r29)       END
001883a0: 27bd0018 addiu r29,r29,0x0018
001883a4: 03e00008 jr r31
001883a8: 00000000 nop

Return locations

Battle.bin
00189a20: 2A_Hit_(MA%2BX)%25_//_AffectBraveOrFaith(Y)