'Reflect', Blade Grasp, and Arrow Guard

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Reflect, Blade Grasp, and Arrow Guard check? - Checks for Reflect status, not the ability.
- I've mentioned this before, but the reflect reaction **is** the code for the reflect ability, 100%. in other words make sure to preserve it as much as possible. -- Talcall

0018c9e4: 3c028019 lui r2,0x8019            |
0018c9e8: 8c42f5f0 lw r2,-0x0a10(r2)        |r2 = Load type of action
0018c9ec: 27bdffe8 addiu r29,r29,0xffe8     |
0018c9f0: 1440003f bne r2,r0,0x0018caf0     #If r2 = 0x00 (not a reaction?/not reactable ?) /Else branch to End 
0018c9f4: afbf0010 sw r31,0x0010(r29)            |
0018c9f8: 3c038019 lui r3,0x8019                 |
0018c9fc: 906338e5 lbu r3,0x38e5(r3)             |r3 =  current ability formula 0x801938e5
0018ca00: 34020007 ori r2,r0,0x0007              |r2 = 7
0018ca04: 1062003a beq r3,r2,0x0018caf0          #if ability formula is not Heal_(Weapon)  /Else branch to End (No reaction if healed by a weapon ?)
0018ca08: 00000000 nop                               |
0018ca0c: 3c048019 lui r4,0x8019                     |
0018ca10: 8c842d98 lw r4,0x2d98(r4)                  |r4 = Target data pointer
0018ca14: 0c063268 jal 0x0018c9a0                    |-->Reaction check? /return r2 = 0x00, 0x01 or 0x02 see below
0018ca18: 00000000 nop                               |
0018ca1c: 34030001 ori r3,r0,0x0001                  |
0018ca20: 10430033 beq r2,r3,0x0018caf0              #if r2 <> 0x01  /Else branch to End r2 = 0x01 if 801938c6 <> 0x00 and 801938c8 = 0x00
0018ca24: 00000000 nop                               |
0018ca28: 3c028019 lui r2,0x8019                     | if here either r2 = 0x00 (Target 0x19a = 0x00) or r2 = 0x02 (target 0x19a <> 0x00)
0018ca2c: 8c422d98 lw r2,0x2d98(r2)                  |r2 = Target Data pointer
0018ca30: 00000000 nop                               |
0018ca34: 9042005c lbu r2,0x005c(r2)                 |r2 = Target 5th set of current Status
0018ca38: 00000000 nop                               |
0018ca3c: 30420002 andi r2,r2,0x0002                 |r2 = 0x02
0018ca40: 10400008 beq r2,r0,0x0018ca64              #If unit has reflect /Else branch after reflect section
0018ca44: 00000000 nop                                   | 
0018ca48: 3c028019 lui r2,0x8019                         |
0018ca4c: 944238c6 lhu r2,0x38c6(r2)                     |r2 = current ability reaction ID
0018ca50: 00000000 nop                                   |
0018ca54: 14400003 bne r2,r0,0x0018ca64                  #if  current ability reaction ID = 0x00 /Else branch after reflect section
0018ca58: 00000000 nop                                       | 
0018ca5c: 0c0633fa jal 0x0018cfe8                            |-->Reflect Reaction? Causes action to miss, store used ability ID in Target last attack recieved  
0018ca60: 00000000 nop                                       |                     and reflect ID in Target reaction ID (current action 0x0e)
0018ca64: 3c028019 lui r2,0x8019                     | 
0018ca68: 8c422d90 lw r2,0x2d90(r2)                  |r2 = Target Current Action Data pointer
0018ca6c: 00000000 nop                               |
0018ca70: 8442000e lh r2,0x000e(r2)                  |r2 = Target current action reaction ID  (same as target 0x19a)
0018ca74: 00000000 nop                               |
0018ca78: 1440001d bne r2,r0,0x0018caf0              #if Target current action reaction ID  = 0x00 /Else branch to end - Quit routine if reflect worked
0018ca7c: 00000000 nop                                   |
0018ca80: 3c048019 lui r4,0x8019                         |
0018ca84: 8c842d98 lw r4,0x2d98(r4)                      |r4 = Target data pointer
0018ca88: 0c06325a jal 0x0018c968                        |-->Check if unit can react%3F Check some status and 0x8018F5F0 - returns r2 = 0x01 not reacting, else 0x00
0018ca8c: 00000000 nop                                   |
0018ca90: 14400017 bne r2,r0,0x0018caf0                  #If unit can react /Else branch to end
0018ca94: 00000000 nop                                       |
0018ca98: 3c048019 lui r4,0x8019                             |
0018ca9c: 8c842d98 lw r4,0x2d98(r4)                          |r4 = Target data pointer
0018caa0: 0c0604c3 jal 0x0018130c                            |-->Weapon Guard Usability  r2 = 0x00 if unit can evade attacks  (check don't act, being ridden, depht >2 (and unit underwater - not riding))
0018caa4: 00000000 nop                                       |
0018caa8: 14400011 bne r2,r0,0x0018caf0                      #If Target can evade attacks /Else branch to end
0018caac: 00000000 nop                                           |
0018cab0: 3c028019 lui r2,0x8019                                 |
0018cab4: 8c422d98 lw r2,0x2d98(r2)                              |r2 = Target data pointer
0018cab8: 00000000 nop                                           |
0018cabc: 9043008e lbu r3,0x008e(r2)                             |r3 = Target  4th set of reaction skills
0018cac0: 00000000 nop                                           |
0018cac4: 30620004 andi r2,r3,0x0004                             |r2 = 0x04 if Target use blade grasp
0018cac8: 10400005 beq r2,r0,0x0018cae0                          #If Target use blade grasp /Else brach to arrow guard section
0018cacc: 30620002 andi r2,r3,0x0002                             |r2 = 0x02 if Target use arrow guard
0018cad0: 0c063414 jal 0x0018d050                                    |-->Blade Grasp Usability If triggered action is set to miss, 
0018cad4: 00000000 nop                                               |                         set evasion type and blade grasp ID is stored in Target reaction ID (current action 0x0e)
0018cad8: 080632bc j 0x0018caf0                                      >>Jump to end
0018cadc: 00000000 nop                                               |
0018cae0: 10400003 beq r2,r0,0x0018caf0                          #If target use arrow guard /Else branch to end
0018cae4: 00000000 nop                                               |
0018cae8: 0c06343a jal 0x0018d0e8                                    |-->Arrow Guard Usability If triggered action is set to miss,  
0018caec: 00000000 nop                                               |                         set evasion type and Arrow guard ID is stored in  Target reaction ID (current action 0x0e)                            
0018caf0: 8fbf0010 lw r31,0x0010(r29)                                
0018caf4: 27bd0018 addiu r29,r29,0x0018                              
0018caf8: 03e00008 jr r31                                            
0018cafc: 00000000 nop                        

Return locations

0018b940: Pre_Formula_Setup_(FDC)