See if ability should be used based on CT

From Final Fantasy Hacktics Wiki
Revision as of 20:36, 18 March 2024 by Orkney (talk | contribs)
Jump to navigation Jump to search
See if ability should be used based on CT 
 
0019f0d8: 27bdffe0 addiu r29,r29,0xffe0
0019f0dc: afb00010 sw r16,0x0010(r29)
0019f0e0: 3c10801a lui r16,0x801a
0019f0e4: 9210f3c5 lbu r16,-0x0c3b(r16)          load CT
0019f0e8: afb10014 sw r17,0x0014(r29)
0019f0ec: 00808821 addu r17,r4,r0
0019f0f0: 12000013 beq r16,r0,0x0019f140         branch if 00
0019f0f4: afbf0018 sw r31,0x0018(r29)
0019f0f8: 001120c0 sll r4,r17,0x03
0019f0fc: 00912023 subu r4,r4,r17
0019f100: 00042180 sll r4,r4,0x06
0019f104: 3c028019 lui r2,0x8019
0019f108: 244208cc addiu r2,r2,0x08cc         
0019f10c: 0c0666e6 jal 0x00199b98            Calculate Clockticks Until Unit Acts
0019f110: 00822021 addu r4,r4,r2                 r4 = unit data
0019f114: 3c037fff lui r3,0x7fff
0019f118: 3463ffff ori r3,r3,0xffff
0019f11c: 10430008 beq r2,r3,0x0019f140          branch if = 0x7fffffff
0019f120: 0202102a slt r2,r16,r2                 set if CT < CT unitl unit acts
0019f124: 14400007 bne r2,r0,0x0019f144          branch if so
0019f128: 00001021 addu r2,r0,r0
0019f12c: 02002021 addu r4,r16,r0
0019f130: 0c067c57 jal 0x0019f15c             0019f15c - 0019f254
0019f134: 02202821 addu r5,r17,r0
0019f138: 08067c51 j 0x0019f144
0019f13c: 00000000 nop
0019f140: 00001021 addu r2,r0,r0
0019f144: 8fbf0018 lw r31,0x0018(r29)
0019f148: 8fb10014 lw r17,0x0014(r29)
0019f14c: 8fb00010 lw r16,0x0010(r29)
0019f150: 27bd0020 addiu r29,r29,0x0020
0019f154: 03e00008 jr r31
0019f158: 00000000 nop

Returns Location

0019b1a0: AI_ability_use_control_routine
0019b208: AI_ability_use_control_routine
0019b878: AI_Targeting_Matrix_Analysis_(0019b7b8)
0019b930: AI_Targeting_Matrix_Analysis_(0019b7b8)
0019f08c: Set_unit_untargetable_based_on_19f0d8_routine