Status Initialization

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Status Initialization
0005d414: 27bdffe8 addiu r29,r29,0xffe8
0005d418: afb00010 sw r16,0x0010(r29)
0005d41c: 00808021 addu r16,r4,r0		r16 = Unit's Data Pointer
0005d420: 00002821 addu r5,r0,r0		Counter = 0
0005d424: afbf0014 sw r31,0x0014(r29)
0005d428: 02052021 addu r4,r16,r5		Pointer += Counter
0005d42c: 24a50001 addiu r5,r5,0x0001		Counter ++
0005d430: 9082004e lbu r2,0x004e(r4)		Load Unit's Innate Statuses
0005d434: 90830058 lbu r3,0x0058(r4)		Load Unit's Current Statuses
0005d438: 00021027 nor r2,r0,r2			(innate added to inflicted later)
0005d43c: 00621824 and r3,r3,r2			Remove Unit's Innate Statuses from Current Statuses
0005d440: 28a20005 slti r2,r5,0x0005
0005d444: 1440fff8 bne r2,r0,0x0005d428		Branch if Counter < 5
0005d448: a08301bb sb r3,0x01bb(r4)		Store new Inflicted Statuses (current that aren't innate)
0005d44c: 0c01751c jal 0x0005d470		Nullify CT/Initialize Death Counter
0005d450: 02002021 addu r4,r16,r0		r4 = Unit's Data Pointer
0005d454: 0c017534 jal 0x0005d4d0		Float/Current Statuses/Status Immunities/Status CT
0005d458: 02002021 addu r4,r16,r0		r4 = Unit's Data Pointer
0005d45c: 8fbf0014 lw r31,0x0014(r29)
0005d460: 8fb00010 lw r16,0x0010(r29)
0005d464: 27bd0018 addiu r29,r29,0x0018
0005d468: 03e00008 jr r31
0005d46c: 00000000 nop


Return Locations

0005e000: Minimum SP Capping/War Trophy Nulling/Status Initialization