Face Up and Absorb Used MP usability

From Final Fantasy Hacktics Wiki
Revision as of 12:24, 13 March 2022 by Orkney (talk | contribs)
Jump to navigation Jump to search
Parameters : r4 = Target Reaction Ability ID (determined from Target reaction set)

If Used Ability do not cost MP ( 0x801938eb ) - skip routine (no reaction)
Test Unit Brave% as chance to react : skip the routine if failed

If Targeted Unit react :
- Store Reaction Ability ID in Target Data 0x19e (= current action 0x0e)
- Store Used Ability MP (from 0x801938eb) in Target data 0x1b2 (current action 0x26) - last attack received ?
--------------------------------------------------------------------------------------------
0018cf74: 27bdffe0 addiu r29,r29,-0x0020    |
0018cf78: afb10014 sw r17,0x0014(r29)       |
0018cf7c: 3c118019 lui r17,0x8019           |
0018cf80: 263138eb addiu r17,r17,0x38eb     |r17 = 0x801938eb (Current ability used MP)
0018cf84: afbf0018 sw r31,0x0018(r29)       |
0018cf88: afb00010 sw r16,0x0010(r29)       |
0018cf8c: 92220000 lbu r2,0x0000(r17)       |r2 = Current ability used MP
0018cf90: 00000000 nop                      |
0018cf94: 1040000e beq r2,r0,0x0018cfd0     #If Used MP > 0x00 /Else Branch to END
0018cf98: 00808021 addu r16,r4,r0           |r16 = Target Reaction Ability ID
0018cf9c: 3c048019 lui r4,0x8019                |
0018cfa0: 8c842d98 lw r4,0x2d98(r4)             |r4 = Targeted Unit data pointer
0018cfa4: 0c0634e1 jal 0x0018d384               |-->Chance to React  Returns r2 = 0x00 if Unit is reacting ( chances are Brave%)
0018cfa8: 00000000 nop                          |
0018cfac: 14400008 bne r2,r0,0x0018cfd0         #If Targeting Unit is going to react
0018cfb0: 00000000 nop                              |
0018cfb4: 3c038019 lui r3,0x8019                    | 
0018cfb8: 8c632d90 lw r3,0x2d90(r3)                 |r3 = Target Current Action Data pointer
0018cfbc: 00000000 nop                              |
0018cfc0: a470000e sh r16,0x000e(r3)                |Store Reaction Ability ID in Unit 0x19a
0018cfc4: 92220000 lbu r2,0x0000(r17)               |r2 = Current ability used MP
0018cfc8: 00000000 nop                              |
0018cfcc: a4620026 sh r2,0x0026(r3)                 |Target last attack received = Current Ability last used MP  Unit 0x1b2
0018cfd0: 8fbf0018 lw r31,0x0018(r29)       END
0018cfd4: 8fb10014 lw r17,0x0014(r29)               
0018cfd8: 8fb00010 lw r16,0x0010(r29)               
0018cfdc: 27bd0020 addiu r29,r29,0x0020             
0018cfe0: 03e00008 jr r31                           
0018cfe4: 00000000 nop

Return locations

Battle.bin
0018cbac: Sunken_State,_Caution,_Dragon_Spirit,_counters,_absorbs_usability
0018cbf4: Sunken_State,_Caution,_Dragon_Spirit,_counters,_absorbs_usability