Weapon Damage Calculation
Jump to navigation
Jump to search
No Parameters Returns r2 = 0x00 if Proc is Triggered (else 0x00) Set Ability XA and YA, turns XA and YA in HP damage Deals with Elements : - If Absorbed : HP damage becomes HP recovery - If Nullified : Nullify Action - If Halved/Weakness : Modify HP damage Roll Proc Effects (19% of chances) : returns r2 = 0x00 if Proc is Triggered --------------------------------------------------------------------------------------- 00188638: 27bdffe8 addiu r29,r29,-0x0018 | 0018863c: afbf0010 sw r31,0x0010(r29) | 00188640: 0c0616a7 jal 0x00185a9c |-->Base XA Calculation Set XA and YA (Based on Weapon Type) 00188644: 00000000 nop | 00188648: 0c0617e0 jal 0x00185f80 |-->Charge Calculation Add Power Charge to XA 0018864c: 00000000 nop | 00188650: 0c0617e9 jal 0x00185fa4 |-->Weapon Element Strengthen XA + 25% if Weapon Element is strengthened 00188654: 00000000 nop | 00188658: 0c0621a9 jal 0x001886a4 |-->Damage Calculation Modify XA (Support-Statuses-Compat-Critical Hit), Might add Knockback, Set TCA HP damage to XA*YA 0018865c: 00000000 nop | 00188660: 0c061bf4 jal 0x00186fd0 |-->Elemental Damage Modification (Prep) Cancel Action // Enable Absorption flags and/or Modify HP damage 00188664: 00000000 nop | 00188668: 3c028019 lui r2,0x8019 | 0018866c: 8c422d90 lw r2,0x2d90(r2) |r2 =Target Current Action (TCA) Data Pointer 00188670: 00000000 nop | 00188674: 90420000 lbu r2,0x0000(r2) |r2 = TCA Hit flag Set to Miss (0x00) if Nullified by Elemental routines 00188678: 00000000 nop | 0018867c: 10400005 beq r2,r0,0x00188694 #If Target Current Action is Not Nullified by elements 00188680: 34020001 ori r2,r0,0x0001 |r2 = 0x01 00188684: 0c061c3f jal 0x001870fc |-->Elemental Absorption HP damage becomes HP recovery - Changes Attack Type from 0x80 to 0x40 (HP recovery) 00188688: 00000000 nop | 0018868c: 0c062130 jal 0x001884c0 |-->Conditional Status Proc Roll (19%) Returns r2 = 0x00 if Proc is triggered (and enables TCA special flag 2 0x02) 00188690: 00000000 nop | 00188694: 8fbf0010 lw r31,0x0010(r29) END 00188698: 27bd0018 addiu r29,r29,0x0018 0018869c: 03e00008 jr r31 001886a0: 00000000 nop
Return Locations
00188b84: Formula 01 - Dmg (Weapon) 00188bc4: Formula 02 - Dmg (Weapon)