Difference between revisions of "40 Undead: Hit (SP+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " [40] 0018a088: 27bdffe8 addiu r29,r29,0xffe8 0018a08c: afbf0010 sw r31,0x0010(r29) 0018a090: 0c06178c jal 0x 00185e30 Loads SP and X 0018a094: 00000000 nop ...")
 
m
 
Line 1: Line 1:
 
  [40]
 
  [40]
  0018a088: 27bdffe8 addiu r29,r29,0xffe8
+
  0018a088: 27bdffe8 addiu r29,r29,0xffe8     |
  0018a08c: afbf0010 sw r31,0x0010(r29)
+
  0018a08c: afbf0010 sw r31,0x0010(r29)       |
  0018a090: 0c06178c jal 0x 00185e30      Loads SP and X
+
  0018a090: 0c06178c jal 0x00185e30          |{{f/jal|Store_Speed_and_X|Store_Speed_and_X}} Ability XA = Attacker's speed and Ability YA = used Ability X
  0018a094: 00000000 nop
+
  0018a094: 00000000 nop                     |
  0018a098: 0c06217e jal 0x 001885f8      Zodiac Calculation
+
  0018a098: 0c06217e jal 0x001885f8          |{{f/jal|Physical_XA_Modifying_Statuses/Support|Physical_XA_Modifying_Statuses/Support}} Modify Ability XA (Support Abilities, Status, Compatibility)
  0018a09c: 00000000 nop
+
  0018a09c: 00000000 nop                     |
  0018a0a0: 0c061967 jal 0x 0018659c      Loads SP + X as X
+
  0018a0a0: 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)
  0018a0a4: 00000000 nop
+
  0018a0a4: 00000000 nop                     |
  0018a0a8: 0c061d44 jal 0x 00187510      Total Accuracy Check
+
  0018a0a8: 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
  0018a0ac: 00000000 nop
+
  0018a0ac: 00000000 nop                     |
  0018a0b0: 3c028019 lui r2,0x8019
+
  0018a0b0: 3c028019 lui r2,0x8019           |
  0018a0b4: 8c422d90 lw r2,0x2d90(r2)
+
  0018a0b4: 8c422d90 lw r2,0x2d90(r2)         |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  0018a0b8: 00000000 nop
+
  0018a0b8: 00000000 nop                     |
  0018a0bc: 90420000 lbu r2,0x0000(r2)
+
  0018a0bc: 90420000 lbu r2,0x0000(r2)       |{{f/load|<nowiki>r2 = TCA hit flag</nowiki>}}
  0018a0c0: 00000000 nop
+
  0018a0c0: 00000000 nop                     |
  0018a0c4: 1040000f beq r2,r0,0x 0018a104
+
  0018a0c4: 1040000f beq r2,r0,0x0018a104    {{f/Cond|If Attacks hits}}
  0018a0c8: 00000000 nop
+
  0018a0c8: 00000000 nop                         |
  0018a0cc: 3c028019 lui r2,0x8019
+
  0018a0cc: 3c028019 lui r2,0x8019               |
  0018a0d0: 8c422d98 lw r2,0x2d98(r2)
+
  0018a0d0: 8c422d98 lw r2,0x2d98(r2)             |{{f/adr|<nowiki>r2 = Target data pointer </nowiki>}}
  0018a0d4: 00000000 nop
+
  0018a0d4: 00000000 nop                         |
  0018a0d8: 90420058 lbu r2,0x0058(r2)
