Difference between revisions of "Catch"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
No Parameters - Returns Nothing
  Catch:
+
  001883ac: 3c048019 lui r4,0x8019    
+
  Check for Catch usability        ( mime check )
  001883b0: 8c842d98 lw r4,0x2d98(r4)     Load Defender's Stats
+
Roll Reacting chances (Brave%)
  001883b4: 27bdffe8 addiu r29,r29,0xffe8     
+
If Unit is Reacting, Attack misses (Hit flag = 0x00, Evade Type = 0x0d , Store Reaction ID and Item ID (in Action 0x26))
  001883b8: afbf0010 sw r31,0x0010(r29)    
+
-------------------------------------------------------------------------------------------------------------------------
  001883bc: 0c063248 jal 0x0018c920     [[Check if unit can react 1]]
+
  001883ac: 3c048019 lui r4,0x8019           |
  001883c0: 00000000 nop          
+
  001883b0: 8c842d98 lw r4,0x2d98(r4)         |{{f/adr|<nowiki>r2 = Target data pointer</nowiki>}}
  001883c4: 1440002c bne r2,r0,0x00188478    
+
  001883b4: 27bdffe8 addiu r29,r29,-0x0018    |
  001883c8: 00000000 nop          
+
  001883b8: afbf0010 sw r31,0x0010(r29)       |
  001883cc: 3c028019 lui r2,0x8019    
+
  001883bc: 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..)
  001883d0: 8c422d94 lw r2,0x2d94(r2)     Load Attacker's Stats
+
  001883c0: 00000000 nop                     |
  001883d4: 00000000 nop          
+
  001883c4: 1440002c bne r2,r0,0x00188478     {{f/Cond|If Unit can React}} /Else branch to {{f/loc|END}}
  001883d8: 90430003 lbu r3,0x0003(r2)     Load Attacker's Job
+
  001883c8: 00000000 nop                         |
  001883dc: 3402005d ori r2,r0,0x005d    
+
  001883cc: 3c028019 lui r2,0x8019               |
  001883e0: 10620025 beq r3,r2,0x00188478     Branch to end if Attacker is a mime?
+
  001883d0: 8c422d94 lw r2,0x2d94(r2)             |{{f/adr|<nowiki>r2 = Attacker data pointer</nowiki>}}
  001883e4: 00000000 nop          
+
  001883d4: 00000000 nop                         |
  001883e8: 3c058019 lui r5,0x8019    
