MA + X
Jump to navigation
Jump to search
No Parameters Returns r2 = 0x00 if Attack hits / 0x01 if Attack misses Modify XA (Support/Compatibility) Add XA and YA to becomes Hit% (it is stored in Target Current Action HP damage (0x04)) Modify Hit% with Faith (while sotred in HP damage) Roll Hit% Vs Random (from 0 to 100) - Returns r2 = 0x01 if Attack misses - Returns r2 = 0x00 if Attack hits Note : this is the accuracy formula for friendly spells (no magic defense up mechanics nor status effects on XA) ----------------------------------------------------------------------------------------------- 00188800: 27bdffe8 addiu r29,r29,-0x0018 | 00188804: afbf0010 sw r31,0x0010(r29) | 00188808: 0c061881 jal 0x00186204 |-->Magic Attack Up routine Ability XA +33% If Attacker uses Magic Attack Up 0018880c: 00000000 nop | 00188810: 0c061259 jal 0x00184964 |-->Compatibility Alters XA (-50% to +50%) based on compatibility 00188814: 00000000 nop | 00188818: 0c061967 jal 0x0018659c |-->Set XA + YA for Status Formulas (Stupid section) XA+YA becomes TCA HP damage (YA is processed via compatibility) 0018881c: 00000000 nop | 00188820: 0c061c54 jal 0x00187150 |-->Faith Calculation HP damage becomes Base HP damage * Target faith/100 * Attacker faith/100 00188824: 00000000 nop | 00188828: 0c061d44 jal 0x00187510 |-->Uses_HP_damage_as_Action_hit%25 HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails 0018882c: 00000000 nop | 00188830: 3c028019 lui r2,0x8019 | 00188834: 8c422d90 lw r2,0x2d90(r2) |r2 Target current action (TCA) data pointer 00188838: 00000000 nop | 0018883c: 90420000 lbu r2,0x0000(r2) |r2 = TCA Hit flag (0x00 if miss, 0x01 if hit) 00188840: 00000000 nop | 00188844: 2c420001 sltiu r2,r2,0x0001 |r2 = 0x01 if Hit flag = 0x00 (miss) 00188848: 8fbf0010 lw r31,0x0010(r29) 0018884c: 27bd0018 addiu r29,r29,0x0018 00188850: 03e00008 jr r31 00188854: 00000000 nop
Return locations
00188ed8: Formula 0b : Hit F(MA+X)% 00188f58: Formula 0d : Heal (Y)% Hit F(MA+X)% 00189144: Formula 12 : Set Quick Hit F(MA+X)%