Difference between revisions of "Check if Status Should/Can be Added"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0019e5d8: 27bdffc0 addiu r29,r29,0xffc0 0019e5dc: afbe0038 sw r30,0x0038(r29) 0019e5e0: 3c1e801a lui r30,0x801a 0019e5e4: 27def3c4 addiu r30,r3...")
 
Line 1: Line 1:
<font face='Courier New'>
+
 
   
+
  Check if Status Should/Can be Added
  0019e5d8: 27bdffc0 addiu r29,r29,0xffc0
+
  r4 =  clockticks till unit acts
0019e5dc: afbe0038 sw r30,0x0038(r29)
+
  0xX0 - set to use * 8
0019e5e0: 3c1e801a lui r30,0x801a
+
  0x0X - status to check for (0x80 srav 0x0X)
0019e5e4: 27def3c4 addiu r30,r30,0xf3c4 r30 = AI data
+
  0019ef24: 00804021 addu r8,r4,r0 r8 = Clockticks Required (CT till unit acts)
0019e5e8: 000410c0 sll r2,r4,0x03
+
  0019ef28: 04c10002 bgez r6,0x0019ef34 Branch if Status Mod >= 0
0019e5ec: 00441023 subu r2,r2,r4
+
  0019ef2c: 00c01021 addu r2,r6,r0 r2 = Status Mod
0019e5f0: 00021180 sll r2,r2,0x06
+
  0019ef30: 24c20007 addiu r2,r6,0x0007
0019e5f4: 3c038019 lui r3,0x8019
+
  0019ef34: 000210c3 sra r2,r2,0x03 Status Mod / 8
0019e5f8: 246308cc addiu r3,r3,0x08cc
+
  0019ef38: 00a23821 addu r7,r5,r2
0019e5fc: afb60030 sw r22,0x0030(r29)
+
  0019ef3c: 90e40058 lbu r4,0x0058(r7) Load Unit's Statuses
0019e600: 0043b021 addu r22,r2,r3 r22 = unit data (target? caster?)
+
  0019ef40: 000210c0 sll r2,r2,0x03 Status Mod / 8 * 8
  0019e604: 00041100 sll r2,r4,0x04 unit ID*16
+
  0019ef44: 00c21023 subu r2,r6,r2 Status Mod MOD 8
0019e608: 2442182c addiu r2,r2,0x182c +182c
+
  0019ef48: 34030080 ori r3,r0,0x0080 Current Status = 0x80
0019e60c: afb70034 sw r23,0x0034(r29)
+
  0019ef4c: 00431807 srav r3,r3,r2 (get chosen status)
0019e610: 005eb821 addu r23,r2,r30 AI unit decision data
+
  0019ef50: 00832024 and r4,r4,r3
0019e614: 3c02801a lui r2,0x801a
+
  0019ef54: 10800013 beq r4,r0,0x0019efa4 Branch if Chosen Status isn't present
  0019e618: 8c42f3d0 lw r2,-0x0c30(r2) 19f3d0 - AI behavior flags?
+
  0019ef58: 34020005 ori r2,r0,0x0005 r2 = 5
0019e61c: 3c07801a lui r7,0x801a
+
  0019ef5c: 14c20004 bne r6,r2,0x0019ef70 Branch if not checking for Dead
  0019e620: 90e7f3c5 lbu r7,-0x0c3b(r7) 19f3c5
+
  0019ef60: 28c20018 slti r2,r6,0x0018
0019e624: 3c032000 lui r3,0x2000
+
  0019ef64: 90a2015d lbu r2,0x015d(r5) Load Unit's Current Ability CT
0019e628: afbf003c sw r31,0x003c(r29)
+
  0019ef68: 08067be7 j 0x0019ef9c
0019e62c: afb5002c sw r21,0x002c(r29)
+
  0019ef6c: 0048102a slt r2,r2,r8 (Check for CT < Clockticks Required)
0019e630: afb40028 sw r20,0x0028(r29)
+
 
0019e634: afb30024 sw r19,0x0024(r29)
+
  0019ef70: 1440000d bne r2,r0,0x0019efa8 Branch if Status doesn't have a CT
0019e638: afb20020 sw r18,0x0020(r29)
+
  0019ef74: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
0019e63c: afb1001c sw r17,0x001c(r29)
+
  0019ef78: 90e2004e lbu r2,0x004e(r7) Load Innate Statuses
0019e640: afb00018 sw r16,0x0018(r29)
+
  0019ef7c: 00000000 nop
0019e644: 00431024 and r2,r2,r3 undead reverse check
+
  0019ef80: 00431024 and r2,r2,r3
0019e648: 10400005 beq r2,r0,0x0019e660 branch if not undead reverse
+
  0019ef84: 14400008 bne r2,r0,0x0019efa8 Branch if Chosen Status is Innate
0019e64c: afa70010 sw r7,0x0010(r29)
+
  0019ef88: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
0019e650: 92e20008 lbu r2,0x0008(r23) load enemy flag
+
  0019ef8c: 00a61021 addu r2,r5,r6
0019e654: 00000000 nop
+
  0019ef90: 90420045 lbu r2,0x0045(r2) Load Status' CT
0019e658: 10400225 beq r2,r0,0x0019eef0 branch if not enemy
+
  0019ef94: 00000000 nop
  0019e65c: 00001021 addu r2,r0,r0
+
  0019ef98: 0048102a slt r2,r2,r8
0019e660: 8fc2000c lw r2,0x000c(r30) load AI use flags
+
  0019ef9c: 10400002 beq r2,r0,0x0019efa8 Branch if CT >= Clockticks Required
