Difference between revisions of "Switch Ability to default Attack"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Link to pre formula set up)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
No Parameters - Returns Nothing
 
   
 
   
  0018ad58: 3c038019 lui r3,0x8019
+
Set Attacker Current Action Skillset to 0x01 (Attack) and used Ability ID to 0x00 (Attack)
  0018ad5c: 8c632d94 lw r3,0x2d94(r3) load attacker stats
+
Call [[Pre_Formula_Setup_(FDC)|<span style="color:blue">Pre Formula Setup</span>]] to perform a Normal Attack
  0018ad60: 27bdffd8 addiu r29,r29,0xffd8
+
Restore previous Strike counter (0x801938c3), used Skillset and Ability after performing the attack
  0018ad64: afb10014 sw r17,0x0014(r29)
+
Clear 0x801938c8 and 0x801938c6 (This attack will never trigger a reaction ?)
  0018ad68: 3c118019 lui r17,0x8019
+
------------------------------------------------------------------------------------------------------
  0018ad6c: 263138c3 addiu r17,r17,0x38c3 weapon hand address
+
  0018ad58: 3c038019 lui r3,0x8019           |
  0018ad70: afbf0020 sw r31,0x0020(r29)
+
  0018ad5c: 8c632d94 lw r3,0x2d94(r3)         |{{f/adr|<nowiki>r3 = Attacker data pointer</nowiki>}}
  0018ad74: afb3001c sw r19,0x001c(r29)
+
  0018ad60: 27bdffd8 addiu r29,r29,-0x0028    |
  0018ad78: afb20018 sw r18,0x0018(r29)
+
  0018ad64: afb10014 sw r17,0x0014(r29)       |
  0018ad7c: afb00010 sw r16,0x0010(r29)
+
  0018ad68: 3c118019 lui r17,0x8019           |
  0018ad80: 92320000 lbu r18,0x0000(r17) load weapon hand
+
  0018ad6c: 263138c3 addiu r17,r17,0x38c3     |{{f/std|<nowiki>r17 = Current Ability strike counter </nowiki>}} {{f/std|                0x801938c3  / 801938c3}}
  0018ad84: 9073016f lbu r19,0x016f(r3) load skillset of attack used
+
  0018ad70: afbf0020 sw r31,0x0020(r29)       |
  0018ad88: 34020001 ori r2,r0,0x0001
+
  0018ad74: afb3001c sw r19,0x001c(r29)       |
  0018ad8c: a062016f sb r2,0x016f(r3) store skillset = attack
+
  0018ad78: afb20018 sw r18,0x0018(r29)       |
  0018ad90: 3c048019 lui r4,0x8019
+
  0018ad7c: afb00010 sw r16,0x0010(r29)       |
  0018ad94: 8c842d94 lw r4,0x2d94(r4)
+
  0018ad80: 92320000 lbu r18,0x0000(r17)     |{{f/load|<nowiki>r18 = Strike counter</nowiki>}}
  0018ad98: 94700170 lhu r16,0x0170(r3) load ability used
+
  0018ad84: 9073016f lbu r19,0x016f(r3)       |{{f/load|<nowiki>r19 = Attacker current action used skillset</nowiki>}}
  0018ad9c: a4800170 sh r0,0x0170(r4) store ability = attack
+
  0018ad88: 34020001 ori r2,r0,0x0001         |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
  0018ada0: 3c058019 lui r5,0x8019
