Switch Ability to default Attack

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
No Parameters - Returns Nothing

Set Attacker Current Action Skillset to 0x01 (Attack) and used Ability ID to 0x00 (Attack)
Call Pre Formula Setup to perform a Normal Attack
Restore previous Strike counter (0x801938c3), used Skillset and Ability after performing the attack
Clear 0x801938c8 and 0x801938c6 (This attack will never trigger a reaction ?)
0018ad58: 3c038019 lui r3,0x8019            |
0018ad5c: 8c632d94 lw r3,0x2d94(r3)         |r3 = Attacker data pointer
0018ad60: 27bdffd8 addiu r29,r29,-0x0028    |
0018ad64: afb10014 sw r17,0x0014(r29)       |
0018ad68: 3c118019 lui r17,0x8019           |
0018ad6c: 263138c3 addiu r17,r17,0x38c3     |r17 = Current Ability strike counter                  0x801938c3  / 801938c3
0018ad70: afbf0020 sw r31,0x0020(r29)       |
0018ad74: afb3001c sw r19,0x001c(r29)       |
0018ad78: afb20018 sw r18,0x0018(r29)       |
0018ad7c: afb00010 sw r16,0x0010(r29)       |
0018ad80: 92320000 lbu r18,0x0000(r17)      |r18 = Strike counter
0018ad84: 9073016f lbu r19,0x016f(r3)       |r19 = Attacker current action used skillset
0018ad88: 34020001 ori r2,r0,0x0001         |r2 = 0x01
0018ad8c: a062016f sb r2,0x016f(r3)         |Set Attacker used skillset to [Attack] (0x01
0018ad90: 3c048019 lui r4,0x8019            |
0018ad94: 8c842d94 lw r4,0x2d94(r4)         |r4 = Attacker data pointer
0018ad98: 94700170 lhu r16,0x0170(r3)       |r16 = Attacker current action used Ability
0018ad9c: a4800170 sh r0,0x0170(r4)         |Store used ability = attack
0018ada0: 3c058019 lui r5,0x8019            |
0018ada4: 90a538c1 lbu r5,0x38c1(r5)        |r5 = Current Ability Target ID               0x801938c1  / 801938c1
0018ada8: 0c062cd3 jal 0x0018b34c           |-->Pre_Formula_Setup_(FDC) Reload Pre formula set up to play a normal attack
0018adac: 2484016e addiu r4,r4,0x016e       |r4 = Attacker current action data pointer
0018adb0: 3c028019 lui r2,0x8019            |
0018adb4: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker data pointer
0018adb8: a2320000 sb r18,0x0000(r17)       |Restore strike counter
0018adbc: a4500170 sh r16,0x0170(r2)        |Restore used Ability ID
0018adc0: a053016f sb r19,0x016f(r2)        |Restore used Skillset
0018adc4: 3c018019 lui r1,0x8019            |
0018adc8: a42038c8 sh r0,0x38c8(r1)         |Clear post-action byte  0x801938c8 / 801938c8
0018adcc: 3c018019 lui r1,0x8019            |
0018add0: a42038c6 sh r0,0x38c6(r1)         |Clear reaction ID  0x801938c6 / 801938c6
0018add4: 8fbf0020 lw r31,0x0020(r29)       
0018add8: 8fb3001c lw r19,0x001c(r29)       
0018addc: 8fb20018 lw r18,0x0018(r29)       
0018ade0: 8fb10014 lw r17,0x0014(r29)       
0018ade4: 8fb00010 lw r16,0x0010(r29)       
0018ade8: 27bd0028 addiu r29,r29,0x0028     
0018adec: 03e00008 jr r31                   
0018adf0: 00000000 nop                      

Return location

00189714: 25_Equipped:_Break_Hit_(PA+WP+X)%