0019e664: 3c034000 lui r3,0x4000
+
  0019efa0: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail)
0019e668: 00431024 and r2,r2,r3
+
  0019efa4: 00001021 addu r2,r0,r0 r2 = 0 (Success)
0019e66c: 10400005 beq r2,r0,0x0019e684 branch if not reflectable
+
  0019efa8: 03e00008 jr r31
0019e670: 00000000 nop
+
  0019efac: 00000000 nop
0019e674: 92e20008 lbu r2,0x0008(r23) load enemy flag
+
return r2 = 1 if
0019e678: 00000000 nop
 
0019e67c: 1440021c bne r2,r0,0x0019eef0 branch if enemey
 
0019e680: 00001021 addu r2,r0,r0
 
0019e684: 93c20e2e lbu r2,0x0e2e(r30) load units acting ID
 
0019e688: 00000000 nop
 
0019e68c: 1482000f bne r4,r2,0x0019e6cc branch if not self
 
0019e690: 00000000 nop
 
0019e694: 87c30002 lh r3,0x0002(r30) load ability ID
 
0019e698: 00000000 nop
 
0019e69c: 28620170 slti r2,r3,0x0170
 
0019e6a0: 1040000a beq r2,r0,0x0019e6cc branch if not normal ability
 
0019e6a4: 000310c0 sll r2,r3,0x03
 
0019e6a8: 00431023 subu r2,r2,r3
 
0019e6ac: 00021040 sll r2,r2,0x01
 
0019e6b0: 3c018006 lui r1,0x8006
 
0019e6b4: 00220821 addu r1,r1,r2
 
0019e6b8: 9022fbf4 lbu r2,-0x040c(r1) load ability function flags 2
 
  0019e6bc: 00000000 nop
 
0019e6c0: 30420001 andi r2,r2,0x0001
 
0019e6c4: 1440020a bne r2,r0,0x0019eef0 branch if can't hit caster
 
0019e6c8: 00001021 addu r2,r0,r0
 
0019e6cc: 10a0000b beq r5,r0,0x0019e6fc branch if preset value = 0
 
  0019e6d0: 00000000 nop
 
0019e6d4: 8fc2000c lw r2,0x000c(r30)
 
0019e6d8: 00000000 nop
 
0019e6dc: 30424000 andi r2,r2,0x4000
 
0019e6e0: 10400006 beq r2,r0,0x0019e6fc branch if not reflectable
 
0019e6e4: 02c02821 addu r5,r22,r0
 
0019e6e8: 8fa40010 lw r4,0x0010(r29)
 
0019e6ec: 0c067bc9 jal 0x0019ef24 check if status should be added
 
0019e6f0: 34060026 ori r6,r0,0x0026
 
0019e6f4: 144001fe bne r2,r0,0x0019eef0
 
0019e6f8: 00001021 addu r2,r0,r0
 
0019e6fc: 8fc2000c lw r2,0x000c(r30)
 
0019e700: 00000000 nop
 
0019e704: 30420400 andi r2,r2,0x0400
 
0019e708: 10400006 beq r2,r0,0x0019e724 branch if not evadable
 
0019e70c: 02c02821 addu r5,r22,r0
 
0019e710: 8fa40010 lw r4,0x0010(r29)
 
0019e714: 0c067bc9 jal 0x0019ef24 check if status should be added
 
0019e718: 34060021 ori r6,r0,0x0021
 
0019e71c: 144001f4 bne r2,r0,0x0019eef0
 
  0019e720: 00001021 addu r2,r0,r0
 
0019e724: 8fa40010 lw r4,0x0010(r29)
 
0019e728: 02c02821 addu r5,r22,r0
 
0019e72c: 0c067bc9 jal 0x0019ef24 check if status should be added
 
0019e730: 34060005 ori r6,r0,0x0005
 
0019e734: 144001ee bne r2,r0,0x0019eef0
 
0019e738: 00001021 addu r2,r0,r0
 
0019e73c: 8fc2000c lw r2,0x000c(r30)
 
0019e740: 00000000 nop
 
0019e744: 30420020 andi r2,r2,0x0020
 
0019e748: 10400005 beq r2,r0,0x0019e760 branch if not cancel status
 
0019e74c: 0000a021 addu r20,r0,r0
 
0019e750: 93c20007 lbu r2,0x0007(r30) load status infliction 1
 
0019e754: 00000000 nop
 
  0019e758: 30420020 andi r2,r2,0x0020 inflicting dead check
 
0019e75c: 0002a02b sltu r20,r0,r2 set if inflicting dead
 
0019e760: 92e20007 lbu r2,0x0007(r23) load status infliction 1
 
0019e764: 00000000 nop
 
0019e768: 30420040 andi r2,r2,0x0040
 
0019e76c: 10400009 beq r2,r0,0x0019e794 branch if not inflicting crystal
 
0019e770: 00000000 nop
 
0019e774: 93d00001 lbu r16,0x0001(r30) load CT
 
0019e778: 0c0666e6 jal 0x00199b98 calculate clockticks until unit acts
 
0019e77c: 02c02021 addu r4,r22,r0
 
0019e780: 0202802a slt r16,r16,r2
 
0019e784: 1600003e bne r16,r0,0x0019e880 branch if ?
 
0019e788: 00000000 nop
 
0019e78c: 168001d8 bne r20,r0,0x0019eef0 branch if inflicting death
 
  0019e790: 00001021 addu r2,r0,r0
 
0019e794: 92e20007 lbu r2,0x0007(r23)
 
0019e798: 00000000 nop
 
0019e79c: 30420020 andi r2,r2,0x0020
 
