Store ability/skillset data, set AI settings for ability
Jump to navigation
Jump to search
Store ability data, set AI settings for ability?
00197538: 27bdffd8 addiu r29,r29,0xffd8 0019753c: afb10014 sw r17,0x0014(r29) 00197540: 3c11801a lui r17,0x801a 00197544: 2631f3c4 addiu r17,r17,0xf3c4 00197548: afbf0020 sw r31,0x0020(r29) 0019754c: afb3001c sw r19,0x001c(r29) 00197550: afb20018 sw r18,0x0018(r29) 00197554: afb00010 sw r16,0x0010(r29) 00197558: 92220000 lbu r2,0x0000(r17) load skillset 0019755c: 3c03801a lui r3,0x801a 00197560: 9463f3c6 lhu r3,-0x0c3a(r3) load ability ID 00197564: 3c04801a lui r4,0x801a 00197568: 9084f3ca lbu r4,-0x0c36(r4) load item considered 0019756c: 92250000 lbu r5,0x0000(r17) load skillset 00197570: 3c01801a lui r1,0x801a 00197574: a020f3d8 sb r0,-0x0c28(r1) clear AI targeting flag 00197578: 3c01801a lui r1,0x801a 0019757c: a022f3e1 sb r2,-0x0c1f(r1) store skillset of last attack 00197580: 3c01801a lui r1,0x801a 00197584: a423f3e2 sh r3,-0x0c1e(r1) store ability ID 00197588: 3c01801a lui r1,0x801a 0019758c: a024f3e8 sb r4,-0x0c18(r1) store item considered 00197590: 3c018006 lui r1,0x8006 00197594: 00250821 addu r1,r1,r5 00197598: 90235cb4 lbu r3,0x5cb4(r1) load action menu byte 0019759c: 34020003 ori r2,r0,0x0003 001975a0: 14620053 bne r3,r2,0x 001976f0 branch if not equip change 001975a4: 00000000 nop
Equip Change
001975a8: 0c0088c3 jal 0x0002230c 001975ac: 00000000 nop 001975b0: 00401821 addu r3,r2,r0 001975b4: 04610002 bgez r3,0x 001975c0 001975b8: 34050001 ori r5,r0,0x0001 001975bc: 24620003 addiu r2,r3,0x0003 001975c0: 00021083 sra r2,r2,0x02 001975c4: 00021080 sll r2,r2,0x02 001975c8: 00621023 subu r2,r3,r2 001975cc: 3c01801a lui r1,0x801a 001975d0: 00220821 addu r1,r1,r2 001975d4: 9033f360 lbu r19,-0x0ca0(r1) 001975d8: 0c01698e jal 0x0005a638 store skillsets abilities 001975dc: 02602021 addu r4,r19,r0 001975e0: 0c0088c3 jal 0x0002230c 001975e4: 00408021 addu r16,r2,r0 001975e8: 00401821 addu r3,r2,r0 001975ec: 04610003 bgez r3,0x 001975fc 001975f0: 00029103 sra r18,r2,0x04 001975f4: 2462000f addiu r2,r3,0x000f 001975f8: 00029103 sra r18,r2,0x04 001975fc: 00121100 sll r2,r18,0x04 00197600: 00629023 subu r18,r3,r2 00197604: 00121040 sll r2,r18,0x01 00197608: 00501021 addu r2,r2,r16 0019760c: 94500000 lhu r16,0x0000(r2) 00197610: 00000000 nop 00197614: 1200ffe4 beq r16,r0,0x 001975a8 00197618: 001018c0 sll r3,r16,0x03 0019761c: 3c018006 lui r1,0x8006 00197620: 00230821 addu r1,r1,r3 00197624: 9022ebf7 lbu r2,-0x1409(r1) 00197628: 00000000 nop 0019762c: 30420080 andi r2,r2,0x0080 00197630: 1040ffdd beq r2,r0,0x 001975a8 00197634: 00701023 subu r2,r3,r16 00197638: 00021040 sll r2,r2,0x01 0019763c: 3c018006 lui r1,0x8006 00197640: 00220821 addu r1,r1,r2 00197644: 9022fbf5 lbu r2,-0x040b(r1) 00197648: 00000000 nop 0019764c: 30420040 andi r2,r2,0x0040 00197650: 1040ffd5 beq r2,r0,0x 001975a8 00197654: 02602821 addu r5,r19,r0 00197658: 92240e2e lbu r4,0x0e2e(r17) 0019765c: 0c066a94 jal 0x0019aa50 00197660: 02403021 addu r6,r18,r0 00197664: 1040ffd0 beq r2,r0,0x 001975a8 00197668: 00000000 nop 0019766c: a630001e sh r16,0x001e(r17) 00197670: 0c0088c3 jal 0x0002230c 00197674: 00000000 nop 00197678: 00401821 addu r3,r2,r0 0019767c: 04610003 bgez r3,0x 0019768c 00197680: 00028083 sra r16,r2,0x02 00197684: 24620003 addiu r2,r3,0x0003 00197688: 00028083 sra r16,r2,0x02 0019768c: 00101080 sll r2,r16,0x02 00197690: 00628023 subu r16,r3,r2 00197694: 92240e2e lbu r4,0x0e2e(r17) 00197698: 92250000 lbu r5,0x0000(r17) 0019769c: 0c066a94 jal 0x0019aa50 001976a0: 02003021 addu r6,r16,r0 001976a4: 1040fff2 beq r2,r0,0x 00197670 001976a8: 2602019e addiu r2,r16,0x019e 001976ac: a6220020 sh r2,0x0020(r17) 001976b0: 0c0088c3 jal 0x0002230c 001976b4: 00000000 nop 001976b8: 00403021 addu r6,r2,r0 001976bc: 04c10003 bgez r6,0x 001976cc 001976c0: 00021083 sra r2,r2,0x02 001976c4: 24c20003 addiu r2,r6,0x0003 001976c8: 00021083 sra r2,r2,0x02 001976cc: 00021080 sll r2,r2,0x02 001976d0: 00c28023 subu r16,r6,r2 001976d4: 92240e2e lbu r4,0x0e2e(r17) 001976d8: 92250000 lbu r5,0x0000(r17) 001976dc: 0c066a94 jal 0x0019aa50 001976e0: 26060004 addiu r6,r16,0x0004 001976e4: 1040fff2 beq r2,r0,0x 001976b0 001976e8: 260201a2 addiu r2,r16,0x01a2 001976ec: a6220022 sh r2,0x0022(r17)
if not equip change
001976f0: 8e23000c lw r3,0x000c(r17) load ai behavior flags 001976f4: 00000000 nop 001976f8: 30628000 andi r2,r3,0x8000 ignore range 001976fc: 1040001f beq r2,r0,0x 0019777c branch if not ignore range
if ignore range = true
00197700: 26300b4c addiu r16,r17,0x0b4c 00197704: 02002021 addu r4,r16,r0 00197708: 26250a74 addiu r5,r17,0x0a74 0019770c: 0c066ac2 jal 0x0019ab08 transfer halfword 00197710: 34060048 ori r6,r0,0x0048 00197714: 0c065f1a jal 0x 00197c68 00197718: 02002021 addu r4,r16,r0 0019771c: a2220cbc sb r2,0x0cbc(r17) 00197720: 92220cbc lbu r2,0x0cbc(r17) 00197724: 00000000 nop 00197728: 1040005e beq r2,r0,0x 001978a4 0019772c: 26300018 addiu r16,r17,0x0018 00197730: 26240b4c addiu r4,r17,0x0b4c 00197734: 92260cbc lbu r6,0x0cbc(r17) 00197738: 0c065ecb jal 0x 00197b2c 0019773c: 02002821 addu r5,r16,r0 00197740: 10400058 beq r2,r0,0x 001978a4 00197744: 02002021 addu r4,r16,r0 00197748: 92220cbc lbu r2,0x0cbc(r17) 0019774c: 00000000 nop 00197750: 2442ffff addiu r2,r2,0xffff 00197754: 0c066d3d jal 0x0019b4f4 00197758: a2220cbc sb r2,0x0cbc(r17) 0019775c: 14400053 bne r2,r0,0x 001978ac 00197760: 34020004 ori r2,r0,0x0004 00197764: 92220cbc lbu r2,0x0cbc(r17) 00197768: 00000000 nop 0019776c: 1440fff1 bne r2,r0,0x 00197734 00197770: 26240b4c addiu r4,r17,0x0b4c 00197774: 08065e31 j 0x 001978c4 00197778: 00001021 addu r2,r0,r0
0019777c: 30621000 andi r2,r3,0x1000 00197780: 1040000a beq r2,r0,0x 001977ac branch if not follow target 00197784: 00000000 nop 00197788: 0c0088c3 jal 0x0002230c 0019778c: 00000000 nop 00197790: 00021fc2 srl r3,r2,0x1f 00197794: 00431821 addu r3,r2,r3 00197798: 00031843 sra r3,r3,0x01 0019779c: 00031840 sll r3,r3,0x01 001977a0: 00431023 subu r2,r2,r3 001977a4: 08065dec j 0x 001977b0 001977a8: 24420005 addiu r2,r2,0x0005
001977ac: 34020005 ori r2,r0,0x0005 001977b0: 0c0670f5 jal 0x0019c3d4 001977b4: a2220026 sb r2,0x0026(r17) set ability targets panels 001977b8: 92220cbc lbu r2,0x0cbc(r17) load ?? 001977bc: 00000000 nop 001977c0: 1440000b bne r2,r0,0x 001977f0 001977c4: 26300c74 addiu r16,r17,0x0c74 001977c8: 92230026 lbu r3,0x0026(r17) load type of targeting flag 001977cc: 34020006 ori r2,r0,0x0006 001977d0: 14620003 bne r3,r2,0x 001977e0 branch if not follow target 001977d4: 34020005 ori r2,r0,0x0005 001977d8: 0c0670f5 jal 0x0019c3d4 001977dc: a2220026 sb r2,0x0026(r17) set targets panels 001977e0: 92220cbc lbu r2,0x0cbc(r17) 001977e4: 00000000 nop 001977e8: 1040002e beq r2,r0,0x 001978a4 001977ec: 26300c74 addiu r16,r17,0x0c74 001977f0: 26240b94 addiu r4,r17,0x0b94 001977f4: 92260cbc lbu r6,0x0cbc(r17) 001977f8: 0c065ecb jal 0x 00197b2c 001977fc: 26250018 addiu r5,r17,0x0018 00197800: 10400030 beq r2,r0,0x 001978c4 00197804: 00001021 addu r2,r0,r0 00197808: 92220cbc lbu r2,0x0cbc(r17) 0019780c: 00000000 nop 00197810: 2442ffff addiu r2,r2,0xffff 00197814: 0c065e57 jal 0x 0019795c 00197818: a2220cbc sb r2,0x0cbc(r17) 0019781c: 00409021 addu r18,r2,r0 00197820: 1240001c beq r18,r0,0x 00197894 00197824: 26240b4c addiu r4,r17,0x0b4c 00197828: 02002821 addu r5,r16,r0 0019782c: 0c065ecb jal 0x 00197b2c 00197830: 02403021 addu r6,r18,r0 00197834: 10400017 beq r2,r0,0x 00197894 00197838: 02002021 addu r4,r16,r0 0019783c: 92220c74 lbu r2,0x0c74(r17) load X 00197840: 92230c76 lbu r3,0x0c76(r17) load Y 00197844: 92260c75 lbu r6,0x0c75(r17) load level 00197848: 26250018 addiu r5,r17,0x0018 0019784c: a6220028 sh r2,0x0028(r17) store X 00197850: a623002c sh r3,0x002c(r17) store Y 00197854: 0c065e39 jal 0x 001978e4 00197858: a626002a sh r6,0x002a(r17) store level 0019785c: 92230026 lbu r3,0x0026(r17) load type of targeting 00197860: a2220017 sb r2,0x0017(r17) store ??? (return from 1978e4) 00197864: 34020006 ori r2,r0,0x0006 00197868: 14620012 bne r3,r2,0x 001978b4 branch if not follow target 0019786c: 262417fc addiu r4,r17,0x17fc 00197870: 0c0674a5 jal 0x0019d294 00197874: 02002021 addu r4,r16,r0 00197878: a2220027 sb r2,0x0027(r17) store target ID (return from 19d294) 0019787c: 304200ff andi r2,r2,0x00ff 00197880: 34030015 ori r3,r0,0x0015 00197884: 1043ffe8 beq r2,r3,0x 00197828 branch if target = 0x15? 00197888: 26240b4c addiu r4,r17,0x0b4c AI data + 0x0b4c 0019788c: 08065e2d j 0x 001978b4 00197890: 262417fc addiu r4,r17,0x17fc AI data + 0x17fc 00197894: 92220cbc lbu r2,0x0cbc(r17) 00197898: 00000000 nop 0019789c: 1440ffd5 bne r2,r0,0x 001977f4 001978a0: 26240b94 addiu r4,r17,0x0b94 001978a4: 08065e31 j 0x 001978c4 001978a8: 00001021 addu r2,r0,r0 001978ac: a2220017 sb r2,0x0017(r17) 001978b0: 262417fc addiu r4,r17,0x17fc 001978b4: 26250014 addiu r5,r17,0x0014 001978b8: 0c066ac2 jal 0x0019ab08 001978bc: 34060020 ori r6,r0,0x0020 transfer halfwords 001978c0: 34020001 ori r2,r0,0x0001 001978c4: 8fbf0020 lw r31,0x0020(r29) 001978c8: 8fb3001c lw r19,0x001c(r29) 001978cc: 8fb20018 lw r18,0x0018(r29) 001978d0: 8fb10014 lw r17,0x0014(r29) 001978d4: 8fb00010 lw r16,0x0010(r29) 001978d8: 27bd0028 addiu r29,r29,0x0028 001978dc: 03e00008 jr r31 001978e0: 00000000 nop