Difference between revisions of "1F Dmg ((100-CasF)*(100-TarF)*(MA+Y)*MA/2)"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Notes)
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  00189464: 27bdffe8 addiu r29,r29,0xffe8         
+
  Hard coded mechanics : This formula is a multi Hit formula. Number of hits = random from 1 to Ability X  ([[Current_Action_Ability_Data_Setting_/_Multi_Hit_Formulas|See here]] : line 0017d5e0)
  00189468: afbf0010 sw r31,0x0010(r29)          
+
  0018946c: 0c06216e jal 0x001885b8                |-->[[Magical_Evade_Calculation|<span style="color:blue">Magic Evasion</span>]] 
+
This formula contains an "Anti-Faith" alteration of damage, but faith maximize the outcome and innocent nullify it (as for regular faith influenced magic)
00189470: 00000000 nop                         
+
  ----------------------------------------------------------------------------------------------------------------------------------------------------------------
00189474: 1440004f bne r2,r0,0x001895b4          #'''If not evaded''' Else Branch to <span style="color:firebrick">'''End'''</span> if evaded
+
  00189464: 27bdffe8 addiu r29,r29,0xffe8    |
00189478: 00000000 nop                              |
+
  00189468: afbf0010 sw r31,0x0010(r29)      |
0018947c: 0c061730 jal 0x00185cc0                    |-->[[Base_XA_and_YA_for_MA_%2B_Y_/_2|<span style="color:blue">Base XA and YA for MA + Y / 2</span>]] 
+
0018946c: 0c06216e jal 0x001885b8          |{{f/jal|Magical_Evade_Calculation|<nowiki>Magic Evasion</nowiki>}} If Abillity is evadeable roll Ability Evade byte against Ability base Hit
00189480: 00000000 nop                              |
+
00189470: 00000000 nop                     |
00189484: 0c0617ff jal 0x00185ffc                    |-->[[Elemental_Strengthen|<span style="color:blue">Elemental_Strengthen</span>]] 
+
  00189474: 1440004f bne r2,r0,0x001895b4    {{f/Cond|<nowiki>If not evaded</nowiki>}} /Branch to {{f/loc|end}}
00189488: 00000000 nop                              |
+
  00189478: 00000000 nop                          |
0018948c: 0c0621d1 jal 0x188744                      |-->[[Magical_Support/Status/Compat|<span style="color:blue">Magical Support/Status/Compat</span>]] 
+
  0018947c: 0c061730 jal 0x00185cc0                |{{f/jal|Base_XA_and_YA_for_MA_%2B_Y_/_2|<nowiki>Base XA and YA for MA + Y / 2</nowiki>}} Set XA =MA  and YA = (MA+Y)/2
00189490: 00000000 nop                              |
+
  00189480: 00000000 nop                           |
00189494: 0c0621df jal 0x0018877c                    |-->[[Elemental_XA_*_YA|<span style="color:blue">Elemental XA*YA</span>]] 
+
  00189484: 0c0617ff jal 0x00185ffc                |{{f/jal|Elemental_Strengthen|<nowiki>Elemental_Strengthen</nowiki>}} XA + 25% if used Ability Element is strengthened
  00189498: 00000000 nop                              |
+
  00189488: 00000000 nop                           |
  0018949c: 14400045 bne r2,r0,0x001895b4              #'''If not nullified''' Else branch to <span style="color:firebrick">'''End'''</span> (r2 = 1 si hit = 0 from Elemental XA*YA)
+
  0018948c: 0c0621d1 jal 0x188744                  |{{f/jal|Magical_Support/Status/Compat|<nowiki>Magical Support/Status/Compat</nowiki>}} Modify Ability XA (Support Abilities, Status, Compatibility)
001894a0: 00000000 nop                                   |
+
  00189490: 00000000 nop                          |
  001894a4: 3c028019 lui r2,0x8019                        |