0019e7a0: 10400009 beq r2,r0,0x0019e7c8 branch if not inflicting death
 
0019e7a4: 00000000 nop
 
  0019e7a8: 93d00001 lbu r16,0x0001(r30)
 
0019e7ac: 0c066722 jal 0x00199c88
 
0019e7b0: 02c02021 addu r4,r22,r0
 
0019e7b4: 0050102a slt r2,r2,r16
 
0019e7b8: 14400031 bne r2,r0,0x0019e880
 
0019e7bc: 00000000 nop
 
0019e7c0: 128001cb beq r20,r0,0x0019eef0
 
0019e7c4: 00001021 addu r2,r0,r0
 
0019e7c8: 92c20059 lbu r2,0x0059(r22)
 
  0019e7cc: 00000000 nop
 
0019e7d0: 30420080 andi r2,r2,0x0080
 
  0019e7d4: 1040000b beq r2,r0,0x0019e804
 
0019e7d8: 02c02821 addu r5,r22,r0
 
0019e7dc: 8fc2000c lw r2,0x000c(r30) load AI behavior flags
 
0019e7e0: 00000000 nop
 
0019e7e4: 30420020 andi r2,r2,0x0020
 
0019e7e8: 104001c1 beq r2,r0,0x0019eef0 branch if not target enemies
 
0019e7ec: 00001021 addu r2,r0,r0
 
0019e7f0: 93c20008 lbu r2,0x0008(r30) load status infliction 2
 
0019e7f4: 00000000 nop
 
0019e7f8: 30420080 andi r2,r2,0x0080
 
0019e7fc: 104001bc beq r2,r0,0x0019eef0 branch if not inflicting petrify
 
0019e800: 00001021 addu r2,r0,r0
 
0019e804: 8fa40010 lw r4,0x0010(r29)
 
0019e808: 0c067bc9 jal 0x0019ef24 check if status should be added
 
0019e80c: 3406001f ori r6,r0,0x001f
 
0019e810: 1040000b beq r2,r0,0x0019e840
 
0019e814: 00000000 nop
 
  0019e818: 8fc2000c lw r2,0x000c(r30)
 
0019e81c: 00000000 nop
 
0019e820: 30420020 andi r2,r2,0x0020
 
0019e824: 104001b2 beq r2,r0,0x0019eef0
 
0019e828: 00001021 addu r2,r0,r0
 
0019e82c: 93c2000a lbu r2,0x000a(r30)
 
0019e830: 00000000 nop
 
0019e834: 30420001 andi r2,r2,0x0001
 
0019e838: 104001ad beq r2,r0,0x0019eef0
 
0019e83c: 00001021 addu r2,r0,r0
 
0019e840: 93d40010 lbu r20,0x0010(r30)
 
0019e844: 00000000 nop
 
0019e848: 1280000f beq r20,r0,0x0019e888
 
0019e84c: 00000000 nop
 
0019e850: 92c2006e lbu r2,0x006e(r22) load elemental null
 
0019e854: 00000000 nop
 
0019e858: 02821024 and r2,r20,r2
 
0019e85c: 12820008 beq r20,r2,0x0019e880
 
0019e860: 34020008 ori r2,r0,0x0008
 
0019e864: 16820008 bne r20,r2,0x0019e888
 
0019e868: 00000000 nop
 
0019e86c: 92c2005a lbu r2,0x005a(r22)
 
0019e870: 00000000 nop
 
0019e874: 30420040 andi r2,r2,0x0040
 
0019e878: 10400003 beq r2,r0,0x0019e888 branch if not float
 
0019e87c: 00000000 nop
 
0019e880: 08067bbc j 0x0019eef0
 
0019e884: 00001021 addu r2,r0,r0
 
0019e888: 8fc3000c lw r3,0x000c(r30) load target enemies flag
 
  0019e88c: 00000000 nop
 
0019e890: 30620002 andi r2,r3,0x0002
 
0019e894: 10400074 beq r2,r0,0x0019ea68 branch if not target enemies
 
0019e898: 30622000 andi r2,r3,0x2000
 
0019e89c: 1040000f beq r2,r0,0x0019e8dc
 
0019e8a0: 00000000 nop
 
0019e8a4: 92e20008 lbu r2,0x0008(r23) load enemy flag
 
0019e8a8: 00000000 nop
 
0019e8ac: 10400004 beq r2,r0,0x0019e8c0 branch if ally
 
0019e8b0: 00000000 nop
 
0019e8b4: 92c20058 lbu r2,0x0058(r22)
 
0019e8b8: 08067a3f j 0x0019e8fc
 
0019e8bc: 30420010 andi r2,r2,0x0010 undead check
 
0019e8c0: 92c20058 lbu r2,0x0058(r22)
 
  0019e8c4: 00000000 nop
 
0019e8c8: 30420010 andi r2,r2,0x0010
 
  0019e8cc: 14400050 bne r2,r0,0x0019ea10 branch if undead
 
0019e8d0: 00000000 nop
 
0019e8d4: 08067bbc j 0x0019eef0 jump to end, return r2 = 2
 
  0019e8d8: 34020002 ori r2,r0,0x0002
 
0019e8dc: 92e20008 lbu r2,0x0008(r23) load enemy flag
 
0019e8e0: 00000000 nop
 
0019e8e4: 10400009 beq r2,r0,0x0019e90c branch if ally
 
  0019e8e8: 02c02821 addu r5,r22,r0
 
0019e8ec: 92c2006d lbu r2,0x006d(r22) load element absorbs
 
0019e8f0: 93c30010 lbu r3,0x0010(r30)
 
0019e8f4: 00000000 nop
 
