Convert HP Damage into MP Recovery

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

Convert HP Damage into MP Recovery (Formula 54)

No Parameters - Returns Nothing 
---------------------------------------------------------------------------------------------------------------------
001874ec: 3c028019 lui r2,0x8019            |
001874f0: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
001874f4: 00000000 nop                      |
001874f8: 94440004 lhu r4,0x0004(r2)        |r4 = TCA HP damage
001874fc: 34030010 ori r3,r0,0x0010         |r3 = 0x10
00187500: a4400004 sh r0,0x0004(r2)         |Nullify TCA HP damage
00187504: a0430025 sb r3,0x0025(r2)         |Set TCA Attack type to MP recovery
00187508: 03e00008 jr r31                   |
0018750c: a444000a sh r4,0x000a(r2)         |Store previous HP damage as MP recovery

Return Locations

Battle.bin
0018a688: 54 HealMP_(MA*Y)