Difference between revisions of "AI Check Options - Stop/Don't Act/Sleep/Chicken/Charm"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Corrected Documentation (on what statuses are being searched for here.))
Line 28: Line 28:
 
  0019992c: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  0019992c: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199930: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 
  00199930: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
  00199934: 3406001e ori r6,r0,0x001e r6 = 0x1e (Regen)
+
  00199934: 3406001e ori r6,r0,0x001e r6 = 0x1e (Stop)
  00199938: 1440001d bne r2,r0,0x001999b0 Branch if Regen Can't be added
+
  00199938: 1440001d bne r2,r0,0x001999b0 Branch if Stop Can't be added
 
  0019993c: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  0019993c: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  00199940: 3c04801a lui r4,0x801a
 
  00199940: 3c04801a lui r4,0x801a
Line 35: Line 35:
 
  00199948: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199948: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  0019994c: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 
  0019994c: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
  00199950: 34060025 ori r6,r0,0x0025 r6 = 0x25 (Charm)
+
  00199950: 34060025 ori r6,r0,0x0025 r6 = 0x25 (Don't Act)
  00199954: 14400016 bne r2,r0,0x001999b0 Branch if Charm can't be added
+
  00199954: 14400016 bne r2,r0,0x001999b0 Branch if Don't Act can't be added
 
  00199958: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  00199958: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  0019995c: 3c04801a lui r4,0x801a
 
  0019995c: 3c04801a lui r4,0x801a
Line 42: Line 42:
 
  00199964: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199964: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199968: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 
  00199968: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
  0019996c: 34060023 ori r6,r0,0x0023 r6 = 0x23 (Don't Move)
+
  0019996c: 34060023 ori r6,r0,0x0023 r6 = 0x23 (Sleep)
  00199970: 1440000f bne r2,r0,0x001999b0 Branch if Don't Move can't be added
+
  00199970: 1440000f bne r2,r0,0x001999b0 Branch if Sleep can't be added
 
  00199974: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  00199974: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
 
  00199978: 3c04801a lui r4,0x801a
 
  00199978: 3c04801a lui r4,0x801a
Line 49: Line 49:
 
  00199980: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199980: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199984: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 
  00199984: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
  00199988: 34060015 ori r6,r0,0x0015 r6 = 0x15 (Reraise)
+
  00199988: 34060015 ori r6,r0,0x0015 r6 = 0x15 (Chicken)
  0019998c: 10400003 beq r2,r0,0x0019999c Branch if Reraise can be added
+
  0019998c: 10400003 beq r2,r0,0x0019999c Branch if Chicken can be added
 
  00199990: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199990: 02202821 addu r5,r17,r0 r5 = Unit's Data Pointer
 
  00199994: 0806666c j 0x001999b0
 
  00199994: 0806666c j 0x001999b0
Line 57: Line 57:
 
  001999a0: 90840213 lbu r4,0x0213(r4) Load Clockticks Required
 
  001999a0: 90840213 lbu r4,0x0213(r4) Load Clockticks Required
 
  001999a4: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 
  001999a4: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
  001999a8: 34060022 ori r6,r0,0x0022 r6 = 0x22 (Don't Act)
+
  001999a8: 34060022 ori r6,r0,0x0022 r6 = 0x22 (Charm)
  001999ac: 0002102b sltu r2,r0,r2 r2 = Success if Don't Act can be added
+
  001999ac: 0002102b sltu r2,r0,r2 r2 = Success if Charm can be added
 
  001999b0: 8fbf0018 lw r31,0x0018(r29) (useless since 1 = 1 and 0 = 0 here)
 
  001999b0: 8fbf0018 lw r31,0x0018(r29) (useless since 1 = 1 and 0 = 0 here)
 
  001999b4: 8fb10014 lw r17,0x0014(r29)
 
  001999b4: 8fb10014 lw r17,0x0014(r29)

Revision as of 01:30, 29 March 2017

001998c8: 27bdffe0 addiu r29,r29,0xffe0
001998cc: 00041100 sll r2,r4,0x04		ID * 16
001998d0: afbf0018 sw r31,0x0018(r29)
001998d4: afb10014 sw r17,0x0014(r29)
001998d8: afb00010 sw r16,0x0010(r29)
001998dc: 3c01801a lui r1,0x801a
001998e0: 00220821 addu r1,r1,r2
001998e4: 90220bf8 lbu r2,0x0bf8(r1)		Load Enemy Flag
001998e8: 00000000 nop
001998ec: 10400029 beq r2,r0,0x00199994		Branch if Unit is an Ally
001998f0: 000410c0 sll r2,r4,0x03		ID * 8
001998f4: 00441023 subu r2,r2,r4		ID * 7
001998f8: 00021180 sll r2,r2,0x06		ID * 448
001998fc: 3c038019 lui r3,0x8019
00199900: 246308cc addiu r3,r3,0x08cc
00199904: 00438821 addu r17,r2,r3		r17 = Unit's Data Pointer
00199908: 3c10801a lui r16,0x801a
0019990c: 92100213 lbu r16,0x0213(r16)		Load Clockticks Required
00199910: 0c0666e6 jal 0x00199b98		Calculate Clockticks Until Unit Acts
00199914: 02202021 addu r4,r17,r0		r4 = Unit's Data Pointer
00199918: 0202802a slt r16,r16,r2		(Act after Target)
0019991c: 16000024 bne r16,r0,0x001999b0	Branch if Clockticks Required < Target's Clockticks
00199920: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
00199924: 3c04801a lui r4,0x801a
00199928: 90840213 lbu r4,0x0213(r4)		Load Clockticks Required
0019992c: 02202821 addu r5,r17,r0		r5 = Unit's Data Pointer
00199930: 0c067bc9 jal 0x0019ef24		Check if Status Should/Can be Added
00199934: 3406001e ori r6,r0,0x001e		r6 = 0x1e (Stop)
00199938: 1440001d bne r2,r0,0x001999b0		Branch if Stop Can't be added
0019993c: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
00199940: 3c04801a lui r4,0x801a
00199944: 90840213 lbu r4,0x0213(r4)		Load Clockticks Required
00199948: 02202821 addu r5,r17,r0		r5 = Unit's Data Pointer
0019994c: 0c067bc9 jal 0x0019ef24		Check if Status Should/Can be Added
00199950: 34060025 ori r6,r0,0x0025		r6 = 0x25 (Don't Act)
00199954: 14400016 bne r2,r0,0x001999b0		Branch if Don't Act can't be added
00199958: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
0019995c: 3c04801a lui r4,0x801a
00199960: 90840213 lbu r4,0x0213(r4)		Load Clockticks Required
00199964: 02202821 addu r5,r17,r0		r5 = Unit's Data Pointer
00199968: 0c067bc9 jal 0x0019ef24		Check if Status Should/Can be Added
0019996c: 34060023 ori r6,r0,0x0023		r6 = 0x23 (Sleep)
00199970: 1440000f bne r2,r0,0x001999b0		Branch if Sleep can't be added
00199974: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
00199978: 3c04801a lui r4,0x801a
0019997c: 90840213 lbu r4,0x0213(r4)		Load Clockticks Required
00199980: 02202821 addu r5,r17,r0		r5 = Unit's Data Pointer
00199984: 0c067bc9 jal 0x0019ef24		Check if Status Should/Can be Added
00199988: 34060015 ori r6,r0,0x0015		r6 = 0x15 (Chicken)
0019998c: 10400003 beq r2,r0,0x0019999c		Branch if Chicken can be added
00199990: 02202821 addu r5,r17,r0		r5 = Unit's Data Pointer
00199994: 0806666c j 0x001999b0
00199998: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
0019999c: 3c04801a lui r4,0x801a
001999a0: 90840213 lbu r4,0x0213(r4)		Load Clockticks Required
001999a4: 0c067bc9 jal 0x0019ef24		Check if Status Should/Can be Added
001999a8: 34060022 ori r6,r0,0x0022		r6 = 0x22 (Charm)
001999ac: 0002102b sltu r2,r0,r2		r2 = Success if Charm can be added
001999b0: 8fbf0018 lw r31,0x0018(r29)		(useless since 1 = 1 and 0 = 0 here)
001999b4: 8fb10014 lw r17,0x0014(r29)
001999b8: 8fb00010 lw r16,0x0010(r29)
001999bc: 27bd0020 addiu r29,r29,0x0020
001999c0: 03e00008 jr r31
001999c4: 00000000 nop