0019e8f8: 00431024 and r2,r2,r3
 
0019e8fc: 10400044 beq r2,r0,0x0019ea10 branch if abilities elements are not absorbed by enemy
 
  0019e900: 34020002 ori r2,r0,0x0002
 
0019e904: 08067bbc j 0x0019eef0
 
0019e908: 00000000 nop
 
0019e90c: 8fa40010 lw r4,0x0010(r29)
 
0019e910: 0c067bc9 jal 0x0019ef24
 
0019e914: 34060022 ori r6,r0,0x0022
 
0019e918: 10400005 beq r2,r0,0x0019e930
 
0019e91c: 02c02021 addu r4,r22,r0
 
0019e920: 0c067bec jal 0x0019efb0
 
0019e924: 34050022 ori r5,r0,0x0022
 
  0019e928: 14400002 bne r2,r0,0x0019e934
 
0019e92c: 34140001 ori r20,r0,0x0001
 
0019e930: 0000a021 addu r20,r0,r0
 
0019e934: 8fc2000c lw r2,0x000c(r30)
 
0019e938: 00000000 nop
 
0019e93c: 30420080 andi r2,r2,0x0080
 
0019e940: 10400015 beq r2,r0,0x0019e998
 
0019e944: 00000000 nop
 
0019e948: 93c20000 lbu r2,0x0000(r30)
 
  0019e94c: 3c018006 lui r1,0x8006
 
  0019e950: 00220821 addu r1,r1,r2
 
0019e954: 90235cb4 lbu r3,0x5cb4(r1) load action menu byte
 
0019e958: 3402000a ori r2,r0,0x000a
 
0019e95c: 1062000e beq r3,r2,0x0019e998 branch if charge
 
0019e960: 00000000 nop
 
0019e964: 92c20059 lbu r2,0x0059(r22)
 
0019e968: 00000000 nop
 
0019e96c: 30420010 andi r2,r2,0x0010
 
  0019e970: 1440015f bne r2,r0,0x0019eef0 branch if confusion
 
  0019e974: 34020001 ori r2,r0,0x0001 return r2 = 1
 
0019e978: 8fa40010 lw r4,0x0010(r29)
 
  0019e97c: 02c02821 addu r5,r22,r0
 
0019e980: 0c067bc9 jal 0x0019ef24
 
0019e984: 34060023 ori r6,r0,0x0023
 
0019e988: 14400046 bne r2,r0,0x0019eaa4
 
0019e98c: 00000000 nop
 
0019e990: 16800157 bne r20,r0,0x0019eef0
 
0019e994: 34020001 ori r2,r0,0x0001
 
0019e998: 92c2006d lbu r2,0x006d(r22) load element absorbs
 
0019e99c: 93c30010 lbu r3,0x0010(r30) load abilities element
 
  0019e9a0: 00000000 nop
 
  0019e9a4: 00431024 and r2,r2,r3
 
  0019e9a8: 10400006 beq r2,r0,0x0019e9c4 branch if enemy can't absorb
 
0019e9ac: 00000000 nop
 
0019e9b0: 92e20007 lbu r2,0x0007(r23)
 
0019e9b4: 00000000 nop
 
0019e9b8: 30420001 andi r2,r2,0x0001
 
0019e9bc: 1440014c bne r2,r0,0x0019eef0 branch if low hp unit
 
  0019e9c0: 34020001 ori r2,r0,0x0001 return r2 = 1
 
0019e9c4: 92c20059 lbu r2,0x0059(r22)
 
0019e9c8: 00000000 nop
 
0019e9cc: 30420014 andi r2,r2,0x0014
 
0019e9d0: 14400003 bne r2,r0,0x0019e9e0 branch if confusion/blood suck
 
0019e9d4: 00000000 nop
 
0019e9d8: 12800145 beq r20,r0,0x0019eef0 branch if ?
 
0019e9dc: 34020002 ori r2,r0,0x0002 return r2 = 2
 
0019e9e0: 8fc2000c lw r2,0x000c(r30)
 
0019e9e4: 00000000 nop
 
0019e9e8: 30420010 andi r2,r2,0x0010
 
0019e9ec: 1040ffb9 beq r2,r0,0x0019e8d4 branch to end if not add status, return r2 = 2
 
0019e9f0: 3c031c06 lui r3,0x1c06
 
0019e9f4: 8fc20008 lw r2,0x0008(r30) load status inflict 2
 
0019e9f8: 00000000 nop
 
0019e9fc: 00431024 and r2,r2,r3
 
0019ea00: 1440013b bne r2,r0,0x0019eef0
 
0019ea04: 34020001 ori r2,r0,0x0001
 
0019ea08: 08067bbc j 0x0019eef0
 
0019ea0c: 34020002 ori r2,r0,0x0002
 
0019ea10: 8fc2000c lw r2,0x000c(r30)
 
0019ea14: 00000000 nop
 
0019ea18: 30420080 andi r2,r2,0x0080
 
0019ea1c: 10400006 beq r2,r0,0x0019ea38
 
0019ea20: 00000000 nop
 
0019ea24: 92c2005c lbu r2,0x005c(r22)
 
0019ea28: 00000000 nop
 
0019ea2c: 30420001 andi r2,r2,0x0001
 
0019ea30: 1040012f beq r2,r0,0x0019eef0
 
0019ea34: 34020001 ori r2,r0,0x0001
 
0019ea38: 8fc2000c lw r2,0x000c(r30)
 
0019ea3c: 00000000 nop
 
0019ea40: 30420040 andi r2,r2,0x0040
 
0019ea44: 10400007 beq r2,r0,0x0019ea64
 
0019ea48: 00000000 nop
 
