Difference between revisions of "3F Hit (SP+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " [3f] 0018a02c: 27bdffe8 addiu r29,r29,0xffe8 0018a030: afbf0010 sw r31,0x0010(r29) 0018a034: 0c06178c jal 0x 00185e30 Loads SP and X 0018a038: 00000000 nop ...")
 
m
 
Line 1: Line 1:
 
  [3f]
 
  [3f]
  0018a02c: 27bdffe8 addiu r29,r29,0xffe8
+
  0018a02c: 27bdffe8 addiu r29,r29,-0x0018    |
  0018a030: afbf0010 sw r31,0x0010(r29)
+
  0018a030: afbf0010 sw r31,0x0010(r29)       |
  0018a034: 0c06178c jal 0x 00185e30      Loads SP and X
+
  0018a034: 0c06178c jal 0x00185e30          |{{f/jal|Store_Speed_and_X|Store_Speed_and_X}} Ability XA = Attacker's speed and Ability YA = used Ability X
  0018a038: 00000000 nop
+
  0018a038: 00000000 nop                     |
  0018a03c: 0c06217e jal 0x 001885f8      Zodiac Calculation
+
  0018a03c: 0c06217e jal 0x001885f8          |{{f/jal|Physical_XA_Modifying_Statuses/Support|Physical_XA_Modifying_Statuses/Support}} Modify Ability XA (Support Abilities, Status, Compatibility)
  0018a040: 00000000 nop
+
  0018a040: 00000000 nop                     |
  0018a044: 0c061967 jal 0x 0018659c      Loads SP + X as X
+
  0018a044: 0c061967 jal 0x0018659c          |{{f/jal|Set_XA_%2B_YA_for_Status_Formulas_(Stupid_section)|XA + YA for Accuracy}} XA+YA becomes TCA HP damage (YA is processed via compatibility)
  0018a048: 00000000 nop
+
  0018a048: 00000000 nop                     |
  0018a04c: 0c061d44 jal 0x 00187510      Total Accuracy Check
+
  0018a04c: 0c061d44 jal 0x00187510          |{{f/jal|Uses_HP_damage_as_Action_hit%25|Uses_HP_damage_as_Action_hit%}} HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
  0018a050: 00000000 nop
+
  0018a050: 00000000 nop                     |
  0018a054: 3c028019 lui r2,0x8019
+
  0018a054: 3c028019 lui r2,0x8019           |
  0018a058: 8c422d90 lw r2,0x2d90(r2)
+
  0018a058: 8c422d90 lw r2,0x2d90(r2)         |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  0018a05c: 00000000 nop
+
  0018a05c: 00000000 nop                     |
  0018a060: 90420000 lbu r2,0x0000(r2)
+
  0018a060: 90420000 lbu r2,0x0000(r2)       |{{f/load|<nowiki>r2 = TCA hit flag</nowiki>}}
  0018a064: 00000000 nop
+
  0018a064: 00000000 nop                     |
  0018a068: 10400003 beq r2,r0,0x 0018a078
+
  0018a068: 10400003 beq r2,r0,0x0018a078    {{f/Cond|If Attacks hits}}
  0018a06c: 00000000 nop
+
  0018a06c: 00000000 nop                         |
  0018a070: 0c061fc9 jal 0x 00187f24      Status Proc     
+
  0018a070: 0c061fc9 jal 0x00187f24              |{{f/jal|Apply_status_(to_action)|Apply_status_(to_action)}} Add Ability status - if successful update TCA Attack type
  0018a074: 00000000 nop
+
  0018a074: 00000000 nop                         |
  0018a078: 8fbf0010 lw r31,0x0010(r29)
+
  0018a078: 8fbf0010 lw r31,0x0010(r29)       END
  0018a07c: 27bd 0018 addiu r29,r29,0x 0018
+
  0018a07c: 27bd0018 addiu r29,r29,0x0018
  0018a080: 03e00008 jr r31
+
  0018a080: 03e00008 jr r31
 
  0018a084: 00000000 nop
 
  0018a084: 00000000 nop
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 19:40, 24 April 2022

[3f]
0018a02c: 27bdffe8 addiu r29,r29,-0x0018    |
0018a030: afbf0010 sw r31,0x0010(r29)       |
0018a034: 0c06178c jal 0x00185e30           |-->Store_Speed_and_X Ability XA = Attacker's speed and Ability YA = used Ability X
0018a038: 00000000 nop                      |
0018a03c: 0c06217e jal 0x001885f8           |-->Physical_XA_Modifying_Statuses/Support Modify Ability XA (Support Abilities, Status, Compatibility)
0018a040: 00000000 nop                      |
0018a044: 0c061967 jal 0x0018659c           |-->XA + YA for Accuracy XA+YA becomes TCA HP damage (YA is processed via compatibility) 
0018a048: 00000000 nop                      |
0018a04c: 0c061d44 jal 0x00187510           |-->Uses_HP_damage_as_Action_hit% HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
0018a050: 00000000 nop                      |
0018a054: 3c028019 lui r2,0x8019            |
0018a058: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
0018a05c: 00000000 nop                      |
0018a060: 90420000 lbu r2,0x0000(r2)        |r2 = TCA hit flag
0018a064: 00000000 nop                      |
0018a068: 10400003 beq r2,r0,0x0018a078     #If Attacks hits
0018a06c: 00000000 nop                          |
0018a070: 0c061fc9 jal 0x00187f24               |-->Apply_status_(to_action) Add Ability status - if successful update TCA Attack type
0018a074: 00000000 nop                          |
0018a078: 8fbf0010 lw r31,0x0010(r29)       END
0018a07c: 27bd0018 addiu r29,r29,0x0018
0018a080: 03e00008 jr r31
0018a084: 00000000 nop

Return location

Battle.bin
0018b97c - Pre Formula Setup