Undead Absorb Attack

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

If Target is Undead : HP damage becomes HP recovery, Attack Type becomes HP recovery, Clear 1st Set of inflicted status

Note : there is a check for Death immunity which seems useless (Death being inflictable already checked in previous routines, and there's no other calling routines)
------------------------------------------------------------------------------------------------------------------------
001873d8: 3c038019 lui r3,0x8019            |
001873dc: 8c632d98 lw r3,0x2d98(r3)         |r3 = Target data pointer
001873e0: 27bdffe8 addiu r29,r29,-0x0018    |
001873e4: afbf0010 sw r31,0x0010(r29)       |
001873e8: 90620058 lbu r2,0x0058(r3)        |r2 = Target current status (1st set)
001873ec: 00000000 nop                      |
001873f0: 30420010 andi r2,r2,0x0010        |r2 = 0x10 if Target is undead
001873f4: 1040000c beq r2,r0,0x00187428     #If Target is Undead
001873f8: 34020040 ori r2,r0,0x0040             |r2 = 0x40 (Hp recovery Attack type)
001873fc: 3c038019 lui r3,0x8019                |
00187400: 8c632d90 lw r3,0x2d90(r3)             |r3 = Target Current Action (TCA) data pointer
00187404: 00000000 nop                          |
00187408: a0620025 sb r2,0x0025(r3)             |Store TCA Attack Type = Hp recory (disables other flags)
0018740c: 94620004 lhu r2,0x0004(r3)            |r2 = TCA HP damage
00187410: 3c048019 lui r4,0x8019                |
00187414: 8c842d90 lw r4,0x2d90(r4)             |r4 = TCA data pointer
00187418: a4600004 sh r0,0x0004(r3)             |Nullify TCA HP damage
0018741c: a4620006 sh r2,0x0006(r3)             |Set TCA HP recovery = previous HP damage
00187420: 08061d17 j 0x0018745c                 >>Jump to end
00187424: a080001b sb r0,0x001b(r4)             |Clear TCA Status infliction (1st set)
00187428: 90620053 lbu r2,0x0053(r3)        |r2 = Target Status immunity (1st set)
0018742c: 00000000 nop                      |
00187430: 30420020 andi r2,r2,0x0020        |r2 = 0x20 if Target is immune to death
00187434: 10400005 beq r2,r0,0x0018744c     #If Target is immune to death
00187438: 34020080 ori r2,r0,0x0080         |r2 = 0x80 (HP damage Attack Type)
0018743c: 0c0610c3 jal 0x0018430c               |-->Force attack miss
00187440: 00000000 nop                          |
00187444: 08061d17 j 0x0018745c                 >>Jump to end
00187448: 00000000 nop                          |
                                            #Else : Target is not immune to death
0018744c: 3c038019 lui r3,0x8019                |
00187450: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00187454: 00000000 nop                          |
00187458: a0620025 sb r2,0x0025(r3)             |Set Attack type = HP damage (disables other flags)
0018745c: 8fbf0010 lw r31,0x0010(r29)       END
00187460: 27bd0018 addiu r29,r29,0x0018     
00187464: 03e00008 jr r31

Return Locations

Battle.bin
00189074: 0E Dmg_(Y)% Hit_F(MA+X)% 100% Status Hide Status