0019ea4c: 96c3002c lhu r3,0x002c(r22)
 
0019ea50: 92e2000a lbu r2,0x000a(r23)
 
  0019ea54: 00000000 nop
 
0019ea58: 0043102b sltu r2,r2,r3
 
0019ea5c: 14400124 bne r2,r0,0x0019eef0
 
0019ea60: 34020001 ori r2,r0,0x0001
 
0019ea64: 8fc3000c lw r3,0x000c(r30)
 
0019ea68: 00000000 nop
 
0019ea6c: 30620001 andi r2,r3,0x0001
 
0019ea70: 10400036 beq r2,r0,0x0019eb4c
 
0019ea74: 30622000 andi r2,r3,0x2000
 
0019ea78: 1040000f beq r2,r0,0x0019eab8
 
0019ea7c: 00000000 nop
 
0019ea80: 92e20008 lbu r2,0x0008(r23)
 
0019ea84: 00000000 nop
 
0019ea88: 10400008 beq r2,r0,0x0019eaac
 
0019ea8c: 00000000 nop
 
0019ea90: 92c30058 lbu r3,0x0058(r22)
 
0019ea94: 00000000 nop
 
0019ea98: 30630010 andi r3,r3,0x0010
 
0019ea9c: 10600114 beq r3,r0,0x0019eef0
 
0019eaa0: 34020002 ori r2,r0,0x0002
 
0019eaa4: 08067bbc j 0x0019eef0
 
0019eaa8: 34020001 ori r2,r0,0x0001
 
0019eaac: 92c20058 lbu r2,0x0058(r22)
 
0019eab0: 08067aaf j 0x0019eabc
 
0019eab4: 30420010 andi r2,r2,0x0010
 
0019eab8: 92e20008 lbu r2,0x0008(r23)
 
0019eabc: 00000000 nop
 
0019eac0: 1440010b bne r2,r0,0x0019eef0
 
0019eac4: 34020002 ori r2,r0,0x0002
 
0019eac8: 92c2005c lbu r2,0x005c(r22)
 
0019eacc: 00000000 nop
 
0019ead0: 30420001 andi r2,r2,0x0001
 
0019ead4: 10400009 beq r2,r0,0x0019eafc
 
0019ead8: 00000000 nop
 
0019eadc: 8fc3000c lw r3,0x000c(r30)
 
0019eae0: 00000000 nop
 
0019eae4: 30630010 andi r3,r3,0x0010
 
0019eae8: 10600101 beq r3,r0,0x0019eef0
 
0019eaec: 00001021 addu r2,r0,r0
 
0019eaf0: 93c20009 lbu r2,0x0009(r30)
 
0019eaf4: 08067bbb j 0x0019eeec
 
0019eaf8: 30420020 andi r2,r2,0x0020
 
0019eafc: 8fc2000c lw r2,0x000c(r30)
 
0019eb00: 00000000 nop
 
0019eb04: 30420080 andi r2,r2,0x0080
 
0019eb08: 10400006 beq r2,r0,0x0019eb24
 
0019eb0c: 00000000 nop
 
0019eb10: 92e20007 lbu r2,0x0007(r23)
 
0019eb14: 00000000 nop
 
0019eb18: 30420001 andi r2,r2,0x0001
 
0019eb1c: 144000f4 bne r2,r0,0x0019eef0
 
0019eb20: 34020001 ori r2,r0,0x0001
 
0019eb24: 8fc2000c lw r2,0x000c(r30)
 
0019eb28: 00000000 nop
 
0019eb2c: 30420040 andi r2,r2,0x0040
 
0019eb30: 10400006 beq r2,r0,0x0019eb4c
 
0019eb34: 00000000 nop
 
0019eb38: 92e20007 lbu r2,0x0007(r23)
 
0019eb3c: 00000000 nop
 
0019eb40: 30420002 andi r2,r2,0x0002
 
0019eb44: 144000ea bne r2,r0,0x0019eef0
 
0019eb48: 34020001 ori r2,r0,0x0001
 
0019eb4c: 8fc3000c lw r3,0x000c(r30)
 
0019eb50: 00000000 nop
 
0019eb54: 30620003 andi r2,r3,0x0003
 
0019eb58: 14400006 bne r2,r0,0x0019eb74
 
0019eb5c: 30620080 andi r2,r3,0x0080
 
0019eb60: 144000e3 bne r2,r0,0x0019eef0
 
0019eb64: 34020001 ori r2,r0,0x0001
 
0019eb68: 30620040 andi r2,r3,0x0040
 
0019eb6c: 144000e0 bne r2,r0,0x0019eef0
 
0019eb70: 34020001 ori r2,r0,0x0001
 
0019eb74: 8fc2000c lw r2,0x000c(r30)
 
0019eb78: 00000000 nop
 
0019eb7c: 30420010 andi r2,r2,0x0010
 
0019eb80: 10400073 beq r2,r0,0x0019ed50
 
0019eb84: 00000000 nop
 
0019eb88: 0000a021 addu r20,r0,r0
 
0019eb8c: 03d41021 addu r2,r30,r20
 
0019eb90: 02d41821 addu r3,r22,r20
 
0019eb94: 90500007 lbu r16,0x0007(r2)
 
0019eb98: 90620058 lbu r2,0x0058(r3)
 
0019eb9c: 00000000 nop
 
0019eba0: 02021024 and r2,r16,r2
 
0019eba4: 02028026 xor r16,r16,r2
 
0019eba8: 12000065 beq r16,r0,0x0019ed40
 
0019ebac: 00000000 nop
 
0019ebb0: 90620053 lbu r2,0x0053(r3)
 
