Lock Equipment And Abilities

From Final Fantasy Hacktics Wiki
Revision as of 03:20, 29 September 2024 by Pride (talk | contribs)
Jump to navigation Jump to search
# Parameters:
#  r4: party id (maybe some special formation unit id)

# Return values:
#   1: allow full item and ability options
#  -2: out on proposition (Locks ability screen, and item except for "list")
#  -3: monster skillset being used (Locks ability screen, and item except for "list")
#  -4: has ??? stats
#  -5: is a mime (Locks ability screen except for "learn," and item except for "list")
00125540: 27bdffe8 addiu r29,r29,0xffe8        #
00125544: 3c02801d lui r2,0x801d               #
00125548: 2442d5ec addiu r2,r2,-0x2A14         # r2 = formation data pointer
0012554c: 00042080 sll r4,r4,0x02              # prep word pointer
00125550: afb00010 sw r16,0x0010(r29)          #
00125554: 00828021 addu r16,r4,r2              # r16 = pointer to unit formation data
00125558: afbf0014 sw r31,0x0014(r29)          # 
0012555c: 8e030000 lw r3,0x0000(r16)           # unit
00125560: 00000000 nop                         #
00125564: 9062011f lbu r2,0x011f(r3)           # unit.proposition_status
00125568: 00000000 nop                         # 
0012556c: 14400018 bne r2,r0,0x001255d0        # if unit.proposition_status: 
00125570: 2402fffe addiu r2,r0,0xfffe          #   return -2

00125574: 8462003e lh r2,0x003e(r3)            # unit.monster_skillset
00125578: 00000000 nop                         # 
0012557c: 14400014 bne r2,r0,0x001255d0        # if unit.monster_skillset:
00125580: 2402fffd addiu r2,r0,0xfffd          #   return -3

00125584: 84640024 lh r4,0x0024(r3)            # unit.job_id
00125588: 0c0482e4 jal 0x00120b90              # isSpecialMonster = Special monster check(unit.job_id)
0012558c: 00000000 nop                         # 
00125590: 1440000f bne r2,r0,0x001255d0        # if isSpecialMonster:
00125594: 2402fffd addiu r2,r0,0xfffd          #   return -3

00125598: 8e040000 lw r4,0x0000(r16)           # unit
0012559c: 00000000 nop                         # 
001255a0: 90820070 lbu r2,0x0070(r4)           # unit.gender
001255a4: 00000000 nop                         # 
001255a8: 30420004 andi r2,r2,0x0004           # 
001255ac: 10400003 beq r2,r0,0x001255bc        # if unit.gender AND "??? stats":
                                               #
001255b0: 3403005d ori r3,r0,0x005d            # 
001255b4: 08049574 j 0x001255d0                #   return -4
001255b8: 2402fffc addiu r2,r0,0xfffc          # 

001255bc: 84840024 lh r4,0x0024(r4)            # unit.job_id
001255c0: 00000000 nop                         # 
001255c4: 10830002 beq r4,r3,0x001255d0        # if unit.job_id == MIME:
001255c8: 2402fffa addiu r2,r0,0xfffa          #   return -5
001255cc: 34020001 ori r2,r0,0x0001            # return 1
001255d0: 8fbf0014 lw r31,0x0014(r29)          # 
001255d4: 8fb00010 lw r16,0x0010(r29)          # 
001255d8: 27bd0018 addiu r29,r29,0x0018        # 
001255dc: 03e00008 jr r31                      # 
001255e0: 00000000 nop                         # 

Return Locations

0x0011acd8: 
0x0011ad60: 
0x0011b008: 
0x0011b8fc: 
0x0011de14: 
0x0011defc: 
0x0011e1a4: 
0x0011e73c: 
0x00124654: 
0x00125410: