Chance to React

From Final Fantasy Hacktics Wiki
Revision as of 21:10, 27 November 2021 by Orkney (talk | contribs) (Notes, formatting, return links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Chance to react - (Unit brave against 100)
----------------------------------------------------
r4 = Unit data pointer
Return r2 = 0x00 if unit is reacting, 0x01 if not
----------------------------------------------------
0018d384: 3c028019 lui r2,0x8019            |
0018d388: 8c42f5fc lw r2,-0x0a04(r2)        |r2 = Action state
0018d38c: 27bdffe8 addiu r29,r29,0xffe8     |
0018d390: 14400006 bne r2,r0,0x0018d3ac     #if action is executed /Branch  !XX near end setting r2 as 0x00 X!!
0018d394: afbf0010 sw r31,0x0010(r29)       |
0018d398: 90850024 lbu r5,0x0024(r4)             |r5 = Unit current brave
0018d39c: 0c017833 jal 0x0005e0cc                |-->Check if Random is greater/equal to Chance returns r2 = 0x01 if random is >= Unit brave (no reaction)
0018d3a0: 34040064 ori r4,r0,0x0064              |r4 = 100 (set random between 0x00 and 0x64)
0018d3a4: 080634ec j 0x0018d3b0                  >>jump to end
0018d3a8: 00000000 nop                           |
0018d3ac: 00001021 addu r2,r0,r0            #Else r2 = 0x00 Force success if action state = AI processing or projecting action result
0018d3b0: 8fbf0010 lw r31,0x0010(r29)       |
0018d3b4: 27bd0018 addiu r29,r29,0x0018     |
0018d3b8: 03e00008 jr r31                   
0018d3bc: 00000000 nop                      


Return locations

0017e080: Big..._Contains_Hamedo_check
00188358: Finger_Guard
00188428: Catch
0018cfac: Face_Up_and_Absorb_Used_MP_usability
0018cec0: PA_Save,_MA_Save,_Speed_Save,_Regenerator,_Auto_Potion,_Gilgame_Heart_usability
0018ce4c: Counter,_Counter_Tackle,_Counter_Flood,_Brave_Up,_Dragon_Spirit,_Sunken_State,_and_Caution_Usability_usability
0018cf48: Critical_Quick,_HP_Restore,_MP_Restore,_Meatbone_Slash_usability
0018d08c: Blade_Grasp_Usability
0018d15c: Arrow_Guard_Usability
0018d1fc: MP_Switch_Usability
0018d2e8: Distribute_Usability
0018d34c: Damage_Split_Usability