0019ebb4: 00000000 nop
 
0019ebb8: 02021024 and r2,r16,r2
 
0019ebbc: 02028026 xor r16,r16,r2
 
0019ebc0: 1200005f beq r16,r0,0x0019ed40
 
0019ebc4: 34020002 ori r2,r0,0x0002
 
0019ebc8: 1282001f beq r20,r2,0x0019ec48
 
0019ebcc: 2a820003 slti r2,r20,0x0003
 
0019ebd0: 10400005 beq r2,r0,0x0019ebe8
 
0019ebd4: 34020001 ori r2,r0,0x0001
 
0019ebd8: 1282000a beq r20,r2,0x0019ec04
 
0019ebdc: 32020008 andi r2,r16,0x0008
 
0019ebe0: 08067b4e j 0x0019ed38
 
0019ebe4: 00000000 nop
 
0019ebe8: 34020003 ori r2,r0,0x0003
 
0019ebec: 1282002e beq r20,r2,0x0019eca8
 
0019ebf0: 34020004 ori r2,r0,0x0004
 
0019ebf4: 1282004a beq r20,r2,0x0019ed20
 
0019ebf8: 00000000 nop
 
0019ebfc: 08067b4e j 0x0019ed38
 
0019ec00: 00000000 nop
 
0019ec04: 10400007 beq r2,r0,0x0019ec24
 
0019ec08: 32020020 andi r2,r16,0x0020
 
0019ec0c: 92e2000c lbu r2,0x000c(r23)
 
0019ec10: 00000000 nop
 
0019ec14: 14400003 bne r2,r0,0x0019ec24
 
0019ec18: 32020020 andi r2,r16,0x0020
 
0019ec1c: 3a100008 xori r16,r16,0x0008
 
0019ec20: 32020020 andi r2,r16,0x0020
 
0019ec24: 10400044 beq r2,r0,0x0019ed38
 
0019ec28: 00000000 nop
 
0019ec2c: 92e2000d lbu r2,0x000d(r23)
 
0019ec30: 00000000 nop
 
0019ec34: 2c420002 sltiu r2,r2,0x0002
 
0019ec38: 1040003f beq r2,r0,0x0019ed38
 
0019ec3c: 00000000 nop
 
0019ec40: 08067b4e j 0x0019ed38
 
0019ec44: 3a100020 xori r16,r16,0x0020
 
0019ec48: 32020020 andi r2,r16,0x0020
 
0019ec4c: 10400008 beq r2,r0,0x0019ec70
 
0019ec50: 32020002 andi r2,r16,0x0002
 
0019ec54: 92e20007 lbu r2,0x0007(r23)
 
0019ec58: 00000000 nop
 
0019ec5c: 30420001 andi r2,r2,0x0001
 
0019ec60: 14400003 bne r2,r0,0x0019ec70
 
0019ec64: 32020002 andi r2,r16,0x0002
 
0019ec68: 3a100020 xori r16,r16,0x0020
 
0019ec6c: 32020002 andi r2,r16,0x0002
 
0019ec70: 10400006 beq r2,r0,0x0019ec8c
 
0019ec74: 00000000 nop
 
0019ec78: 92e20008 lbu r2,0x0008(r23)
 
0019ec7c: 00000000 nop
 
0019ec80: 14400002 bne r2,r0,0x0019ec8c
 
0019ec84: 00000000 nop
 
0019ec88: 3a100002 xori r16,r16,0x0002
 
0019ec8c: 92e20007 lbu r2,0x0007(r23)
 
0019ec90: 00000000 nop
 
0019ec94: 30420080 andi r2,r2,0x0080
 
0019ec98: 14400027 bne r2,r0,0x0019ed38
 
0019ec9c: 00000000 nop
 
0019eca0: 08067b4e j 0x0019ed38
 
0019eca4: 321000bf andi r16,r16,0x00bf
 
0019eca8: 32020040 andi r2,r16,0x0040
 
0019ecac: 10400007 beq r2,r0,0x0019eccc
 
0019ecb0: 00000000 nop
 
0019ecb4: 92e20007 lbu r2,0x0007(r23)
 
0019ecb8: 00000000 nop
 
0019ecbc: 30420001 andi r2,r2,0x0001
 
0019ecc0: 14400002 bne r2,r0,0x0019eccc
 
0019ecc4: 00000000 nop
 
0019ecc8: 3a100040 xori r16,r16,0x0040
 
0019eccc: 92e20007 lbu r2,0x0007(r23)
 
0019ecd0: 00000000 nop
 
0019ecd4: 30420080 andi r2,r2,0x0080
 
0019ecd8: 14400003 bne r2,r0,0x0019ece8
 
0019ecdc: 3202000c andi r2,r16,0x000c
 
0019ece0: 321000ce andi r16,r16,0x00ce
 
0019ece4: 3202000c andi r2,r16,0x000c
 
0019ece8: 10400013 beq r2,r0,0x0019ed38
 
0019ecec: 00000000 nop
 
0019ecf0: 92c2005b lbu r2,0x005b(r22)
 
0019ecf4: 00000000 nop
 
0019ecf8: 30420002 andi r2,r2,0x0002
 
0019ecfc: 14400006 bne r2,r0,0x0019ed18
 
0019ed00: 00000000 nop
 
0019ed04: 92c2005c lbu r2,0x005c(r22)
 
0019ed08: 00000000 nop
 
0019ed0c: 30420010 andi r2,r2,0x0010
 
0019ed10: 10400009 beq r2,r0,0x0019ed38
 
0019ed14: 00000000 nop
 
0019ed18: 08067b4e j 0x0019ed38
 
