Check if unit can react 1
Jump to navigation
Jump to search
Parameters : r4 = Unit data pointer Returns : r2 = 0x00 if unit can react r2 = 0x01 or 0x02 depending of what is preventing unit reaction Checks three routines for status, depth, action state, 801938c8, 801938c6 , Unit 0x19a etc... ------------------------------------------------------------------------------------------------- 0018c920: 27bdffe8 addiu r29,r29,-0x0018 | 0018c924: afb00010 sw r16,0x0010(r29) | 0018c928: afbf0014 sw r31,0x0014(r29) | 0018c92c: 0c06325a jal 0x0018c968 |-->Check_if_unit_can_react Return r2 = 0x01 if not reacting (based on status or 0x8018f5f0 = 0x01 - not reacting to a reaction) 0018c930: 00808021 addu r16,r4,r0 |r16 = Unit data pointer 0018c934: 14400007 bne r2,r0,0x0018c954 #If Unit can react /Else branch to END r2 = 0x01 0018c938: 00000000 nop | 0018c93c: 0c063268 jal 0x0018c9a0 |-->Reaction_check%3F 0018c940: 02002021 addu r4,r16,r0 |r4 =Unit's data pointer 0018c944: 14400003 bne r2,r0,0x0018c954 #If Target 0x19a = 0x00 (no reaction ? ) /Else branch to END r2 = 0x01 or 0x02 0018c948: 00000000 nop | 0018c94c: 0c0604c3 jal 0x0018130c |-->Weapon_Guard_Usability Retunrs r2 = 0x00 if Unit can act (status, depht etc) / r2 = 0x01 or 0x02 if not 0018c950: 02002021 addu r4,r16,r0 |r4 =Unit's data pointer 0018c954: 8fbf0014 lw r31,0x0014(r29) END - returns r2 0018c958: 8fb00010 lw r16,0x0010(r29) 0018c95c: 27bd0018 addiu r29,r29,0x0018 0018c960: 03e00008 jr r31 0018c964: 00000000 nop
Return locations
Battle.bin 00188310: Finger_Guard 001883c4: Catch 0018cb28: Sunken_State,_Caution,_Dragon_Spirit,_counters,_absorbs_usability 0018cc5c: MP_Switch,_Distribute,_and_Damage_Split_usability 0018cd00: PA_Save,_MA_Save,_Speed_Save_Regenerator,_HP_Restore,_MP_Restore,_Critical_Quick,_Meatbone_Slash,_Auto_Potion,_Gilgame_Heart_check