Difference between revisions of "0D Heal (Y)% Hit F(MA+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
  [0d]
 
  [0d]
  00188f38: 27bdffe8 addiu r29,r29,0xffe8
+
  80188f38: 27bdffe8 addiu r29,r29,-0x0018
  00188f3c: afbf0010 sw r31,0x0010(r29)
+
  80188f3c: afbf0010 sw r31,0x0010(r29)
  00188f40: 0c061760 jal 0x 00185d80      ; [[Store MA and X]]
+
  80188f40: 0c061760 jal 0x80185d80              # [[Store MA and X]]
  00188f44: 00000000 nop                   
+
  80188f44: 00000000 nop                   
  00188f48: 0c0617ff jal 0x 00185ffc      ; [[Elemental Strengthen]]
+
  80188f48: 0c0617ff jal 0x80185ffc              # [[Elemental Strengthen]]
  00188f4c: 00000000 nop                   
+
  80188f4c: 00000000 nop                   
  00188f50: 0c062200 jal 0x 00188800      ; [[MA + X]] Calculate (MA + X)*Faith%  
+
  80188f50: 0c062200 jal 0x80188800              # result = [[MA + X]]   // Calculate (MA + X)*Faith%  
  00188f54: 00000000 nop                   
+
  80188f54: 00000000 nop                   
  00188f58: 14400009 bne r2,r0,0x 00188f80
+
  80188f58: 14400009 bne r2,r0,0x80188f80        # if (result != 0) return;
  00188f5c: 00000000 nop                   
+
  80188f5c: 00000000 nop                   
  00188f60: 0c062b37 jal 0x 0018acdc      ; [[Phoenix Down on Undead]]  
+
  80188f60: 0c062b37 jal 0x8018acdc              # result = [[Apply Status and Check Undead]]  
  00188f64: 00000000 nop                   
+
  80188f64: 00000000 nop                   
  00188f68: 10400005 beq r2,r0,0x 00188f80
+
  80188f68: 10400005 beq r2,r0,0x80188f80        # if (result == 0) return;
  00188f6c: 00000000 nop                   
+
  80188f6c: 00000000 nop                   
  00188f70: 0c061989 jal 0x 00186624      ; [[Calculate HP% damage]]
+
  80188f70: 0c061989 jal 0x80186624              # [[Calculate HP% damage]]
  00188f74: 00000000 nop                   
+
  80188f74: 00000000 nop                   
  00188f78: 0c061cd4 jal 0x 00187350      ; [[Undead Reversal]] (Heal = Damage)
+
  80188f78: 0c061cd4 jal 0x80187350              # [[Undead Reversal]] (Heal = Damage)
  00188f7c: 00000000 nop                   
+
  80188f7c: 00000000 nop                   
  00188f80: 8fbf0010 lw r31,0x0010(r29)     
+
  80188f80: 8fbf0010 lw r31,0x0010(r29)     
  00188f84: 27bd0018 addiu r29,r29,0x 0018
+
  80188f84: 27bd0018 addiu r29,r29,0x0018
  00188f88: 03e00008 jr r31                 
+
  80188f88: 03e00008 jr r31                 
  00188f8c: 00000000 nop
+
  80188f8c: 00000000 nop
 +
=== Alternative notes ===
 +
80188f38: 27bdffe8 addiu r29,r29,-0x0018   
 +
80188f3c: afbf0010 sw r31,0x0010(r29)     
 +
80188f40: 0c061760 jal 0x80185d80          |{{f/jal|Store MA and X|Store MA and X}} Set Ability XA = Attacker's MA and YA = used Ability X
 +
80188f44: 00000000 nop                      |
 +
80188f48: 0c0617ff jal 0x80185ffc          |{{f/jal|Elemental Strengthen|Elemental Strengthen}} XA +25% if used Ability elements is strengthened
 +
80188f4c: 00000000 nop                     |
 +
80188f50: 0c062200 jal 0x80188800          |{{f/jal|MA + X|XA + YA becomes Hit% (friendly spell)}} Modify XA (Support/Compatibility) Uses XA+YA as Hit% (Influenced by Faith) returns r2 = 0x00 if Attack hits
 +
80188f54: 00000000 nop                      |
 +
80188f58: 14400009 bne r2,r0,0x80188f80    {{f/Cond|if Attacks hits}}
 +
80188f5c: 00000000 nop                          |
 +