+
  0018a0d8: 90420058 lbu r2,0x0058(r2)           |{{f/load|<nowiki>r2 = Target's current status (1st set)</nowiki>}}
  0018a0dc: 00000000 nop
+
  0018a0dc: 00000000 nop                         |
  0018a0e0: 30420010 andi r2,r2,0x0010
+
  0018a0e0: 30420010 andi r2,r2,0x0010           |{{f/std|<nowiki>r2 = 0x10 if Target is undead</nowiki>}}
  0018a0e4: 14400005 bne r2,r0,0x 0018a0fc      Zombie Check
+
  0018a0e4: 14400005 bne r2,r0,0x0018a0fc        {{f/Cond|If Target is not undead}}
  0018a0e8: 00000000 nop
+
  0018a0e8: 00000000 nop                             |
  0018a0ec: 0c0610c3 jal 0x 0018430c      ELSE FAIL routine
+
  0018a0ec: 0c0610c3 jal 0x0018430c                  |{{f/jal|Force_Attack_Miss|Force_Attack_Miss}} {{f/std|<nowiki>Hit Flag = Miss Hit% = 0 - Evade type = 0x07</nowiki>}}
  0018a0f0: 00000000 nop
+
  0018a0f0: 00000000 nop                             |
  0018a0f4: 08062841 j 0x 0018a104
+
  0018a0f4: 08062841 j 0x0018a104                    {{f/jump|jump to END}}
  0018a0f8: 00000000 nop
+
  0018a0f8: 00000000 nop
  0018a0fc: 0c061fc9 jal 0x 00187f24      Status Proc
+
                                                {{f/Cond|Else : Target is undead}}
  0018a100: 00000000 nop
+
  0018a0fc: 0c061fc9 jal 0x00187f24              |{{f/jal|Apply_status_(to_action)|Apply_status_(to_action)}} Add Ability status - if successful update TCA Attack type
  0018a104: 8fbf0010 lw r31,0x0010(r29)
+
  0018a100: 00000000 nop                         |
  0018a108: 27bd 0018 addiu r29,r29,0x 0018
+
  0018a104: 8fbf0010 lw r31,0x0010(r29)       END
  0018a10c: 03e00008 jr r31
+
  0018a108: 27bd0018 addiu r29,r29,0x0018
 +
  0018a10c: 03e00008 jr r31
 
  0018a110: 00000000 nop
 
  0018a110: 00000000 nop
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 19:45, 24 April 2022

[40]
0018a088: 27bdffe8 addiu r29,r29,0xffe8     |
0018a08c: afbf0010 sw r31,0x0010(r29)       |
0018a090: 0c06178c jal 0x00185e30           |-->Store_Speed_and_X Ability XA = Attacker's speed and Ability YA = used Ability X
0018a094: 00000000 nop                      |
0018a098: 0c06217e jal 0x001885f8           |-->Physical_XA_Modifying_Statuses/Support Modify Ability XA (Support Abilities, Status, Compatibility)
0018a09c: 00000000 nop                      |
0018a0a0: 0c061967 jal 0x0018659c           |-->XA + YA for Accuracy XA+YA becomes TCA HP damage (YA is processed via compatibility) 
0018a0a4: 00000000 nop                      |
0018a0a8: 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
0018a0ac: 00000000 nop                      |
0018a0b0: 3c028019 lui r2,0x8019            |
0018a0b4: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
0018a0b8: 00000000 nop                      |
0018a0bc: 90420000 lbu r2,0x0000(r2)        |r2 = TCA hit flag
0018a0c0: 00000000 nop                      |
0018a0c4: 1040000f beq r2,r0,0x0018a104     #If Attacks hits
0018a0c8: 00000000 nop                          |
0018a0cc: 3c028019 lui r2,0x8019                |
0018a0d0: 8c422d98 lw r2,0x2d98(r2)             |r2 = Target data pointer 
0018a0d4: 00000000 nop                          |
0018a0d8: 90420058 lbu r2,0x0058(r2)            |r2 = Target's current status (1st set)
0018a0dc: 00000000 nop                          |
0018a0e0: 30420010 andi r2,r2,0x0010            |r2 = 0x10 if Target is undead
0018a0e4: 14400005 bne r2,r0,0x0018a0fc         #If Target is not undead
0018a0e8: 00000000 nop                              |
0018a0ec: 0c0610c3 jal 0x0018430c                   |-->Force_Attack_Miss Hit Flag = Miss Hit% = 0 - Evade type = 0x07
0018a0f0: 00000000 nop                              |
0018a0f4: 08062841 j 0x0018a104                     >>jump to END
0018a0f8: 00000000 nop
                                                #Else : Target is undead
0018a0fc: 0c061fc9 jal 0x00187f24               |-->Apply_status_(to_action) Add Ability status - if successful update TCA Attack type
0018a100: 00000000 nop                          |
0018a104: 8fbf0010 lw r31,0x0010(r29)       END
0018a108: 27bd0018 addiu r29,r29,0x0018
0018a10c: 03e00008 jr r31
0018a110: 00000000 nop

Return location

Battle.bin
0018b97c - Pre Formula Setup