Difference between revisions of "Sunken State, Caution, Dragon Spirit, counters, absorbs usability"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  Sunken State, Caution, Dragon Spirit, Brave Up, Face Up, Counter Tackle, Counter Flood, Absorb Used MP, Counter, Counter Magic Check:
+
  Parameters : None
  0018cb00: 27bdffe8 addiu r29,r29,0xffe8     
+
  0018cb04: 3c038019 lui r3,0x8019
+
If Used Formula ( 0x801938e5 ) = 0x07 (Heal weapon), skip the routine
  0018cb08: 906338e5 lbu r3,0x38e5(r3)     Load Attack Formula ?
+
  0018cb0c: 34020007 ori r2,r0,0x0007      
+
Else if unit can react, check Targeted unit reaction set looking for several abilities.
  0018cb10: 10620044 beq r3,r2,0x0018cc24 Branch if using the "Healing"  Weapon Formula ?
+
If one is found, roll it and exit (one roll only)
  0018cb14: afbf0010 sw r31,0x0010(r29)    
+
If succesfull, Unit 0x19a and 0x1b2 holds new values.
  0018cb18: 3c048019 lui r4,0x8019    
+
  ----------------------------------------------------------------------------------------------
  0018cb1c: 8c842d98 lw r4,0x2d98(r4) Load Target's Stats
+
  0018cb00: 27bdffe8 addiu r29,r29,-0x0018    |
  0018cb20: 0c063248 jal 0x0018c920 Can react check (status?)
+
  0018cb04: 3c038019 lui r3,0x8019           |
  0018cb24: 00000000 nop          
+
  0018cb08: 906338e5 lbu r3,0x38e5(r3)       |{{f/load|<nowiki>r3 = Ability Formula</nowiki>}}
  0018cb28: 1440003e bne r2,r0,0x0018cc24    
+
  0018cb0c: 34020007 ori r2,r0,0x0007         |{{f/std|<nowiki>r2 = 0x07</nowiki>}}
  0018cb2c: 00000000 nop          
+
  0018cb10: 10620044 beq r3,r2,0x0018cc24     {{f/Cond|If not using Formula 0x07 (Heal weapon)}} /Else branch to {{f/loc| END }}
  0018cb30: 3c048019 lui r4,0x8019    
+
  0018cb14: afbf0010 sw r31,0x0010(r29)           |
  0018cb34: 8c842d98 lw r4,0x2d98(r4)   Load Target's Stats
+
  0018cb18: 3c048019 lui r4,0x8019               |
  0018cb38: 00000000 nop
