1A Hit F(MA+Y)% // -PA/MA/SP (X)

From Final Fantasy Hacktics Wiki
(Redirected from 001892ac - 00189338)
Jump to navigation Jump to search
001892ac: 27bdffe8 addiu r29,r29,-0x0018    |
001892b0: afbf0010 sw r31,0x0010(r29)       |
001892b4: 0c06216e jal 0x001885b8           |-->Magical Evade Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
001892b8: 00000000 nop                      |
001892bc: 1440001b bne r2,r0,0x0018932c     #If Attack is not evaded
001892c0: 00000000 nop                          |
001892c4: 0c061725 jal 0x00185c94               |-->Store MA and Y XA = Attacker's MA and YA = used Ability Y
001892c8: 00000000 nop                          |
001892cc: 0c0617ff jal 0x00185ffc               |-->Elemental Strengthen XA + 25% if used Ability Element is strengthened
001892d0: 00000000 nop                          |
001892d4: 0c0621d1 jal 0x00188744               |-->Magical Support/Status/Compat Modify Ability XA (Support Abilities, Status, Compatibility)
001892d8: 00000000 nop                          |
001892dc: 0c061967 jal 0x0018659c               |-->Set XA + YA for Status Formulas XA+YA becomes TCA HP damage (YA is processed via compatibility)
001892e0: 00000000 nop                          |
001892e4: 0c061c54 jal 0x00187150               |-->Faith Calculation HP damage becomes Base HP damage * Target faith/100 * Attacker faith/100
001892e8: 00000000 nop                          |
001892ec: 0c061d44 jal 0x00187510               |-->Uses HP damage as Action hit% HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
001892f0: 00000000 nop                          |
001892f4: 3c038019 lui r3,0x8019                |
001892f8: 8c632d90 lw r3,0x2d90(r3)             |r3 = Targeet Current Action (TCA) data pointer
001892fc: 00000000 nop                          |
00189300: 90620000 lbu r2,0x0000(r3)            |r2 = TCA hit flag
00189304: 00000000 nop                          |
00189308: 14400006 bne r2,r0,0x00189324         #If Attack Miss
0018930c: 00000000 nop                              |
00189310: 94620010 lhu r2,0x0010(r3)                |r2 = TCA special flags
00189314: 00000000 nop                              |
00189318: 3042fffb andi r2,r2,0xfffb                |r2 = Specials flags without special flag 1 0x04 (Break Item) ???
0018931c: 080624cb j 0x0018932c                     >>Jump to END
00189320: a4620010 sh r2,0x0010(r3)                 |Deprives TCA special flag from Break Item flag
                                                #Else : Attack Hits
00189324: 0c061e18 jal 0x00187860                   |-->Determine which stat will be reduced Reduces stat based on Ability ID / Enhance Attack type with pseudo status flag
00189328: 00000000 nop                              |
0018932c: 8fbf0010 lw r31,0x0010(r29)       END
00189330: 27bd0018 addiu r29,r29,0x0018     
00189334: 03e00008 jr r31                   
00189338: 00000000 nop                      

Return location

Battle.bin
0018b97c - Pre Formula Setup