+
  00189494: 0c0621df jal 0x0018877c                |{{f/jal|Elemental_XA_*_YA|<nowiki>Elemental XA*YA</nowiki>}} Turns XA * YA in HP damage / Modify Damage based on Elements / Returns r2 = 0x00 if Attack hits
  001894a8: 8c422d94 lw r2,0x2d94(r2)                      |<span style="color:limegreen">r2 = attacker data pointer</span>
+
  00189498: 00000000 nop                           |
  001894ac: 00000000 nop                                  |
+
  0018949c: 14400045 bne r2,r0,0x001895b4          {{f/Cond|<nowiki>If not nullified</nowiki>}} /Else branch to {{f/loc|<nowiki>end</nowiki>}} {{f/std|<nowiki>(r2 = 1 si hit = 0 from Elemental XA*YA)</nowiki>}}
001894b0: 9042005c lbu r2,0x005c(r2)                    |<span style="color:limegreen">r2 = 5th set of attacker current statuses</span>
+
  001894a0: 00000000 nop                              |
  001894b4: 00000000 nop                                   |
+
  001894a4: 3c028019 lui r2,0x8019                    |
  001894b8: 30420080 andi r2,r2,0x0080                    |r2 = 0x80 if attacker has faith/Else 0x00
+
  001894a8: 8c422d94 lw r2,0x2d94(r2)                 |{{f/adr|<nowiki>r2 = attacker data pointer</nowiki>}}
  001894bc: 10400003 beq r2,r0,0x001894cc                  #'''If Attacker has faith '''
+
  001894ac: 00000000 nop                              |
  001894c0: 00000000 nop                                       |
+
  001894b0: 9042005c lbu r2,0x005c(r2)                 |{{f/load|<nowiki>r2 = 5th set of attacker current statuses</nowiki>}}
  001894c4: 3c018019 lui r1,0x8019                            |
+
  001894b4: 00000000 nop                               |
001894c8: a02038d3 sb r0,0x38d3(r1)                          |<span style="color:darkviolet">Set attacker effective faith to 0</span>
+
  001894b8: 30420080 andi r2,r2,0x0080                |{{f/std|<nowiki>r2 = 0x80 if attacker has faith/Else 0x00</nowiki>}}
  001894cc: 3c028019 lui r2,0x8019                            |
+
  001894bc: 10400003 beq r2,r0,0x001894cc              {{f/Cond|<nowiki>If Attacker has faith </nowiki>}}
  001894d0: 8c422d94 lw r2,0x2d94(r2)                      |<span style="color:limegreen">r2 =  attacker data pointer</span>
+
  001894c0: 00000000 nop                                   |
  001894d4: 00000000 nop                                   |
+
  001894c4: 3c018019 lui r1,0x8019                         |
  001894d8: 9042005c lbu r2,0x005c(r2)                    |<span style="color:limegreen">r2 =  5th set of attacker current statuses</span>
+
  001894c8: a02038d3 sb r0,0x38d3(r1)                     |{{f/store|<nowiki>Set attacker effective faith to 0</nowiki>}}
001894dc: 00000000 nop                                  |
+
  001894cc: 3c028019 lui r2,0x8019                         |
001894e0: 30420040 andi r2,r2,0x0040                    |r2 = 0x40 if attacker has innocent
+
  001894d0: 8c422d94 lw r2,0x2d94(r2)                 |{{f/adr|<nowiki>r2 = attacker data pointer</nowiki>}}
  001894e4: 10400003 beq r2,r0,0x001894f4                  #'''If attacker has innoncent'''
+
  001894d4: 00000000 nop                               |
  001894e8: 34020064 ori r2,r0,0x0064                          |r2 = 100
+
  001894d8: 9042005c lbu r2,0x005c(r2)                 |{{f/load|<nowiki>r2 = 5th set of attacker current statuses</nowiki>}}
  001894ec: 3c018019 lui r1,0x8019                            |
+
  001894dc: 00000000 nop                               |
