Difference between revisions of "2C DmgMP (Y)% Hit (PA+Y)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
  [2c]
 
  [2c]
  00189ad8: 27bdffe8 addiu r29,r29,0xffe8
+
  00189ad8: 27bdffe8 addiu r29,r29,-0x0018    |
  00189adc: afbf0010 sw r31,0x0010(r29)
+
  00189adc: afbf0010 sw r31,0x0010(r29)       |
  00189ae0: 0c062144 jal 0x 00188510      [[Physical Evade Calculation]]
+
  00189ae0: 0c062144 jal 0x00188510          |{{f/jal|Physical Evade Calculation|Physical Evade Calculation}} If Abillity is evadeable roll Ability Evade byte against Ability base Hit - Returns r2
  00189ae4: 00000000 nop
+
  00189ae4: 00000000 nop                     |
  00189ae8: 14400009 bne r2,r0,0x 00189b10 Branch to end if attack is evaded
+
  00189ae8: 14400009 bne r2,r0,0x00189b10    {{f/Cond|If Attack is not evaded}}
  00189aec: 00000000 nop
+
  00189aec: 00000000 nop                         |
  00189af0: 0c061781 jal 0x 00185e04      [[Store PA and Y]]
+
  00189af0: 0c061781 jal 0x00185e04              |{{f/jal|Store PA and Y|Store PA and Y}}    XA = Attacker's PA and YA = Ability Y
  00189af4: 00000000 nop
+
  00189af4: 00000000 nop                         |
  00189af8: 0c0621b5 jal 0x 001886d4      [[Routine used in formula 2B]] - (PA+Y)% damage
+
  00189af8: 0c0621b5 jal 0x001886d4              |{{f/jal|Calculate_Accuracy_for_Physical|Calculate_Accuracy_for_Physical}} Modify XA and YA (physical) and uses XA+YA as hit% - Returns r2
  00189afc: 00000000 nop
+
  00189afc: 00000000 nop                         |
  00189b00: 14400003 bne r2,r0,0x 00189b10 Branch to end if missed
+
  00189b00: 14400003 bne r2,r0,0x00189b10        {{f/Cond|If Attack hits}}
  00189b04: 00000000 nop
+
  00189b04: 00000000 nop                             |
  00189b08: 0c0619a3 jal 0x 0018668c      [[MP Damage Routine (Uses Y instead of X.)]]
+
  00189b08: 0c0619a3 jal 0x0018668c                  |{{f/jal|Calculate_MP%25_damage|Calculate_MP%_damage}} Set MP damage = Y% of Target Max MP
  00189b0c: 00000000 nop
+
  00189b0c: 00000000 nop                             |
  00189b10: 8fbf0010 lw r31,0x0010(r29)
+
  00189b10: 8fbf0010 lw r31,0x0010(r29)       END
  00189b14: 27bd0018 addiu r29,r29,0x 0018
+
  00189b14: 27bd0018 addiu r29,r29,0x0018   
  00189b18: 03e00008 jr r31
+
  00189b18: 03e00008 jr r31                  
  00189b1c: 00000000 nop
+
  00189b1c: 00000000 nop                    
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 11:20, 23 April 2022

[2c]
00189ad8: 27bdffe8 addiu r29,r29,-0x0018    |
00189adc: afbf0010 sw r31,0x0010(r29)       |
00189ae0: 0c062144 jal 0x00188510           |-->Physical Evade Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit - Returns r2
00189ae4: 00000000 nop                      |
00189ae8: 14400009 bne r2,r0,0x00189b10     #If Attack is not evaded
00189aec: 00000000 nop                          |
00189af0: 0c061781 jal 0x00185e04               |-->Store PA and Y    XA = Attacker's PA and YA = Ability Y
00189af4: 00000000 nop                          |
00189af8: 0c0621b5 jal 0x001886d4               |-->Calculate_Accuracy_for_Physical Modify XA and YA (physical) and uses XA+YA as hit% - Returns r2
00189afc: 00000000 nop                          |
00189b00: 14400003 bne r2,r0,0x00189b10         #If Attack hits
00189b04: 00000000 nop                              |
00189b08: 0c0619a3 jal 0x0018668c                   |-->Calculate_MP%_damage Set MP damage = Y% of Target Max MP
00189b0c: 00000000 nop                              |
00189b10: 8fbf0010 lw r31,0x0010(r29)       END
00189b14: 27bd0018 addiu r29,r29,0x0018     
00189b18: 03e00008 jr r31                   
00189b1c: 00000000 nop                      

Return location

Battle.bin
0018b97c - Pre Formula Setup