Difference between revisions of "2Truth/Formula 5E-5F Calculate damage"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Truth/Formula 5E-5F Calculate damage: 001889a4: 27bdffe8 addiu r29,r29,0xffe8 001889a8: afbf0010 sw r31,0x0010(r29) 001889ac: 0c061730 jal 0x00185cc0 Get XA and YA 0...")
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Truth/Formula 5E-5F Calculate damage:
+
Truth/Formula 5E-5F Calculate damage:  
  001889a4: 27bdffe8 addiu r29,r29,0xffe8
+
No Parameters
  001889a8: afbf0010 sw r31,0x0010(r29)
+
  001889ac: 0c061730 jal 0x00185cc0 Get XA and YA
+
Returns r2 = 0x00 if Proc is triggered (not used)
  001889b0: 00000000 nop
+
  001889b4: 0c062259 jal 0x00188964 Magical Damage (includes... Everything but Faith)
+
Set XA and YA, Modify XA (Support and everything), Set HP damage = XA*YA
  001889b8: 00000000 nop
+
Deal with Elemental resistance (Alters HP damage) and Roll Proc (19% of chances) +/- Apply status
  001889bc: 8fbf0010 lw r31,0x0010(r29)
+
----------------------------------------------------------------------------------------------------------
  001889c0: 27bd0018 addiu r29,r29,0x0018
+
  001889a4: 27bdffe8 addiu r29,r29,-0x0018    |
  001889c4: 03e00008 jr r31
+
  001889a8: afbf0010 sw r31,0x0010(r29)       |
  001889c8: 00000000 nop
+
  001889ac: 0c061730 jal 0x00185cc0           |{{f/jal|Base XA and YA for MA + Y / 2|Base XA and YA for MA + Y / 2}} Set XA =MA  and YA = (MA+Y)/2
 +
  001889b0: 00000000 nop                     |
 +
  001889b4: 0c062259 jal 0x00188964           |{{f/jal|Truth/Formula 5E-5F Magical damage|Truth/Formula 5E-5F Magical damage}} Modify XA (Element/Support…) set HP damage (XA*YA) process it through elemental resistances, Roll +/- Add status
 +
  001889b8: 00000000 nop                     |
 +
  001889bc: 8fbf0010 lw r31,0x0010(r29)       |
 +
  001889c0: 27bd0018 addiu r29,r29,0x0018     |
 +
  001889c4: 03e00008 jr r31                   |
 +
  001889c8: 00000000 nop                     |
 +
 
 +
===Return Location===
 +
'''Battle.bin'''
 +
00189454: [[1E_Dmg_((MA%2BY)*MA/2)#Hit.28Rdm.281.2CX.29.29|Formula 1E - Dmg ((MA+Y)*MA/2)]]
 +
0018aab8: [[5E_Dmg_((MA%2BY)/2*MA)|Formula 5E - Dmg ((MA+Y)/2*MA)]]
 +
0018aae8: [[5F_Dmg_((MA%2BY)/2*MA)|Formula 5F - Dmg ((MA+Y)/2*MA)]]
 +
0018ab08: [[60_Dmg_((MA%2BY)/2*MA)_Status|Formula 60 - Dmg ((MA+Y)/2*MA) Status]]

Latest revision as of 19:16, 18 April 2022

Truth/Formula 5E-5F Calculate damage:

No Parameters 

Returns r2 = 0x00 if Proc is triggered (not used)

Set XA and YA, Modify XA (Support and everything), Set HP damage = XA*YA
Deal with Elemental resistance (Alters HP damage) and Roll Proc (19% of chances) +/- Apply status
----------------------------------------------------------------------------------------------------------
001889a4: 27bdffe8 addiu r29,r29,-0x0018    |
001889a8: afbf0010 sw r31,0x0010(r29)       |
001889ac: 0c061730 jal 0x00185cc0           |-->Base XA and YA for MA + Y / 2 Set XA =MA  and YA = (MA+Y)/2
001889b0: 00000000 nop                      |
001889b4: 0c062259 jal 0x00188964           |-->Truth/Formula 5E-5F Magical damage Modify XA (Element/Support…) set HP damage (XA*YA) process it through elemental resistances, Roll +/- Add status
001889b8: 00000000 nop                      |
001889bc: 8fbf0010 lw r31,0x0010(r29)       |
001889c0: 27bd0018 addiu r29,r29,0x0018     |
001889c4: 03e00008 jr r31                   |
001889c8: 00000000 nop                      |

Return Location

Battle.bin
00189454: Formula 1E - Dmg ((MA+Y)*MA/2)
0018aab8: Formula 5E - Dmg ((MA+Y)/2*MA)
0018aae8: Formula 5F - Dmg ((MA+Y)/2*MA)
0018ab08: Formula 60 - Dmg ((MA+Y)/2*MA) Status