001894f0: a02238d3 sb r2,0x38d3(r1)                         |<span style="color:darkviolet">Set attacker effective faith to 100</span>
+
  001894e0: 30420040 andi r2,r2,0x0040                 |{{f/std|<nowiki>r2 = 0x40 if attacker has innocent</nowiki>}}
  001894f4: 3c028019 lui r2,0x8019                            |
+
  001894e4: 10400003 beq r2,r0,0x001894f4              {{f/Cond|<nowiki>If attacker has innoncent</nowiki>}}
  001894f8: 8c422d98 lw r2,0x2d98(r2)                     |<span style="color:limegreen">r2 = target data pointer</span>
+
  001894e8: 34020064 ori r2,r0,0x0064                      |{{f/std|<nowiki>r2 = 100</nowiki>}}
  001894fc: 00000000 nop                                   |
+
  001894ec: 3c018019 lui r1,0x8019                         |
  00189500: 9042005c lbu r2,0x005c(r2)                    |<span style="color:limegreen">r2 = target 5th set of current statuses</span>
+
  001894f0: a02238d3 sb r2,0x38d3(r1)                     |{{f/store|<nowiki>Set attacker effective faith to 100</nowiki>}}
  00189504: 00000000 nop                                  |
+
  001894f4: 3c028019 lui r2,0x8019                         |
00189508: 30420080 andi r2,r2,0x0080                    |r2 = 0x80 if target has faith
+
  001894f8: 8c422d98 lw r2,0x2d98(r2)                 |{{f/adr|<nowiki>r2 = target data pointer</nowiki>}}
  0018950c: 10400003 beq r2,r0,0x0018951c                  #'''If target has faith'''
+
  001894fc: 00000000 nop                              |
00189510: 00000000 nop                                       |
+
  00189500: 9042005c lbu r2,0x005c(r2)                 |{{f/load|<nowiki>r2 = target 5th set of current statuses</nowiki>}}
  00189514: 3c018019 lui r1,0x8019                             |
+
  00189504: 00000000 nop                              |
  00189518: a02038d2 sb r0,0x38d2(r1)                         |<span style="color:darkviolet">Store target effective faith = 0</span>
+
  00189508: 30420080 andi r2,r2,0x0080                |{{f/std|<nowiki>r2 = 0x80 if target has faith</nowiki>}}
  0018951c: 3c028019 lui r2,0x8019                             |
+
  0018950c: 10400003 beq r2,r0,0x0018951c              {{f/Cond|<nowiki>If target has faith</nowiki>}}
  00189520: 8c422d98 lw r2,0x2d98(r2)                     |<span style="color:limegreen">r2 = target data pointer</span>
+
  00189510: 00000000 nop                                  |
  00189524: 00000000 nop                                   |
+
00189514: 3c018019 lui r1,0x8019                        |
  00189528: 9042005c lbu r2,0x005c(r2)                     |<span style="color:limegreen">r2 = target 5th set of current statuses</span>
+
  00189518: a02038d2 sb r0,0x38d2(r1)                     |{{f/store|<nowiki>Store target effective faith = 0</nowiki>}}
  0018952c: 00000000 nop                                   |
+
  0018951c: 3c028019 lui r2,0x8019                        |
  00189530: 30420040 andi r2,r2,0x0040                     |r2 = 0x40 if target has innocent
+
  00189520: 8c422d98 lw r2,0x2d98(r2)                  |{{f/adr|<nowiki>r2 = target data pointer</nowiki>}}
  00189534: 10400004 beq r2,r0,0x189548                    #'''If target has innoncent'''
+
  00189524: 00000000 nop                               |
  00189538: 34030064 ori r3,r0,0x0064                      |r3 = 100
+
  00189528: 9042005c lbu r2,0x005c(r2)                |{{f/load|<nowiki>r2 = target 5th set of current statuses</nowiki>}}