0019ed1c: 321000f3 andi r16,r16,0x00f3
 
0019ed20: 92e20007 lbu r2,0x0007(r23)
 
0019ed24: 00000000 nop
 
0019ed28: 30420080 andi r2,r2,0x0080
 
0019ed2c: 14400002 bne r2,r0,0x0019ed38
 
0019ed30: 00000000 nop
 
0019ed34: 3210007d andi r16,r16,0x007d
 
0019ed38: 1600006d bne r16,r0,0x0019eef0
 
0019ed3c: 34020001 ori r2,r0,0x0001
 
0019ed40: 26940001 addiu r20,r20,0x0001
 
0019ed44: 2a820005 slti r2,r20,0x0005
 
0019ed48: 1440ff91 bne r2,r0,0x0019eb90
 
0019ed4c: 03d41021 addu r2,r30,r20
 
0019ed50: 8fc2000c lw r2,0x000c(r30)
 
0019ed54: 00000000 nop
 
0019ed58: 30420020 andi r2,r2,0x0020
 
0019ed5c: 1040004e beq r2,r0,0x0019ee98
 
0019ed60: 00000000 nop
 
0019ed64: 0000a021 addu r20,r0,r0
 
0019ed68: 03d41021 addu r2,r30,r20
 
0019ed6c: 02d41821 addu r3,r22,r20
 
0019ed70: 90500007 lbu r16,0x0007(r2)
 
0019ed74: 90620058 lbu r2,0x0058(r3)
 
0019ed78: 00000000 nop
 
0019ed7c: 02028024 and r16,r16,r2
 
0019ed80: 12000041 beq r16,r0,0x0019ee88
 
0019ed84: 00000000 nop
 
0019ed88: 9062004e lbu r2,0x004e(r3)
 
0019ed8c: 00000000 nop
 
0019ed90: 02021024 and r2,r16,r2
 
0019ed94: 02028026 xor r16,r16,r2
 
0019ed98: 1200003b beq r16,r0,0x0019ee88
 
0019ed9c: 2a820003 slti r2,r20,0x0003
 
0019eda0: 14400019 bne r2,r0,0x0019ee08
 
0019eda4: 34020001 ori r2,r0,0x0001
 
0019eda8: 00009021 addu r18,r0,r0
 
0019edac: 0014a8c0 sll r21,r20,0x03
 
0019edb0: 34070080 ori r7,r0,0x0080
 
0019edb4: 02479807 srav r19,r7,r18
 
0019edb8: 02131024 and r2,r16,r19
 
0019edbc: 1040000d beq r2,r0,0x0019edf4
 
0019edc0: 00000000 nop
 
0019edc4: 8fa40010 lw r4,0x0010(r29)
 
0019edc8: 02c02821 addu r5,r22,r0
 
0019edcc: 02b28821 addu r17,r21,r18
 
0019edd0: 0c067bc9 jal 0x0019ef24
 
0019edd4: 02203021 addu r6,r17,r0
 
0019edd8: 10400005 beq r2,r0,0x0019edf0
 
  0019eddc: 02c02021 addu r4,r22,r0
 
0019ede0: 0c067bec jal 0x0019efb0
 
0019ede4: 02202821 addu r5,r17,r0
 
0019ede8: 14400002 bne r2,r0,0x0019edf4
 
0019edec: 00000000 nop
 
0019edf0: 02138026 xor r16,r16,r19
 
0019edf4: 26520001 addiu r18,r18,0x0001
 
0019edf8: 2a420008 slti r2,r18,0x0008
 
0019edfc: 1440ffed bne r2,r0,0x0019edb4
 
0019ee00: 34070080 ori r7,r0,0x0080
 
0019ee04: 34020001 ori r2,r0,0x0001
 
0019ee08: 12820005 beq r20,r2,0x0019ee20
 
0019ee0c: 34020002 ori r2,r0,0x0002
 
0019ee10: 12820014 beq r20,r2,0x0019ee64
 
0019ee14: 32020002 andi r2,r16,0x0002
 
0019ee18: 08067ba0 j 0x0019ee80
 
0019ee1c: 00000000 nop
 
0019ee20: 32020008 andi r2,r16,0x0008
 
0019ee24: 10400007 beq r2,r0,0x0019ee44
 
0019ee28: 32020020 andi r2,r16,0x0020
 
0019ee2c: 92e2000c lbu r2,0x000c(r23)
 
0019ee30: 00000000 nop
 
0019ee34: 14400003 bne r2,r0,0x0019ee44
 
0019ee38: 32020020 andi r2,r16,0x0020
 
0019ee3c: 3a100008 xori r16,r16,0x0008
 
0019ee40: 32020020 andi r2,r16,0x0020
 
0019ee44: 1040000e beq r2,r0,0x0019ee80
 
0019ee48: 00000000 nop
 
0019ee4c: 92e2000d lbu r2,0x000d(r23)
 
  0019ee50: 00000000 nop
 
  0019ee54: 1440000a bne r2,r0,0x0019ee80
 
0019ee58: 00000000 nop
 
0019ee5c: 08067ba0 j 0x0019ee80
 
0019ee60: 3a100020 xori r16,r16,0x0020
 
0019ee64: 10400006 beq r2,r0,0x0019ee80
 
0019ee68: 00000000 nop
 
0019ee6c: 92e20008 lbu r2,0x0008(r23)
 
0019ee70: 00000000 nop
 
  0019ee74: 10400002 beq r2,r0,0x0019ee80
 
0019ee78: 00000000 nop
 
0019ee7c: 3a100002 xori r16,r16,0x0002
 
