MA + X without faith

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
No Parameters 

Returns r2 = 0x00 if Attack hits / Else 0x01

Set Ability XA and YA
Applies Magical modifiers to XA and Compatibility to XA and YA
Uses XA + YA as Hit% and Roll versus Random
--------------------------------------------------------------------------------------------
00188a84: 27bdffe8 addiu r29,r29,-0x0018    |
00188a88: afbf0010 sw r31,0x0010(r29)       |
00188a8c: 0c061760 jal 0x00185d80           |-->Store_MA_and_X Set Ability XA = Attacker's MA and YA = used Ability X
00188a90: 00000000 nop                      |
00188a94: 0c0617ff jal 0x00185ffc           |-->Elemental_Strengthen XA + 25% if used Ability Element is strengthened
00188a98: 00000000 nop                      |
00188a9c: 0c0621d1 jal 0x00188744           |-->Magical_Support/Status/Compat Modify Ability XA (Support Abilities, Status, Compatibility)
00188aa0: 00000000 nop                      |
00188aa4: 0c061967 jal 0x0018659c           |-->XA+YA for Accuracy XA+YA becomes TCA HP damage (YA is processed via compatibility) 
00188aa8: 00000000 nop                      |
00188aac: 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
00188ab0: 00000000 nop                      |
00188ab4: 3c028019 lui r2,0x8019            |
00188ab8: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
00188abc: 00000000 nop                      |
00188ac0: 90420000 lbu r2,0x0000(r2)        |r2 = TCA hit flag
00188ac4: 00000000 nop                      |
00188ac8: 2c420001 sltiu r2,r2,0x0001       |r2 = 0x01 if Attack miss / Else 0x00
00188acc: 8fbf0010 lw r31,0x0010(r29)       END
00188ad0: 27bd0018 addiu r29,r29,0x0018
00188ad4: 03e00008 jr r31
00188ad8: 00000000 nop

Return location

Battle.bin
00189fec: Formula 3D - Hit (MA+X)%
0018a124: Formula 41 - Hit (MA+X)%
0018a604: Formula 53 - Dmg (X)% Hit (MA+X)%
0018a6b8: Formula 55 - –PA (Y) Hit (MA+X)%
0018a718: Formula 56 - –MA (Y) Hit (MA+X)%
0018a928: Formula 59 - –Lvl(1) Hit (MA+X)%
0018ab78: Formula 62 - –Brave (Y) Hit (MA+X)%