Store MA and PA + Y / 2

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

Store MA and PA + Y / 2

No parameters - Returns Nothing

Set Current Ability XA = Attacker's MA
Set Current Ability YA = (Attacker's PA + used Ability Y)/2
--------------------------------------------------------------------------
00185d40: 3c038019 lui r3,0x8019            |
00185d44: 8c632d94 lw r3,0x2d94(r3)         |r3 = Attacker data pointer
00185d48: 00000000 nop                      |
00185d4c: 90620037 lbu r2,0x0037(r3)        |r2 = Attacker's MA
00185d50: 3c018019 lui r1,0x8019            |
00185d54: a42238ce sh r2,0x38ce(r1)         |Store MA as Current Ability XA
00185d58: 90620036 lbu r2,0x0036(r3)        |r2 = Attacker's PA
00185d5c: 3c038019 lui r3,0x8019            |
00185d60: 906338fa lbu r3,0x38fa(r3)        |r3 = Current Ability used Ability Y
00185d64: 00000000 nop                      |
00185d68: 00431021 addu r2,r2,r3            |PA + Y
00185d6c: 00021043 sra r2,r2,0x01           |PA + Y / 2
00185d70: 3c018019 lui r1,0x8019            |
00185d74: a42238d0 sh r2,0x38d0(r1)         |Store (PA + Y) / 2 as current ability YA
00185d78: 03e00008 jr r31                   
00185d7c: 00000000 nop    

Return Locations

Battle.bin
001896d4: 24 Dmg_((PA+Y)/2*MA)