80188f60: 0c062b37 jal 0x8018acdc              |{{f/jal|Apply Status and Check Undead#Alternative notes|Apply Status and Check Undead}} Nullify Action if Status infliction fails and Target is not undead
 +
80188f64: 00000000 nop                          |
 +
80188f68: 10400005 beq r2,r0,0x80188f80        {{f/Cond|If Status infliction succeed}}
 +
80188f6c: 00000000 nop                              |
 +
80188f70: 0c061989 jal 0x80186624                  |{{f/jal|Calculate HP% damage|Calculate HP% damage}} Set Target Current Action HP damage to [Used Ability Y]% of Target max HP
 +
80188f74: 00000000 nop                              |
 +
80188f78: 0c061cd4 jal 0x80187350                  |{{f/jal|Undead Reversal|Undead Reversal}} Switch HP damage to HP recovery if Target isn't undead / Else Nullify 0x80193860
 +
80188f7c: 00000000 nop                              |
 +
80188f80: 8fbf0010 lw r31,0x0010(r29)      END
 +
80188f84: 27bd0018 addiu r29,r29,0x0018
 +
80188f88: 03e00008 jr r31
 +
80188f8c: 00000000 nop
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 12:22, 16 April 2022

[0d]
80188f38: 27bdffe8 addiu r29,r29,-0x0018
80188f3c: afbf0010 sw r31,0x0010(r29)
80188f40: 0c061760 jal 0x80185d80              # Store MA and X
80188f44: 00000000 nop                   
80188f48: 0c0617ff jal 0x80185ffc              # Elemental Strengthen
80188f4c: 00000000 nop                   
80188f50: 0c062200 jal 0x80188800              # result = MA + X   // Calculate (MA + X)*Faith% 
80188f54: 00000000 nop                   
80188f58: 14400009 bne r2,r0,0x80188f80        # if (result != 0) return;
80188f5c: 00000000 nop                   
80188f60: 0c062b37 jal 0x8018acdc              # result = Apply Status and Check Undead 
80188f64: 00000000 nop                   
80188f68: 10400005 beq r2,r0,0x80188f80        # if (result == 0) return;
80188f6c: 00000000 nop                   
80188f70: 0c061989 jal 0x80186624              # Calculate HP% damage
80188f74: 00000000 nop                   
80188f78: 0c061cd4 jal 0x80187350              # Undead Reversal (Heal = Damage)
80188f7c: 00000000 nop                   
80188f80: 8fbf0010 lw r31,0x0010(r29)    
80188f84: 27bd0018 addiu r29,r29,0x0018 
80188f88: 03e00008 jr r31                
80188f8c: 00000000 nop

Alternative notes

80188f38: 27bdffe8 addiu r29,r29,-0x0018    
80188f3c: afbf0010 sw r31,0x0010(r29)       
80188f40: 0c061760 jal 0x80185d80           |-->Store MA and X Set Ability XA = Attacker's MA and YA = used Ability X
80188f44: 00000000 nop                      |
80188f48: 0c0617ff jal 0x80185ffc           |-->Elemental Strengthen XA +25% if used Ability elements is strengthened
80188f4c: 00000000 nop                      |
80188f50: 0c062200 jal 0x80188800           |-->XA + YA becomes Hit% (friendly spell) Modify XA (Support/Compatibility) Uses XA+YA as Hit% (Influenced by Faith) returns r2 = 0x00 if Attack hits
80188f54: 00000000 nop                      |
80188f58: 14400009 bne r2,r0,0x80188f80     #if Attacks hits
80188f5c: 00000000 nop                          |
80188f60: 0c062b37 jal 0x8018acdc               |-->Apply Status and Check Undead Nullify Action if Status infliction fails and Target is not undead
80188f64: 00000000 nop                          |
80188f68: 10400005 beq r2,r0,0x80188f80         #If Status infliction succeed
80188f6c: 00000000 nop                              |
80188f70: 0c061989 jal 0x80186624                   |-->Calculate HP% damage Set Target Current Action HP damage to [Used Ability Y]% of Target max HP
80188f74: 00000000 nop                              |
80188f78: 0c061cd4 jal 0x80187350                   |-->Undead Reversal Switch HP damage to HP recovery if Target isn't undead / Else Nullify 0x80193860
80188f7c: 00000000 nop                              |
80188f80: 8fbf0010 lw r31,0x0010(r29)       END
80188f84: 27bd0018 addiu r29,r29,0x0018
80188f88: 03e00008 jr r31 
80188f8c: 00000000 nop

Return locations

Battle.bin
0018b97c - Pre Formula Setup