Ability Loading - Others
Revision as of 19:10, 4 May 2024 by Glain (talk | contribs) (Created page with " *Others* Part of Ability_Loading 0019a818: 00561023 subu r2,r2,r22 ID * 7 0019a81c: 00021180 sll r2,r2,0x06 ID * 1c0...")
*Others* Part of Ability_Loading 0019a818: 00561023 subu r2,r2,r22 ID * 7 0019a81c: 00021180 sll r2,r2,0x06 ID * 1c0 0019a820: 3c038019 lui r3,0x8019 0019a824: 246308cc addiu r3,r3,0x08cc 0019a828: 0043a821 addu r21,r2,r3 r21 = Unit's Data Pointer 0019a82c: 00008021 addu r16,r0,r0 Ability Counter = 0 0019a830: 00121100 sll r2,r18,0x04 Battle ID * 16 0019a834: 00521021 addu r2,r2,r18 ID * 17 0019a838: 000210c0 sll r2,r2,0x03 ID * 136 0019a83c: 24420ef0 addiu r2,r2,0x0ef0 0019a840: 3c08801a lui r8,0x801a 0019a844: 2508f3c4 addiu r8,r8,0xf3c4 0019a848: 01023821 addu r7,r8,r2 r7 = Usable Ability List Pointer 0019a84c: 0080b821 addu r23,r4,r0 r23 = Temp Ability Pointer 0019a850: 96f20000 lhu r18,0x0000(r23) Load Ability ID 0019a854: 00000000 nop 0019a858: 12400060 beq r18,r0,0x 0019a9dc Branch if Ability ID = 0 0019a85c: 00131880 sll r3,r19,0x02 Counter * 4 0019a860: 001220c0 sll r4,r18,0x03 ID * 8 0019a864: 3c018006 lui r1,0x8006 0019a868: 00240821 addu r1,r1,r4 0019a86c: 9022ebf7 lbu r2,-0x1409(r1) Load ? 0019a870: 00000000 nop 0019a874: 30420080 andi r2,r2,0x0080 0019a878: 10400058 beq r2,r0,0x 0019a9dc Branch if ability isn't Usable by AI 0019a87c: 00e38821 addu r17,r7,r3 r17 = Current Usable Ability Pointer 0019a880: 2a420170 slti r2,r18,0x0170 0019a884: 1040002c beq r2,r0,0x 0019a938 Branch if ID >= 0x170 (Potion) 0019a888: 00921023 subu r2,r4,r18 ID * 7 0019a88c: 00022040 sll r4,r2,0x01 ID * 14 0019a890: 92a20090 lbu r2,0x0090(r21) Load Unit's Support set 2 0019a894: 3c018006 lui r1,0x8006 0019a898: 00240821 addu r1,r1,r4 0019a89c: 9023fbfd lbu r3,-0x0403(r1) Load Ability's MP Cost 0019a8a0: 30420080 andi r2,r2,0x0080 0019a8a4: 10400002 beq r2,r0,0x 0019a8b0 Branch if Unit doesn't have Half of MP 0019a8a8: 00000000 nop 0019a8ac: 00031842 srl r3,r3,0x01 MP Cost / 2 0019a8b0: 96a2002e lhu r2,0x002e(r21) Load Unit's Max MP 0019a8b4: 00000000 nop 0019a8b8: 0043102a slt r2,r2,r3 0019a8bc: 14400047 bne r2,r0,0x 0019a9dc Branch if Unit has enough MP to use 0019a8c0: 00000000 nop 0019a8c4: 3c02801a lui r2,0x801a 0019a8c8: 8c42f3d0 lw r2,-0x0c30(r2) Load AI Behavior Data 0019a8cc: 00000000 nop 0019a8d0: 30420400 andi r2,r2,0x0400 0019a8d4: 10400006 beq r2,r0,0x 0019a8f0 Branch if AI doesn't check Faith 0019a8d8: 00000000 nop 0019a8dc: 92a20052 lbu r2,0x0052(r21) Load Unit's Innate Statuses 0019a8e0: 00000000 nop 0019a8e4: 30420040 andi r2,r2,0x0040 0019a8e8: 1440003c bne r2,r0,0x 0019a9dc Branch if Unit has Innate Innocent 0019a8ec: 00000000 nop 0019a8f0: 3c018006 lui r1,0x8006 0019a8f4: 00240821 addu r1,r1,r4 0019a8f8: 9023fbf6 lbu r3,-0x040a(r1) Load Ability Flags 4 0019a8fc: 00000000 nop 0019a900: 30620008 andi r2,r3,0x0008 0019a904: 10400004 beq r2,r0,0x 0019a918 Branch if it doesn't require Sword 0019a908: 00000000 nop 0019a90c: 92a20184 lbu r2,0x0184(r21) Load Equipped Flags? 0019a910: 08066a4c j 0x 0019a930 0019a914: 30420008 andi r2,r2,0x0008 Check for Sword 0019a918: 30620004 andi r2,r3,0x0004 0019a91c: 10400007 beq r2,r0,0x 0019a93c Branch if it doesn't require Materia B. 0019a920: 02c02021 addu r4,r22,r0 r4 = Unit's ID 0019a924: 92a20184 lbu r2,0x0184(r21) Load Equipped Flags? 0019a928: 00000000 nop 0019a92c: 30420004 andi r2,r2,0x0004 0019a930: 1040002a beq r2,r0,0x 0019a9dc Branch if Sword/Materia Blade not used 0019a934: 00000000 nop 0019a938: 02c02021 addu r4,r22,r0 r4 = Unit's ID 0019a93c: 02802821 addu r5,r20,r0 r5 = Skillset 0019a940: 02003021 addu r6,r16,r0 r6 = Ability Counter 0019a944: 0c066a94 jal 0x 0019aa50 Load Known Ability Flag 0019a948: afa70018 sw r7,0x0018(r29) 0019a94c: 8fa70018 lw r7,0x0018(r29) 0019a950: 10400022 beq r2,r0,0x 0019a9dc Branch if Ability isn't known 0019a954: 2a8200b0 slti r2,r20,0x00b0 0019a958: 1440000c bne r2,r0,0x 0019a98c Branch if not a monster skillset 0019a95c: 34020009 ori r2,r0,0x0009 r2 = 9 0019a960: 34020003 ori r2,r0,0x0003 r2 = 3 0019a964: 16020004 bne r16,r2,0x 0019a978 Branch if Ability Counter < 3 0019a968: 00000000 nop 0019a96c: 96220002 lhu r2,0x0002(r17) Load Ability's Skillset/flags 0019a970: 08066a61 j 0x 0019a984 0019a974: 34420800 ori r2,r2,0x0800 r2 = Monster Skill Needed check? 0019a978: 96220002 lhu r2,0x0002(r17) Load Ability's Skillset/flags 0019a97c: 00000000 nop 0019a980: 3042f7ff andi r2,r2,0xf7ff Disable Monster Skill Needed check? 0019a984: a6220002 sh r2,0x0002(r17) Store new Skillset/flags 0019a988: 34020009 ori r2,r0,0x0009 r2 = 9 0019a98c: a2340002 sb r20,0x0002(r17) Store Skillset 0019a990: 17c2000d bne r30,r2,0x 0019a9c8 Branch if Action Menu != Jump 0019a994: a6320000 sh r18,0x0000(r17) Store Ability ID