Weapon Element Strengthen

From Final Fantasy Hacktics Wiki
Revision as of 14:54, 26 March 2022 by Orkney (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
No Parameters - Returns Nothing

Checks if Ability's Weapon Element (0x80193904) is strengthened - then Increase Ability XA (0x801938ce)  : 125% of initial XA
------------------------------------------------------------------------------------------------------------------------------
00185fa4: 3c028019 lui r2,0x8019            
00185fa8: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker's Data Pointer
00185fac: 3c038019 lui r3,0x8019            |
00185fb0: 90633904 lbu r3,0x3904(r3)        |r3 = Current Ability Weapon's Element  0x80193904 / 80193904
00185fb4: 90420071 lbu r2,0x0071(r2)        |r2 Attacker's Elements Strengthened byte
00185fb8: 00000000 nop                      |
00185fbc: 00431024 and r2,r2,r3             |r2 <> 0x00 if Ability Weapon Element is Strengthened
00185fc0: 1040000c beq r2,r0,0x00185ff4     #If Weapon's Element is Strengthened /Else branch to END
00185fc4: 00000000 nop                          |
00185fc8: 3c038019 lui r3,0x8019                |
00185fcc: 846338ce lh r3,0x38ce(r3)             |r3 = Current Ability XA  0x801938ce / 801938ce
00185fd0: 00000000 nop                          |
00185fd4: 00031080 sll r2,r3,0x02               |XA * 4
00185fd8: 00431021 addu r2,r2,r3                |XA * 5
00185fdc: 04410002 bgez r2,0x00185fe8           #If XA < 0
00185fe0: 00000000 nop                              |
00185fe4: 24420003 addiu r2,r2,0x0003               |Min XA = 3
00185fe8: 00021083 sra r2,r2,0x02               |r2 = XA * 5 / 4
00185fec: 3c018019 lui r1,0x8019                |
00185ff0: a42238ce sh r2,0x38ce(r1)             |Store Strengthened XA
00185ff4: 03e00008 jr r31                       
00185ff8: 00000000 nop                      END  

Return Locations

Battle.bin
00188658: Weapon Damage Calculation
00188c64: 04 Magic Gun
00189b48: 2D Dmg_(PA*(WP+Y)) 100% Status
00189c0c: 2E Equipped:Break Dmg_(PA*WP)