0019ee80: 1600001b bne r16,r0,0x0019eef0
 
  0019ee84: 34020001 ori r2,r0,0x0001
 
0019ee88: 26940001 addiu r20,r20,0x0001
 
0019ee8c: 2a820005 slti r2,r20,0x0005
 
0019ee90: 1440ffb6 bne r2,r0,0x0019ed6c
 
0019ee94: 03d41021 addu r2,r30,r20
 
0019ee98: 8fc2000c lw r2,0x000c(r30)
 
  0019ee9c: 00000000 nop
 
0019eea0: 30420008 andi r2,r2,0x0008
 
0019eea4: 1040000e beq r2,r0,0x0019eee0
 
0019eea8: 34020076 ori r2,r0,0x0076
 
0019eeac: 87c30002 lh r3,0x0002(r30) load ability
 
0019eeb0: 00000000 nop
 
0019eeb4: 10620005 beq r3,r2,0x0019eecc branch if praise
 
0019eeb8: 34020092 ori r2,r0,0x0092
 
0019eebc: 10620003 beq r3,r2,0x0019eecc branch if accumulate
 
0019eec0: 34020096 ori r2,r0,0x0096
 
0019eec4: 1462000a bne r3,r2,0x0019eef0 branch if yell
 
0019eec8: 34020001 ori r2,r0,0x0001
 
0019eecc: 0c0088c3 jal 0x0002230c random
 
0019eed0: 00000000 nop
 
0019eed4: 30420001 andi r2,r2,0x0001
 
0019eed8: 10400005 beq r2,r0,0x0019eef0
 
0019eedc: 34020001 ori r2,r0,0x0001
 
0019eee0: 8fc2000c lw r2,0x000c(r30)
 
0019eee4: 00000000 nop
 
0019eee8: 30420004 andi r2,r2,0x0004
 
0019eeec: 0002102b sltu r2,r0,r2
 
0019eef0: 8fbf003c lw r31,0x003c(r29)
 
0019eef4: 8fbe0038 lw r30,0x0038(r29)
 
0019eef8: 8fb70034 lw r23,0x0034(r29)
 
0019eefc: 8fb60030 lw r22,0x0030(r29)
 
0019ef00: 8fb5002c lw r21,0x002c(r29)
 
0019ef04: 8fb40028 lw r20,0x0028(r29)
 
0019ef08: 8fb30024 lw r19,0x0024(r29)
 
0019ef0c: 8fb20020 lw r18,0x0020(r29)
 
0019ef10: 8fb1001c lw r17,0x001c(r29)
 
0019ef14: 8fb00018 lw r16,0x0018(r29)
 
  0019ef18: 27bd0040 addiu r29,r29,0x0040
 
0019ef1c: 03e00008 jr r31
 
  0019ef20: 00000000 nop
 
</font>
 

Revision as of 16:34, 22 February 2015

Check if Status Should/Can be Added
r4 =  clockticks till unit acts
0xX0 - set to use * 8
0x0X - status to check for (0x80 srav 0x0X)
0019ef24: 00804021 addu r8,r4,r0		r8 = Clockticks Required (CT till unit acts)
0019ef28: 04c10002 bgez r6,0x0019ef34		Branch if Status Mod >= 0
0019ef2c: 00c01021 addu r2,r6,r0		r2 = Status Mod
0019ef30: 24c20007 addiu r2,r6,0x0007
0019ef34: 000210c3 sra r2,r2,0x03		Status Mod / 8
0019ef38: 00a23821 addu r7,r5,r2
0019ef3c: 90e40058 lbu r4,0x0058(r7)		Load Unit's Statuses
0019ef40: 000210c0 sll r2,r2,0x03		Status Mod / 8 * 8
0019ef44: 00c21023 subu r2,r6,r2		Status Mod MOD 8
0019ef48: 34030080 ori r3,r0,0x0080		Current Status = 0x80
0019ef4c: 00431807 srav r3,r3,r2		(get chosen status)
0019ef50: 00832024 and r4,r4,r3
0019ef54: 10800013 beq r4,r0,0x0019efa4		Branch if Chosen Status isn't present
0019ef58: 34020005 ori r2,r0,0x0005		r2 = 5
0019ef5c: 14c20004 bne r6,r2,0x0019ef70		Branch if not checking for Dead
0019ef60: 28c20018 slti r2,r6,0x0018
0019ef64: 90a2015d lbu r2,0x015d(r5)		Load Unit's Current Ability CT
0019ef68: 08067be7 j 0x0019ef9c
0019ef6c: 0048102a slt r2,r2,r8			(Check for CT < Clockticks Required)
0019ef70: 1440000d bne r2,r0,0x0019efa8		Branch if Status doesn't have a CT
0019ef74: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
0019ef78: 90e2004e lbu r2,0x004e(r7)		Load Innate Statuses
0019ef7c: 00000000 nop
0019ef80: 00431024 and r2,r2,r3
0019ef84: 14400008 bne r2,r0,0x0019efa8		Branch if Chosen Status is Innate
0019ef88: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
0019ef8c: 00a61021 addu r2,r5,r6
0019ef90: 90420045 lbu r2,0x0045(r2)		Load Status' CT
0019ef94: 00000000 nop
0019ef98: 0048102a slt r2,r2,r8
0019ef9c: 10400002 beq r2,r0,0x0019efa8		Branch if CT >= Clockticks Required
0019efa0: 34020001 ori r2,r0,0x0001		r2 = 1 (Fail)
0019efa4: 00001021 addu r2,r0,r0		r2 = 0 (Success)
0019efa8: 03e00008 jr r31
0019efac: 00000000 nop
return r2 = 1 if