09 Dmg (Y/100)% Hit F(MA+X)%

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
00188df4: 27bdffe8 addiu r29,r29,-0x0018    |
00188df8: afbf0010 sw r31,0x0010(r29)       |
00188dfc: 0c06216e jal 0x001885b8           |-->Magical Evade Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
00188e00: 00000000 nop                      |
00188e04: 14400018 bne r2,r0,0x00188e68     #If Atack hits
00188e08: 00000000 nop                          |
00188e0c: 0c062289 jal 0x00188a24               |-->Calculate Accuracy for Magical  Set XA and YA, applies XA changes (Status, Compat, Support,element), uses XA+YA as Hit% (Modified by faith) / Returns r2
00188e10: 00000000 nop                          |
00188e14: 14400014 bne r2,r0,0x00188e68         #If Attack hits
00188e18: 00000000 nop                              |
00188e1c: 0c061989 jal 0x00186624                   |-->Calculate HP% damage Set Target Current Action HP damage to [Used Ability Y]% of Target max HP
00188e20: 00000000 nop                              |
00188e24: 0c061bb4 jal 0x00186ed0                   |-->Weather Elemental effects  +25% HP damage For Thunder and Ice or -25% damage For Fire depending on the weather
00188e28: 00000000 nop                              |
00188e2c: 0c061bfe jal 0x00186ff8                   |-->Ability Elemental? Checks For Target Elemental Resistance/Weakness/Absorption - Deals with [Oil + Fire]  and [Float + Earth]
00188e30: 00000000 nop                              |
00188e34: 3c028019 lui r2,0x8019                    |
00188e38: 8c422d90 lw r2,0x2d90(r2)                 |r2 = TCA data pointer
00188e3c: 00000000 nop                              |
00188e40: 90420000 lbu r2,0x0000(r2)                |r2 = TCA Hit flag
00188e44: 00000000 nop                              |
00188e48: 10400007 beq r2,r0,0x00188e68             #If Attack hits  (Hit flag is set to 0x00 if Ability element is canceled)
00188e4c: 00000000 nop                                  |
00188e50: 0c0621c7 jal 0x0018871c                       |-->Elemental Absorb and status roll Turns HP damage into recovery (if element is absorbed) / returns r2 = 0x00 if proc is triggered
00188e54: 00000000 nop                                  |
00188e58: 14400003 bne r2,r0,0x00188e68                 #If Proc is triggered
00188e5c: 00000000 nop                                      |
00188e60: 0c061fad jal 0x00187eb4                           |-->Apply status (to action) - (Preserve hit status, evade type, hit %) Update Target Current Action status infliction/Removal
00188e64: 00000000 nop                                      
00188e68: 8fbf0010 lw r31,0x0010(r29)      END
00188e6c: 27bd0018 addiu r29,r29,0x0018       
00188e70: 03e00008 jr r31                   
00188e74: 00000000 nop

Return location

Battle.bin
 8018b97c - Pre Formula Setup