0018953c: 34020064 ori r2,r0,0x0064                          |r2 = 100
+
  0018952c: 00000000 nop                               |
  00189540: 3c018019 lui r1,0x8019                             |
+
00189530: 30420040 andi r2,r2,0x0040                |{{f/std|<nowiki>r2 = 0x40 if target has innocent</nowiki>}}
  00189544: a02238d2 sb r2,0x38d2(r1)                         |<span style="color:darkviolet">Store target effective faith = 100</span>
+
  00189534: 10400004 beq r2,r0,0x189548                {{f/Cond|<nowiki>If target has innoncent</nowiki>}}
  00189548: 3c058019 lui r5,0x8019                             |
+
  00189538: 34030064 ori r3,r0,0x0064                  |{{f/std|<nowiki>r3 = 100</nowiki>}}
  0018954c: 8ca52d90 lw r5,0x2d90(r5)                     |<span style="color:limegreen">r5 = Target current action data pointer</span>
+
  0018953c: 34020064 ori r2,r0,0x0064                      |{{f/std|<nowiki>r2 = 100</nowiki>}}
  00189550: 3c028019 lui r2,0x8019                        |
+
  00189540: 3c018019 lui r1,0x8019                        |
  00189554: 904238d2 lbu r2,0x38d2(r2)                     |<span style="color:limegreen">r2 = Target effective faith</span>
+
00189544: a02238d2 sb r2,0x38d2(r1)                      |{{f/store|<nowiki>Store target effective faith = 100</nowiki>}}
  00189558: 84a40004 lh r4,0x0004(r5)                      |<span style="color:limegreen">r4 = TCA HP Dmg</span>
+
  00189548: 3c058019 lui r5,0x8019                         |
  0018955c: 00621023 subu r2,r3,r2                        |r2 = 100 - Target faith
+
  0018954c: 8ca52d90 lw r5,0x2d90(r5)                  |{{f/adr|<nowiki>r5 = Target current action data pointer</nowiki>}}
  00189560: 00820018 mult  r4,r2                          |TCA HP Dmg * (100 - Target Faith)
+
  00189550: 3c028019 lui r2,0x8019                    |
  00189564: 3c028019 lui r2,0x8019                        |
+
00189554: 904238d2 lbu r2,0x38d2(r2)                 |{{f/load|<nowiki>r2 = Target effective faith</nowiki>}}
  00189568: 904238d3 lbu r2,0x38d3(r2)                     |<span style="color:limegreen">r2 = Effective attacker faith</span>
+
  00189558: 84a40004 lh r4,0x0004(r5)                 |{{f/load|<nowiki>r4 = TCA HP Dmg</nowiki>}}
  0018956c: 00002012 mflo r4                              |r4 = TCA HP Dmg * (100 - Target Faith)
+
0018955c: 00621023 subu r2,r3,r2                    |{{f/std|<nowiki>r2 = 100 - Target faith</nowiki>}}
00189570: 00621823 subu r3,r3,r2                         |r3 = 100 - Att. Faith
+
00189560: 00820018 mult  r4,r2                      |{{f/std|<nowiki>TCA HP Dmg * (100 - Target Faith)</nowiki>}}
  00189574: 00000000 nop                                   |
+
00189564: 3c028019 lui r2,0x8019                    |
  00189578: 00830018 mult r4,r3                            |
+
00189568: 904238d3 lbu r2,0x38d3(r2)                |{{f/load|<nowiki>r2 = Effective attacker faith</nowiki>}}
  0018957c: 00001812 mflo r3                               |r3 = HP Dmg * (100 - Tar Faith) * (100 - Att faith)
+
0018956c: 00002012 mflo r4                          |{{f/std|<nowiki>r4 =  TCA HP Dmg * (100 - Target Faith)</nowiki>}}
00189580: 3c0268db lui r2,0x68db                        |
+
00189570: 00621823 subu r3,r3,r2                    |{{f/std|<nowiki>r3 = 100 - Att. Faith</nowiki>}}
  00189584: 34428bad ori r2,r2,0x8bad                      |r2 = 0,4096*2^32