+
  0018cb1c: 8c842d98 lw r4,0x2d98(r4)             |{{f/adr|<nowiki>r4 = Targeted Unit's data pointer</nowiki>}}
  0018cb3c: 9083008b lbu r3,0x008b(r4)     Load first set of Reactions
+
  0018cb20: 0c063248 jal 0x0018c920               |{{f/jal|Check_if_unit_can_react_1|Check_if_unit_can_react_1}}  returns r2 = 0x00 if Unit can react
  0018cb40: 00000000 nop          
+
  0018cb24: 00000000 nop                         |
  0018cb44: 30620010 andi r2,r3,0x0010    
+
  0018cb28: 1440003e bne r2,r0,0x0018cc24         {{f/Cond|If Targeted Unit can react}} /Else branch to {{f/loc| END }}
  0018cb48: 10400003 beq r2,r0,0x0018cb58     Branch if not using Sunken State
+
  0018cb2c: 00000000 nop                             |{{f/std| }}
  0018cb4c: 34050010 ori r5,r0,0x0010     r5 = 10
+
  0018cb30: 3c048019 lui r4,0x8019                   |
  0018cb50: 08063307 j 0x0018cc1c        
+
  0018cb34: 8c842d98 lw r4,0x2d98(r4)                 |{{f/adr|<nowiki>r4 = Targeted Unit's data pointer</nowiki>}}
  0018cb54: 340401a9 ori r4,r0,0x01a9     Load Attack's Status Inflict
+
  0018cb38: 00000000 nop                             |
 
+
  0018cb3c: 9083008b lbu r3,0x008b(r4)               |{{f/load|<nowiki>r3 = Target unit 1st set of Reaction abilities</nowiki>}}
  0018cb58: 30620008 andi r2,r3,0x0008    
+
  0018cb40: 00000000 nop                             |
  0018cb5c: 10400003 beq r2,r0,0x0018cb6c     Branch if not using Caution
+
  0018cb44: 30620010 andi r2,r3,0x0010               |{{f/std|<nowiki>r2 = 0x10 if Target unit uses sunken state</nowiki>}}
  0018cb60: 30620004 andi r2,r3,0x0004    
+
  0018cb48: 10400003 beq r2,r0,0x0018cb58             {{f/Cond|If Targeted Unit uses Sunken State}}
  0018cb64: 08063307 j 0x0018cc1c        
+
  0018cb4c: 34050010 ori r5,r0,0x0010                 |{{f/std|<nowiki>r5 = 0x10 (Ability flag "blade grasp")</nowiki>}}
  0018cb68: 340401aa ori r4,r0,0x01aa     Load Attack's Status Inflict
+
  0018cb50: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
 
+
  0018cb54: 340401a9 ori r4,r0,0x01a9                     |{{f/std|<nowiki>r4 = 0x1a9 (sunken state ID)</nowiki>}}
  0018cb6c: 10400003 beq r2,r0,0x0018cb7c     Branch if not using Dragon Spirit
+
  0018cb70: 34050010 ori r5,r0,0x0010     r5 = 10
+
  0018cb58: 30620008 andi r2,r3,0x0008               |{{f/std|<nowiki>r2 = 0x08 If Unit uses caution</nowiki>}}
  0018cb74: 08063307 j 0x0018cc1c        
+
  0018cb5c: 10400003 beq r2,r0,0x0018cb6c             {{f/Cond|If Targeted Unit uses Caution}}
  0018cb78: 340401ab ori r4,r0,0x01ab     Load Attack's Status Inflict
+
  0018cb60: 30620004 andi r2,r3,0x0004               |{{f/std|<nowiki>r2 = 0x04 If Targeted Unit uses Dragon spirit</nowiki>}}
 
+
  0018cb64: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
  0018cb7c: 30620001 andi r2,r3,0x0001    
+
  0018cb68: 340401aa ori r4,r0,0x01aa                     |{{f/std|<nowiki>r4 = 0x1aa (Caution ID)</nowiki>}}
  0018cb80: 10400003 beq r2,r0,0x0018cb90     Branch if not using Brave Up
+
  0018cb84: 00000000 nop          
+
  0018cb6c: 10400003 beq r2,r0,0x0018cb7c             {{f/Cond|If Targeted Unit uses dragon spirit}}
  0018cb88: 08063307 j 0x0018cc1c        
+
  0018cb70: 34050010 ori r5,r0,0x0010                     |{{f/std|<nowiki>r5 = 0x10</nowiki>}}
  0018cb8c: 340401ad ori r4,r0,0x01ad     Load Attack's Stats Removal
+
  0018cb74: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
 
+
  0018cb78: 340401ab ori r4,r0,0x01ab                     |{{f/std|<nowiki>r4 = 0x1ab (Dragon spirit ID)</nowiki>}}
  0018cb90: 9083008c lbu r3,0x008c(r4)     Load Second set of Reactions
+
  0018cb94: 00000000 nop          
+
  0018cb7c: 30620001 andi r2,r3,0x0001               |{{f/std|<nowiki>r2 = 0x01 if Targeted Unit uses Brave Up</nowiki>}}
  0018cb98: 30620080 andi r2,r3,0x0080    
+
  0018cb80: 10400003 beq r2,r0,0x0018cb90             {{f/Cond|If Targeted Unit uses Brave Up}}
  0018cb9c: 10400005 beq r2,r0,0x0018cbb4     Branch if not using Faith (Face) up
+
  0018cb84: 00000000 nop                                 |
  0018cba0: 30620002 andi r2,r3,0x0002     r2= 2
+
  0018cb88: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
 
+
  0018cb8c: 340401ad ori r4,r0,0x01ad                     |{{f/std|<nowiki>r4 = 0x1ad (Brave Up ID)</nowiki>}}
  0018cba4: 0c0633dd jal 0x0018cf74     Faith up/ absorb mp usability
+
  0018cba8: 340401ae ori r4,r0,0x01ae    
+
  0018cb90: 9083008c lbu r3,0x008c(r4)               |{{f/load|<nowiki>r3 = Target unit 2nd set of Reaction abilities</nowiki>}}
  0018cbac: 08063309 j 0x0018cc24        
+
  0018cb94: 00000000 nop                             |
  0018cbb0: 00000000 nop        
+
  0018cb98: 30620080 andi r2,r3,0x0080               |{{f/std|<nowiki>r2 = 0x80 if Targeted Unit uses Face Up</nowiki>}}
 
+
  0018cb9c: 10400005 beq r2,r0,0x0018cbb4             {{f/Cond|If Targeted unit uses Face Up}}
  0018cbb4: 10400003 beq r2,r0,0x0018cbc4     Branch if not using Counter Tackle
+
  0018cba0: 30620002 andi r2,r3,0x0002               |{{f/std|<nowiki>r2 = 0x02 if Targeted Unit uses Counter Tackle</nowiki>}}
  0018cbb8: 34050010 ori r5,r0,0x0010     r5 = 10
+
  0018cba4: 0c0633dd jal 0x0018cf74                       |{{f/jal|Face_Up_and_Absorb_Used_MP_usability|Face_Up_and_Absorb_Used_MP_usability}} r4 is stored as reaction ID if succesfull
  0018cbbc: 08063307 j 0x0018cc1c        
+
  0018cba8: 340401ae ori r4,r0,0x01ae                     |{{f/std|<nowiki>r4 = 0x1ae (Face Up ID)</nowiki>}}
  0018cbc0: 340401b4 ori r4,r0,0x01b4    
+
  0018cbac: 08063309 j 0x0018cc24                         {{f/jump|Jump to END}}
 
+
  0018cbb0: 00000000 nop                                 |
  0018cbc4: 30620001 andi r2,r3,0x0001    
+
  0018cbc8: 10400003 beq r2,r0,0x0018cbd8     Branch if not using Counter Flood
+
  0018cbb4: 10400003 beq r2,r0,0x0018cbc4             {{f/Cond|if Targeted Unit uses Counter Tackle}}
  0018cbcc: 34050080 ori r5,r0,0x0080     Prepare Counter Flood Flag Check
+
  0018cbb8: 34050010 ori r5,r0,0x0010                     |{{f/std|<nowiki>r5 = 0x10</nowiki>}}
  0018cbd0: 08063307 j 0x0018cc1c        
+
  0018cbbc: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
  0018cbd4: 340401b5 ori r4,r0,0x01b5    
+
  0018cbc0: 340401b4 ori r4,r0,0x01b4                     |{{f/std|<nowiki>r4 = 0x1b4 (Counter Tackle ID)</nowiki>}}
 
+
  0018cbd8: 9084008d lbu r4,0x008d(r4)     Load 3rd set of Reactions
+
  0018cbc4: 30620001 andi r2,r3,0x0001               |{{f/std|<nowiki>r2 = 0x01 if Targeted Unit uses Counter Flood</nowiki>}}
  0018cbdc: 00000000 nop          
+
  0018cbc8: 10400003 beq r2,r0,0x0018cbd8             {{f/Cond|If Targeted Unit uses Counter Flood}}
  0018cbe0: 30820080 andi r2,r4,0x0080    
+
  0018cbcc: 34050080 ori r5,r0,0x0080                 |{{f/std|<nowiki>r5 = 0x80 (Counter floodable Ability flag 4)</nowiki>}}
  0018cbe4: 10400005 beq r2,r0,0x0018cbfc     Branch if not using Absorb Used Mp
+
  0018cbd0: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
  0018cbe8: 30820008 andi r2,r4,0x0008     r2 = 8
+
  0018cbd4: 340401b5 ori r4,r0,0x01b5                     |{{f/std|<nowiki>r4 = 0x1b5 (Counterflood ID)</nowiki>}}
 
+
  0018cbec: 0c0633dd jal 0x0018cf74     Faith up/ absorb mp usability
+
  0018cbd8: 9084008d lbu r4,0x008d(r4)               |{{f/load|<nowiki>r3 = Target unit 3rd set of Reaction abilities</nowiki>}}
  0018cbf0: 340401b6 ori r4,r0,0x01b6     Hit % for Attack on Self
+
  0018cbdc: 00000000 nop                             |
  0018cbf4: 08063309 j 0x0018cc24        
+
  0018cbe0: 30820080 andi r2,r4,0x0080               |{{f/std|<nowiki>r2 =0x80 if Targeted Unit uses Absorb Used MP</nowiki>}}
  0018cbf8: 00000000 nop          
+
  0018cbe4: 10400005 beq r2,r0,0x0018cbfc             {{f/Cond|if Targeted Unit uses Absorb Used MP}}
 
+
  0018cbe8: 30820008 andi r2,r4,0x0008               |{{f/std|<nowiki>r2 = 0x08 if Targeted Unit uses Counter</nowiki>}}
  0018cbfc: 10400003 beq r2,r0,0x0018cc0c     Branch if not using Counter
+
  0018cbec: 0c0633dd jal 0x0018cf74                       |{{f/jal|Face_Up_and_Absorb_Used_MP_usability|Face_Up_and_Absorb_Used_MP_usability}} r4 is stored as reaction ID if succesfull
  0018cc00: 340401ba ori r4,r0,0x01ba    
+
  0018cbf0: 340401b6 ori r4,r0,0x01b6                     |{{f/std|<nowiki>r4 = 0x1b6 (Absord used MP ID)</nowiki>}}
  0018cc04: 08063307 j 0x0018cc1c        
+
  0018cbf4: 08063309 j 0x0018cc24                         {{f/jump|Jump to }} {{f/loc|END}}
  0018cc08: 34050010 ori r5,r0,0x0010    
+
  0018cbf8: 00000000 nop                                 |
 
+
  0018cbfc: 10400003 beq r2,r0,0x0018cc0c             {{f/Cond|if Targeted Unit uses Counter}}
  0018cc0c: 30620004 andi r2,r3,0x0004    
+
  0018cc00: 340401ba ori r4,r0,0x01ba                     |{{f/std|<nowiki>r4 = 0x1ba (Couter Ability ID)</nowiki>}}
  0018cc10: 10400004 beq r2,r0,0x0018cc24     Branch if not using Counter Magic?!
+
  0018cc04: 08063307 j 0x0018cc1c                         {{f/jump|Jump to }} {{f/loc|Resolution}}
  0018cc14: 340401b3 ori r4,r0,0x01b3
+
  0018cc08: 34050010 ori r5,r0,0x0010                     |{{f/std|<nowiki>r5 = 0x10 (Ability flag "blade grasp")</nowiki>}}
 
+
  0018cc18: 34050040 ori r5,r0,0x0040     Prepare for Counter Magic Flag Check
+
  0018cc0c: 30620004 andi r2,r3,0x0004               |{{f/std|<nowiki>r2 = 0x04 if Targeted Unit uses Counter Magic ? Strange - Counter Magic is referenced in Reaction set 2 (wiki)</nowiki>}}
  0018cc1c: 0c063381 jal 0x0018ce04     [[Counter, Counter Tackle, Counter Flood, Brave Up, Dragon Spirit, Sunken State, and Caution Usability usability|Counter abilities usability]]
+
  0018cc10: 10400004 beq r2,r0,0x0018cc24             {{f/Cond|If Targeted Unit uses Counter Magic}} /Else branch to END
  0018cc20: 00000000 nop
+
  0018cc14: 340401b3 ori r4,r0,0x01b3                     |{{f/std|<nowiki>r4 = 0x1b3 (Counter Magic ID)</nowiki>}}
  0018cc24: 8fbf0010 lw r31,0x0010(r29)
+
  0018cc18: 34050040 ori r5,r0,0x0040                     |{{f/std|<nowiki>r5 = 0x40 (Counter Magic flag in Ability data)</nowiki>}}
  0018cc28: 27bd0018 addiu r29,r29,0x0018
+
                                          '''Resolution'''
  0018cc2c: 03e00008 jr r31
+
  0018cc1c: 0c063381 jal 0x0018ce04                   |{{f/jal|Counter,_Counter_Tackle,_Counter_Flood,_Brave_Up,_Dragon_Spirit,_Sunken_State,_and_Caution_Usability_usability|Counter,_Counter_Tackle,_Counter_Flood,_Brave_Up,_Dragon_Spirit,_Sunken_State,_and_Caution_Usability}}
  0018cc30: 00000000 nop
+
  0018cc20: 00000000 nop                             |r5 is checked in Used Ability flags - r4 is stored as reaction ID if succesfull
 +
  0018cc24: 8fbf0010 lw r31,0x0010(r29)               |
 +
  0018cc28: 27bd0018 addiu r29,r29,0x0018             |
 +
  0018cc2c: 03e00008 jr r31                           |
 +
  0018cc30: 00000000 nop                             |
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018bef4: [[Attack_Finalisation_%26_Reaction_Flagging]]

Latest revision as of 13:01, 25 November 2022

Parameters : None

If Used Formula ( 0x801938e5 ) = 0x07 (Heal weapon), skip the routine

Else if unit can react, check Targeted unit reaction set looking for several abilities.
If one is found, roll it and exit (one roll only)
If succesfull, Unit 0x19a and 0x1b2 holds new values.
----------------------------------------------------------------------------------------------
0018cb00: 27bdffe8 addiu r29,r29,-0x0018    |
0018cb04: 3c038019 lui r3,0x8019            |
0018cb08: 906338e5 lbu r3,0x38e5(r3)        |r3 = Ability Formula
0018cb0c: 34020007 ori r2,r0,0x0007         |r2 = 0x07
0018cb10: 10620044 beq r3,r2,0x0018cc24     #If not using Formula 0x07 (Heal weapon) /Else branch to  END 
0018cb14: afbf0010 sw r31,0x0010(r29)           |
0018cb18: 3c048019 lui r4,0x8019                |
0018cb1c: 8c842d98 lw r4,0x2d98(r4)             |r4 = Targeted Unit's data pointer
0018cb20: 0c063248 jal 0x0018c920               |-->Check_if_unit_can_react_1  returns r2 = 0x00 if Unit can react
0018cb24: 00000000 nop                          |
0018cb28: 1440003e bne r2,r0,0x0018cc24         #If Targeted Unit can react /Else branch to  END 
0018cb2c: 00000000 nop                              | 
0018cb30: 3c048019 lui r4,0x8019                    |
0018cb34: 8c842d98 lw r4,0x2d98(r4)                 |r4 = Targeted Unit's data pointer
0018cb38: 00000000 nop                              |
0018cb3c: 9083008b lbu r3,0x008b(r4)                |r3 = Target unit 1st set of Reaction abilities
0018cb40: 00000000 nop                              |
0018cb44: 30620010 andi r2,r3,0x0010                |r2 = 0x10 if Target unit uses sunken state
0018cb48: 10400003 beq r2,r0,0x0018cb58             #If Targeted Unit uses Sunken State
0018cb4c: 34050010 ori r5,r0,0x0010                 |r5 = 0x10 (Ability flag "blade grasp")
0018cb50: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cb54: 340401a9 ori r4,r0,0x01a9                     |r4 = 0x1a9 (sunken state ID)

0018cb58: 30620008 andi r2,r3,0x0008                |r2 = 0x08 If Unit uses caution
0018cb5c: 10400003 beq r2,r0,0x0018cb6c             #If Targeted Unit uses Caution
0018cb60: 30620004 andi r2,r3,0x0004                |r2 = 0x04 If Targeted Unit uses Dragon spirit
0018cb64: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cb68: 340401aa ori r4,r0,0x01aa                     |r4 = 0x1aa (Caution ID)

0018cb6c: 10400003 beq r2,r0,0x0018cb7c             #If Targeted Unit uses dragon spirit
0018cb70: 34050010 ori r5,r0,0x0010                     |r5 = 0x10
0018cb74: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cb78: 340401ab ori r4,r0,0x01ab                     |r4 = 0x1ab (Dragon spirit ID)

0018cb7c: 30620001 andi r2,r3,0x0001                |r2 = 0x01 if Targeted Unit uses Brave Up
0018cb80: 10400003 beq r2,r0,0x0018cb90             #If Targeted Unit uses Brave Up
0018cb84: 00000000 nop                                  |
0018cb88: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cb8c: 340401ad ori r4,r0,0x01ad                     |r4 = 0x1ad (Brave Up ID)

0018cb90: 9083008c lbu r3,0x008c(r4)                |r3 = Target unit 2nd set of Reaction abilities
0018cb94: 00000000 nop                              |
0018cb98: 30620080 andi r2,r3,0x0080                |r2 = 0x80 if Targeted Unit uses Face Up
0018cb9c: 10400005 beq r2,r0,0x0018cbb4             #If Targeted unit uses Face Up
0018cba0: 30620002 andi r2,r3,0x0002                |r2 = 0x02 if Targeted Unit uses Counter Tackle
0018cba4: 0c0633dd jal 0x0018cf74                       |-->Face_Up_and_Absorb_Used_MP_usability r4 is stored as reaction ID if succesfull
0018cba8: 340401ae ori r4,r0,0x01ae                     |r4 = 0x1ae (Face Up ID)
0018cbac: 08063309 j 0x0018cc24                         >>Jump to END
0018cbb0: 00000000 nop                                  |

0018cbb4: 10400003 beq r2,r0,0x0018cbc4             #if Targeted Unit uses Counter Tackle
0018cbb8: 34050010 ori r5,r0,0x0010                     |r5 = 0x10
0018cbbc: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cbc0: 340401b4 ori r4,r0,0x01b4                     |r4 = 0x1b4 (Counter Tackle ID)

0018cbc4: 30620001 andi r2,r3,0x0001                |r2 = 0x01 if Targeted Unit uses Counter Flood
0018cbc8: 10400003 beq r2,r0,0x0018cbd8             #If Targeted Unit uses Counter Flood
0018cbcc: 34050080 ori r5,r0,0x0080                 |r5 = 0x80 (Counter floodable Ability flag 4)
0018cbd0: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cbd4: 340401b5 ori r4,r0,0x01b5                     |r4 = 0x1b5 (Counterflood ID)

0018cbd8: 9084008d lbu r4,0x008d(r4)                |r3 = Target unit 3rd set of Reaction abilities
0018cbdc: 00000000 nop                              |
0018cbe0: 30820080 andi r2,r4,0x0080                |r2 =0x80 if Targeted Unit uses Absorb Used MP
0018cbe4: 10400005 beq r2,r0,0x0018cbfc             #if Targeted Unit uses Absorb Used MP
0018cbe8: 30820008 andi r2,r4,0x0008                |r2 = 0x08 if Targeted Unit uses Counter
0018cbec: 0c0633dd jal 0x0018cf74                       |-->Face_Up_and_Absorb_Used_MP_usability r4 is stored as reaction ID if succesfull
0018cbf0: 340401b6 ori r4,r0,0x01b6                     |r4 = 0x1b6 (Absord used MP ID)
0018cbf4: 08063309 j 0x0018cc24                         >>Jump to  END
0018cbf8: 00000000 nop                                  |
0018cbfc: 10400003 beq r2,r0,0x0018cc0c             #if Targeted Unit uses Counter
0018cc00: 340401ba ori r4,r0,0x01ba                     |r4 = 0x1ba (Couter Ability ID)
0018cc04: 08063307 j 0x0018cc1c                         >>Jump to  Resolution
0018cc08: 34050010 ori r5,r0,0x0010                     |r5 = 0x10 (Ability flag "blade grasp")

0018cc0c: 30620004 andi r2,r3,0x0004                |r2 = 0x04 if Targeted Unit uses Counter Magic ? Strange - Counter Magic is referenced in Reaction set 2 (wiki)
0018cc10: 10400004 beq r2,r0,0x0018cc24             #If Targeted Unit uses Counter Magic /Else branch to END
0018cc14: 340401b3 ori r4,r0,0x01b3                     |r4 = 0x1b3 (Counter Magic ID)
0018cc18: 34050040 ori r5,r0,0x0040                     |r5 = 0x40 (Counter Magic flag in Ability data)
                                         Resolution
0018cc1c: 0c063381 jal 0x0018ce04                   |-->Counter,_Counter_Tackle,_Counter_Flood,_Brave_Up,_Dragon_Spirit,_Sunken_State,_and_Caution_Usability
0018cc20: 00000000 nop                              |r5 is checked in Used Ability flags - r4 is stored as reaction ID if succesfull
0018cc24: 8fbf0010 lw r31,0x0010(r29)               |
0018cc28: 27bd0018 addiu r29,r29,0x0018             |
0018cc2c: 03e00008 jr r31                           |
0018cc30: 00000000 nop                              |

Return location

Battle.bin
0018bef4: Attack_Finalisation_&_Reaction_Flagging