+
  001883d8: 90430003 lbu r3,0x0003(r2)           |{{f/load|<nowiki>r3 = Attacker's curent job</nowiki>}}
  001883ec: 8ca52d98 lw r5,0x2d98(r5)     Load Defender's Stats
+
  001883dc: 3402005d ori r2,r0,0x005d             |{{f/std|<nowiki>r2 = 0x5d (mime job ID)</nowiki>}}
  001883f0: 00000000 nop          
+
  001883e0: 10620025 beq r3,r2,0x00188478         {{f/Cond|If Attacker is not a mime}} /Else branch to {{f/loc|END}} {{f/std|        mime check}}
  001883f4: 90a2008e lbu r2,0x008e(r5)     Load Defender's 4th set of Reactions
+
  001883e4: 00000000 nop                             |
  001883f8: 00000000 nop          
+
  001883e8: 3c058019 lui r5,0x8019                   |
  001883fc: 30420008 andi r2,r2,0x0008    
+
  001883ec: 8ca52d98 lw r5,0x2d98(r5)                 |{{f/adr|<nowiki>r5 = Target data pointer</nowiki>}}
  00188400: 1040001d beq r2,r0,0x00188478     Branch to end if user is not equiped  with Catch
+
  001883f0: 00000000 nop                             |
  00188404: 34020064 ori r2,r0,0x0064     R2 = 100
+
  001883f4: 90a2008e lbu r2,0x008e(r5)               |{{f/load|<nowiki>r2 = Target's Reaction abilities (4th set)</nowiki>}}
  00188408: 90a30024 lbu r3,0x0024(r5)     Load Brave
+
  001883f8: 00000000 nop                             |
  0018840c: 3c048019 lui r4,0x8019    
+
  001883fc: 30420008 andi r2,r2,0x0008               |{{f/std|<nowiki>r2 = 0x08 if Target uses catch</nowiki>}}
  00188410: 8c842d90 lw r4,0x2d90(r4)     Current Action Data Pointer
+
  00188400: 1040001d beq r2,r0,0x00188478             {{f/Cond|If Target uses Catch}} /Else branch to {{f/loc|END}}
  00188414: 00431023 subu r2,r2,r3     100 - Brave
+
  00188404: 34020064 ori r2,r0,0x0064                     |{{f/std|<nowiki>r2 = 100</nowiki>}}
  00188418: 1040000a beq r2,r0,0x00188444     Branch if Brave > 100 ?
+
  00188408: 90a30024 lbu r3,0x0024(r5)                   |{{f/load|<nowiki>r3 = Target's Brave</nowiki>}}
  0018841c: a482002a sh r2,0x002a(r4)     Store Hit % for Attack on self?
+
  0018840c: 3c048019 lui r4,0x8019                       |
  00188420: 0c0634e1 jal 0x0018d384     Chance to React
+
  00188410: 8c842d90 lw r4,0x2d90(r4)                     |{{f/adr|<nowiki>r4 = Target data pointer</nowiki>}}
  00188424: 00a02021 addu r4,r5,r0    
+
  00188414: 00431023 subu r2,r2,r3                       |{{f/std|<nowiki>r2 = 100 - Brave</nowiki>}}
  00188428: 14400013 bne r2,r0,0x00188478     Branch to end if Reaction failed
+
  00188418: 1040000a beq r2,r0,0x00188444                 {{f/Cond|If Target Brave <> 100 (in fact < 100)}} /Else branch to {{f/loc|END}}
  0018842c: 00000000 nop          
+
  0018841c: a482002a sh r2,0x002a(r4)                     |{{f/store|Store 100-Brave as TCA hit%}}
  00188430: 3c028019 lui r2,0x8019    
+
  00188420: 0c0634e1 jal 0x0018d384                           |{{f/jal|Chance to React|Chance to React}} Returns r2 = 0x00 if Target is reacting ( Random (0 to 100) < Target Brave)
  00188434: 8c42f5fc lw r2,-0x0a04(r2)     Load something to do with Damage Display?
+
  00188424: 00a02021 addu r4,r5,r0                           |{{f/std|<nowiki>r4 = Target data pointer</nowiki>}}
  00188438: 00000000 nop          
+
  00188428: 14400013 bne r2,r0,0x00188478                     {{f/Cond|If Target is Reacting}} /Else branch to {{f/loc|END}}
  0018843c: 1440000e bne r2,r0,0x00188478    
+
  0018842c: 00000000 nop                                         |
  00188440: 00000000 nop          
+
  00188430: 3c028019 lui r2,0x8019                               |
  00188444: 3c028019 lui r2,0x8019    
+
  00188434: 8c42f5fc lw r2,-0x0a04(r2)                           |{{f/adr|<nowiki>r2 = Action state</nowiki>}}
  00188448: 8c422d90 lw r2,0x2d90(r2)     Load Current Action Data Pointer
+
  00188438: 00000000 nop                                         |
  0018844c: 00000000 nop          
+
  0018843c: 1440000e bne r2,r0,0x00188478                         {{f/Cond|If Action is being executed (not preview nor AI)}}
  00188450: a0400000 sb r0,0x0000(r2)     Change hit flag to miss
+
  00188440: 00000000 nop                                             |
  00188454: 3c038019 lui r3,0x8019    
+
  00188444: 3c028019 lui r2,0x8019                       '''#E'''          |
  00188458: 8c632d90 lw r3,0x2d90(r3)     Load Current Action Data Pointer
+
  00188448: 8c422d90 lw r2,0x2d90(r2)                                 |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  0018845c: 340201c2 ori r2,r0,0x01c2    
+
  0018844c: 00000000 nop                                             |
  00188460: a462000e sh r2,0x000e(r3)     Store Reaction ID?
+
  00188450: a0400000 sb r0,0x0000(r2)                                 |{{f/store|Set TCA hit flag to 0x00}}
  00188464: 3c048019 lui r4,0x8019    
+
  00188454: 3c038019 lui r3,0x8019                                   |
  00188468: 908438d8 lbu r4,0x38d8(r4)     Load Used Weapon ID
+
  00188458: 8c632d90 lw r3,0x2d90(r3)                                 |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  0018846c: 3402000d ori r2,r0,0x000d    
+
  0018845c: 340201c2 ori r2,r0,0x01c2                                 |{{f/std|<nowiki>r2 = 0x1c2</nowiki>}} {{f/std|(Catch ability ID)}}
  00188470: a0620002 sb r2,0x0002(r3)     Store Miss type?
+
  00188460: a462000e sh r2,0x000e(r3)                                 |{{f/store|Store Catch as TCA reaction ID}}
  00188474: a4640026 sh r4,0x0026(r3)     Store Used Weapon ID to something?
+
  00188464: 3c048019 lui r4,0x8019                                   |
  00188478: 8fbf0010 lw r31,0x0010(r29)    
+
  00188468: 908438d8 lbu r4,0x38d8(r4)                               |{{f/load|<nowiki>r4 = Current Ability used Weapon ID</nowiki>}}
  0018847c: 27bd0018 addiu r29,r29,0x0018    
+
  0018846c: 3402000d ori r2,r0,0x000d                                 |{{f/std|<nowiki>r2 = 0x0d</nowiki>}}
  00188480: 03e00008 jr r31        
+
  00188470: a0620002 sb r2,0x0002(r3)                                 |{{f/store|<nowiki>Set TCA evade type = 0x0d</nowiki>}}
 +
  00188474: a4640026 sh r4,0x0026(r3)                                 |{{f/store|Store Used Weapon ID in TCA last attack recieved}} {{f/std| Seems to be reaction related data (for Absorb MP it's ability MP cost..etc)}}
 +
  00188478: 8fbf0010 lw r31,0x0010(r29)       END
 +
  0018847c: 27bd0018 addiu r29,r29,0x0018
 +
  00188480: 03e00008 jr r31
 
  00188484: 00000000 nop
 
  00188484: 00000000 nop
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
0018aba8: [[63_Dmg_(SP*WP)]]

Latest revision as of 20:21, 18 June 2022

No Parameters - Returns Nothing

Check for Catch usability         ( mime check )
Roll Reacting chances (Brave%)
If Unit is Reacting, Attack misses (Hit flag = 0x00, Evade Type = 0x0d , Store Reaction ID and Item ID (in Action 0x26))
-------------------------------------------------------------------------------------------------------------------------
001883ac: 3c048019 lui r4,0x8019            |
001883b0: 8c842d98 lw r4,0x2d98(r4)         |r2 = Target data pointer
001883b4: 27bdffe8 addiu r29,r29,-0x0018    |
001883b8: afbf0010 sw r31,0x0010(r29)       |
001883bc: 0c063248 jal 0x0018c920           |-->Check if unit can react 1 r2 = 0x00 if unit can react (check status, depth, action state etc..)
001883c0: 00000000 nop                      |
001883c4: 1440002c bne r2,r0,0x00188478     #If Unit can React /Else branch to END
001883c8: 00000000 nop                          |
001883cc: 3c028019 lui r2,0x8019                |
001883d0: 8c422d94 lw r2,0x2d94(r2)             |r2 = Attacker data pointer
001883d4: 00000000 nop                          |
001883d8: 90430003 lbu r3,0x0003(r2)            |r3 = Attacker's curent job
001883dc: 3402005d ori r2,r0,0x005d             |r2 = 0x5d (mime job ID)
001883e0: 10620025 beq r3,r2,0x00188478         #If Attacker is not a mime /Else branch to END         mime check
001883e4: 00000000 nop                              |
001883e8: 3c058019 lui r5,0x8019                    |
001883ec: 8ca52d98 lw r5,0x2d98(r5)                 |r5 = Target data pointer
001883f0: 00000000 nop                              |
001883f4: 90a2008e lbu r2,0x008e(r5)                |r2 = Target's Reaction abilities (4th set)
001883f8: 00000000 nop                              |
001883fc: 30420008 andi r2,r2,0x0008                |r2 = 0x08 if Target uses catch
00188400: 1040001d beq r2,r0,0x00188478             #If Target uses Catch /Else branch to END
00188404: 34020064 ori r2,r0,0x0064                     |r2 = 100
00188408: 90a30024 lbu r3,0x0024(r5)                    |r3 = Target's Brave
0018840c: 3c048019 lui r4,0x8019                        |
00188410: 8c842d90 lw r4,0x2d90(r4)                     |r4 = Target data pointer
00188414: 00431023 subu r2,r2,r3                        |r2 = 100 - Brave
00188418: 1040000a beq r2,r0,0x00188444                 #If Target Brave <>  100 (in fact < 100) /Else branch to END
0018841c: a482002a sh r2,0x002a(r4)                     |Store 100-Brave as TCA hit%
00188420: 0c0634e1 jal 0x0018d384                           |-->Chance to React Returns r2 = 0x00 if Target is reacting ( Random (0 to 100) < Target Brave)
00188424: 00a02021 addu r4,r5,r0                            |r4 = Target data pointer
00188428: 14400013 bne r2,r0,0x00188478                     #If Target is Reacting /Else branch to END
0018842c: 00000000 nop                                          |
00188430: 3c028019 lui r2,0x8019                                |
00188434: 8c42f5fc lw r2,-0x0a04(r2)                            |r2 = Action state
00188438: 00000000 nop                                          |
0018843c: 1440000e bne r2,r0,0x00188478                         #If Action is being executed (not preview nor AI)
00188440: 00000000 nop                                              |
00188444: 3c028019 lui r2,0x8019                        #E          |
00188448: 8c422d90 lw r2,0x2d90(r2)                                 |r2 = Target Current Action (TCA) data pointer
0018844c: 00000000 nop                                              |
00188450: a0400000 sb r0,0x0000(r2)                                 |Set TCA hit flag to 0x00
00188454: 3c038019 lui r3,0x8019                                    |
00188458: 8c632d90 lw r3,0x2d90(r3)                                 |r3 = TCA data pointer
0018845c: 340201c2 ori r2,r0,0x01c2                                 |r2 = 0x1c2 (Catch ability ID)
00188460: a462000e sh r2,0x000e(r3)                                 |Store Catch as TCA reaction ID
00188464: 3c048019 lui r4,0x8019                                    |
00188468: 908438d8 lbu r4,0x38d8(r4)                                |r4 = Current Ability used Weapon ID
0018846c: 3402000d ori r2,r0,0x000d                                 |r2 = 0x0d
00188470: a0620002 sb r2,0x0002(r3)                                 |Set TCA evade type = 0x0d
00188474: a4640026 sh r4,0x0026(r3)                                 |Store Used Weapon ID in TCA last attack recieved  Seems to be reaction related data (for Absorb MP it's ability MP cost..etc)
00188478: 8fbf0010 lw r31,0x0010(r29)       END
0018847c: 27bd0018 addiu r29,r29,0x0018
00188480: 03e00008 jr r31
00188484: 00000000 nop

Return locations

Battle.bin
0018aba8: 63_Dmg_(SP*WP)