+
00189574: 00000000 nop                              |
  00189588: 00620018 mult r3,r2                            |
+
00189578: 00830018 mult r4,r3                        |
0018958c: 00031fc3 sra r3,r3,0x1f                        |r3 = r3/2^31
+
0018957c: 00001812 mflo r3                          |{{f/std|<nowiki>r3 = HP Dmg * (100 - Tar Faith) * (100 - Att faith)</nowiki>}}
  00189590: 00001010 mfhi r2                               |r2 = HP Dmg * (100 - Tar Faith) * (100 - Att faith) *4096/10000
+
00189580: 3c0268db lui r2,0x68db                    |
  00189594: 00021303 sra r2,r2,0x0c                        |r2 = r2/4096  ( = HP Dmg * (100 - Tar Faith) * (100 - Att faith)/10000
+
00189584: 34428bad ori r2,r2,0x8bad                  |{{f/std|<nowiki>r2 = 0,4096*2^32</nowiki>}}
  00189598: 00431023 subu r2,r2,r3                         |rounding stuff
+
00189588: 00620018 mult r3,r2                        |
  0018959c: 0c0621c7 jal 0x0018871c                        |-->[[Elemental_Absorb_and_status_roll|<span style="color:blue">Elemental Absorb and status roll</span>]] 
+
0018958c: 00031fc3 sra r3,r3,0x1f                    |{{f/std|<nowiki>r3 = r3/2^31 </nowiki>}}
  001895a0: a4a20004 sh r2,0x0004(r5)                     |<span style="color:darkviolet">Store Target current action HP Dmg</span>
+
00189590: 00001010 mfhi r2                          |{{f/std|<nowiki>r2 = HP Dmg * (100 - Tar Faith) * (100 - Att faith) *4096/10000</nowiki>}}
  001895a4: 14400003 bne r2,r0,0x001895b4                 #'''If Proc succeed'''
+
00189594: 00021303 sra r2,r2,0x0c                    |{{f/std|<nowiki>r2 = r2/4096  ( = HP Dmg * (100 - Tar Faith) * (100 - Att faith)/10000</nowiki>}}
001895a8: 00000000 nop                                      |
+
00189598: 00431023 subu r2,r2,r3                    |{{f/std|<nowiki>rounding stuff</nowiki>}}
001895ac: 0c061fad jal 0x00187eb4                            |-->[[Apply_status_(to_action)_-_(Preserve_hit_status,_evade_type,_hit_%25)|<span style="color:blue">Apply status (to action)</span>]] 
+
0018959c: 0c0621c7 jal 0x0018871c                    |{{f/jal|Elemental_Absorb_and_status_roll|<nowiki>Elemental Absorb and status roll</nowiki>}} Turns HP damage into recovery (if element is absorbed) / returns r2 = 0x00 if proc is triggered
001895b0: 00000000 nop                                      |
+
001895a0: a4a20004 sh r2,0x0004(r5)                  |{{f/store|<nowiki>Store Target current action HP Dmg</nowiki>}}
  001895b4: 8fbf0010 lw r31,0x0010(r29)          
+
001895a4: 14400003 bne r2,r0,0x001895b4              {{f/Cond|<nowiki>If status proc succeed</nowiki>}}
  001895b8: 27bd0018 addiu r29,r29,0x0018        
+
001895a8: 00000000 nop                                  |
  001895bc: 03e00008 jr r31                      
+
001895ac: 0c061fad jal 0x00187eb4                        |{{f/jal|Apply_status_(to_action)_-_(Preserve_hit_status,_evade_type,_hit_%25)|<nowiki>Apply status (to action)</nowiki>}} Add Ability status - if successful update TCA Attack type
 +
001895b0: 00000000 nop                                  |
 +
  001895b4: 8fbf0010 lw r31,0x0010(r29)      
 +
  001895b8: 27bd0018 addiu r29,r29,0x0018    
 +
  001895bc: 03e00008 jr r31                  
 
  001895c0: 00000000 nop
 
  001895c0: 00000000 nop
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 19:31, 18 April 2022

Hard coded mechanics : This formula is a multi Hit formula. Number of hits = random  from 1 to Ability X   (See here : line 0017d5e0)

This formula contains an "Anti-Faith" alteration of damage, but faith maximize the outcome and innocent nullify it (as for regular faith influenced magic)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
00189464: 27bdffe8 addiu r29,r29,0xffe8     |
00189468: afbf0010 sw r31,0x0010(r29)       |
0018946c: 0c06216e jal 0x001885b8           |-->Magic Evasion If Abillity is evadeable roll Ability Evade byte against Ability base Hit
00189470: 00000000 nop                      |
00189474: 1440004f bne r2,r0,0x001895b4     #If not evaded /Branch to end 
00189478: 00000000 nop                           |
0018947c: 0c061730 jal 0x00185cc0                |-->Base XA and YA for MA + Y / 2 Set XA =MA  and YA = (MA+Y)/2
00189480: 00000000 nop                           |
00189484: 0c0617ff jal 0x00185ffc                |-->Elemental_Strengthen  XA + 25% if used Ability Element is strengthened
00189488: 00000000 nop                           |
0018948c: 0c0621d1 jal 0x188744                  |-->Magical Support/Status/Compat Modify Ability XA (Support Abilities, Status, Compatibility)
00189490: 00000000 nop                           |
00189494: 0c0621df jal 0x0018877c                |-->Elemental XA*YA Turns XA * YA in HP damage / Modify Damage based on Elements / Returns r2 = 0x00 if Attack hits
00189498: 00000000 nop                           |
0018949c: 14400045 bne r2,r0,0x001895b4          #If not nullified /Else branch to end (r2 = 1 si hit = 0 from Elemental XA*YA)
001894a0: 00000000 nop                               |
001894a4: 3c028019 lui r2,0x8019                     |
001894a8: 8c422d94 lw r2,0x2d94(r2)                  |r2 = attacker data pointer
001894ac: 00000000 nop                               |
001894b0: 9042005c lbu r2,0x005c(r2)                 |r2 = 5th set of attacker current statuses
001894b4: 00000000 nop                               |
001894b8: 30420080 andi r2,r2,0x0080                 |r2 = 0x80 if attacker has faith/Else 0x00
001894bc: 10400003 beq r2,r0,0x001894cc              #If Attacker has faith 
001894c0: 00000000 nop                                   |
001894c4: 3c018019 lui r1,0x8019                         |
001894c8: a02038d3 sb r0,0x38d3(r1)                      |Set attacker effective faith to 0
001894cc: 3c028019 lui r2,0x8019                         |
001894d0: 8c422d94 lw r2,0x2d94(r2)                  |r2 =  attacker data pointer
001894d4: 00000000 nop                               |
001894d8: 9042005c lbu r2,0x005c(r2)                 |r2 =  5th set of attacker current statuses
001894dc: 00000000 nop                               |
001894e0: 30420040 andi r2,r2,0x0040                 |r2 = 0x40 if attacker has innocent
001894e4: 10400003 beq r2,r0,0x001894f4              #If attacker has innoncent
001894e8: 34020064 ori r2,r0,0x0064                      |r2 = 100
001894ec: 3c018019 lui r1,0x8019                         |
001894f0: a02238d3 sb r2,0x38d3(r1)                      |Set attacker effective faith to 100
001894f4: 3c028019 lui r2,0x8019                         |
001894f8: 8c422d98 lw r2,0x2d98(r2)                  |r2 =  target data pointer
001894fc: 00000000 nop                               |
00189500: 9042005c lbu r2,0x005c(r2)                 |r2 =  target 5th set of current statuses
00189504: 00000000 nop                               |
00189508: 30420080 andi r2,r2,0x0080                 |r2 = 0x80 if target has faith
0018950c: 10400003 beq r2,r0,0x0018951c              #If target has faith
00189510: 00000000 nop                                   |
00189514: 3c018019 lui r1,0x8019                         |
00189518: a02038d2 sb r0,0x38d2(r1)                      |Store target effective faith = 0
0018951c: 3c028019 lui r2,0x8019                         |
00189520: 8c422d98 lw r2,0x2d98(r2)                  |r2 = target data pointer
00189524: 00000000 nop                               |
00189528: 9042005c lbu r2,0x005c(r2)                 |r2 = target 5th set of current statuses
0018952c: 00000000 nop                               |
00189530: 30420040 andi r2,r2,0x0040                 |r2 = 0x40 if target has innocent
00189534: 10400004 beq r2,r0,0x189548                #If target has innoncent
00189538: 34030064 ori r3,r0,0x0064                  |r3 = 100
0018953c: 34020064 ori r2,r0,0x0064                      |r2 = 100
00189540: 3c018019 lui r1,0x8019                         |
00189544: a02238d2 sb r2,0x38d2(r1)                      |Store target effective faith = 100
00189548: 3c058019 lui r5,0x8019                         |
0018954c: 8ca52d90 lw r5,0x2d90(r5)                  |r5 = Target current action data pointer
00189550: 3c028019 lui r2,0x8019                     |
00189554: 904238d2 lbu r2,0x38d2(r2)                 |r2 = Target effective faith
00189558: 84a40004 lh r4,0x0004(r5)                  |r4 = TCA HP Dmg
0018955c: 00621023 subu r2,r3,r2                     |r2 = 100 - Target faith
00189560: 00820018 mult  r4,r2                       |TCA HP Dmg * (100 - Target Faith)
00189564: 3c028019 lui r2,0x8019                     |
00189568: 904238d3 lbu r2,0x38d3(r2)                 |r2 = Effective attacker faith
0018956c: 00002012 mflo r4                           |r4 =  TCA HP Dmg * (100 - Target Faith)
00189570: 00621823 subu r3,r3,r2                     |r3 = 100 - Att. Faith
00189574: 00000000 nop                               |
00189578: 00830018 mult r4,r3                        |
0018957c: 00001812 mflo r3                           |r3 = HP Dmg * (100 - Tar Faith) * (100 - Att faith)
00189580: 3c0268db lui r2,0x68db                     |
00189584: 34428bad ori r2,r2,0x8bad                  |r2 = 0,4096*2^32
00189588: 00620018 mult r3,r2                        |
0018958c: 00031fc3 sra r3,r3,0x1f                    |r3 = r3/2^31 
00189590: 00001010 mfhi r2                           |r2 = HP Dmg * (100 - Tar Faith) * (100 - Att faith) *4096/10000
00189594: 00021303 sra r2,r2,0x0c                    |r2 = r2/4096  ( = HP Dmg * (100 - Tar Faith) * (100 - Att faith)/10000
00189598: 00431023 subu r2,r2,r3                     |rounding stuff
0018959c: 0c0621c7 jal 0x0018871c                    |-->Elemental Absorb and status roll Turns HP damage into recovery (if element is absorbed) / returns r2 = 0x00 if proc is triggered
001895a0: a4a20004 sh r2,0x0004(r5)                  |Store Target current action HP Dmg
001895a4: 14400003 bne r2,r0,0x001895b4              #If status proc succeed
001895a8: 00000000 nop                                   |
001895ac: 0c061fad jal 0x00187eb4                        |-->Apply status (to action) Add Ability status - if successful update TCA Attack type
001895b0: 00000000 nop                                   |
001895b4: 8fbf0010 lw r31,0x0010(r29)       
001895b8: 27bd0018 addiu r29,r29,0x0018     
001895bc: 03e00008 jr r31                   
001895c0: 00000000 nop

Return location

Battle.bin
0018b97c - Pre Formula Setup