+
  0018ad8c: a062016f sb r2,0x016f(r3)         |{{f/store|Set Attacker used skillset to [Attack] (0x01}}
  0018ada4: 90a538c1 lbu r5,0x38c1(r5) load target ID
+
  0018ad90: 3c048019 lui r4,0x8019           |
  0018ada8: 0c062cd3 jal 0x0018b34c [[Pre_Formula_Setup_(FDC)]]
+
  0018ad94: 8c842d94 lw r4,0x2d94(r4)         |{{f/adr|<nowiki>r4 = Attacker data pointer</nowiki>}}
  0018adac: 2484016e addiu r4,r4,0x016e
+
  0018ad98: 94700170 lhu r16,0x0170(r3)       |{{f/load|<nowiki>r16 = Attacker current action used Ability</nowiki>}}
  0018adb0: 3c028019 lui r2,0x8019
+
  0018ad9c: a4800170 sh r0,0x0170(r4)         |{{f/store|<nowiki>Store used ability = attack</nowiki>}}
  0018adb4: 8c422d94 lw r2,0x2d94(r2) r2 = attacker stats
+
  0018ada0: 3c058019 lui r5,0x8019           |
  0018adb8: a2320000 sb r18,0x0000(r17) store weapon hand
+
  0018ada4: 90a538c1 lbu r5,0x38c1(r5)       |{{f/load|<nowiki>r5 = Current Ability Target ID</nowiki>}} {{f/std|              0x801938c1  / 801938c1}}
  0018adbc: a4500170 sh r16,0x0170(r2) store ability ID
+
  0018ada8: 0c062cd3 jal 0x0018b34c           |{{f/jal|Pre_Formula_Setup_(FDC)|Pre_Formula_Setup_(FDC)}} Reload Pre formula set up to play a normal attack
  0018adc0: a053016f sb r19,0x016f(r2) store skillset ID
+
  0018adac: 2484016e addiu r4,r4,0x016e       |{{f/adr|<nowiki>r4 = Attacker current action data pointer</nowiki>}}
  0018adc4: 3c018019 lui r1,0x8019
+
  0018adb0: 3c028019 lui r2,0x8019           |
  0018adc8: a42038c8 sh r0,0x38c8(r1) clear post-action byte
+
  0018adb4: 8c422d94 lw r2,0x2d94(r2)         |{{f/adr|<nowiki>r2 = Attacker data pointer</nowiki>}}
  0018adcc: 3c018019 lui r1,0x8019
+
  0018adb8: a2320000 sb r18,0x0000(r17)       |{{f/store|Restore strike counter}}
  0018add0: a42038c6 sh r0,0x38c6(r1) Clear reaction ID
+
  0018adbc: a4500170 sh r16,0x0170(r2)       |{{f/store|Restore used Ability ID}}
  0018add4: 8fbf0020 lw r31,0x0020(r29)
+
  0018adc0: a053016f sb r19,0x016f(r2)       |{{f/store|Restore used Skillset}}
  0018add8: 8fb3001c lw r19,0x001c(r29)
+
  0018adc4: 3c018019 lui r1,0x8019           |
  0018addc: 8fb20018 lw r18,0x0018(r29)
+
  0018adc8: a42038c8 sh r0,0x38c8(r1)         |{{f/store|Clear post-action byte}} {{f/std| 0x801938c8 / 801938c8}}
  0018ade0: 8fb10014 lw r17,0x0014(r29)
+
  0018adcc: 3c018019 lui r1,0x8019           |
  0018ade4: 8fb00010 lw r16,0x0010(r29)
+
  0018add0: a42038c6 sh r0,0x38c6(r1)         |{{f/store|Clear reaction ID}} {{f/std| 0x801938c6 / 801938c6}}
  0018ade8: 27bd0028 addiu r29,r29,0x0028
+
  0018add4: 8fbf0020 lw r31,0x0020(r29)      
  0018adec: 03e00008 jr r31
+
  0018add8: 8fb3001c lw r19,0x001c(r29)      
  0018adf0: 00000000 nop
+
  0018addc: 8fb20018 lw r18,0x0018(r29)      
</font>
+
  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 ===
 +
'''Battle.bin'''
 +
00189714: [[25_Equipped:_Break_Hit_(PA%2BWP%2BX)%25]]

Latest revision as of 19:24, 20 April 2022

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

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