Status CT decrement and innate statuses
Jump to navigation
Jump to search
BATTLE.BIN - Status CT decrement and innate statuses? -------------------------------------------------------------------------------------------------- Parameters -------------------------------------------------------------------------------------------------- 0018d910: 27bdffe8 addiu r29,r29,-0x0018 | 0018d914: afbf0010 sw r31,0x0010(r29) | 0018d918: 000410c0 sll r2,r4,0x03 | 0018d91c: 00441023 subu r2,r2,r4 | 0018d920: 00021180 sll r2,r2,0x06 | 0018d924: 3c048019 lui r4,0x8019 | 0018d928: 248408cc addiu r4,r4,0x08cc | 0018d92c: 0c063681 jal 0x0018da04 |-->Target pointers Set 80192d90 and 80192d98 0018d930: 00442021 addu r4,r2,r4 |Unit ID Pointer 0018d934: 00002021 addu r4,r0,r0 |Reset counter 0018d938: 34090080 ori r9,r0,0x0080 |Used as bitmask @LOOP through status with CT (set 4 and 5) 0018d93c: 04810002 bgez r4,0x0018d948 #If Counter is invalid 0018d940: 00801021 addu r2,r4,r0 | 0018d944: 24820007 addiu r2,r4,0x0007 |counter = 7 0018d948: 000210c3 sra r2,r2,0x03 |Counter/8 (status set) 0018d94c: 24480003 addiu r8,r2,0x0003 |Minimal set is set 4 (status Above do not have any CT) 0018d950: 3c078019 lui r7,0x8019 | 0018d954: 8ce72d98 lw r7,0x2d98(r7) |target stats 0018d958: 30830007 andi r3,r4,0x0007 |Status rank in status set 0018d95c: 00e82821 addu r5,r7,r8 |Unit Pointer + Status Set offset 0018d960: 90a201bb lbu r2,0x01bb(r5) |load inflicted status list 0018d964: 00693007 srav r6,r9,r3 | 0018d968: 00461024 and r2,r2,r6 | 0018d96c: 10400015 beq r2,r0,0x0018d9c4 #If This iteration status is inflicted 0018d970: 00000000 nop | 0018d974: 90a2004e lbu r2,0x004e(r5) |load innate statuses 0018d978: 00000000 nop | 0018d97c: 00461024 and r2,r2,r6 | 0018d980: 14400010 bne r2,r0,0x0018d9c4 #If This status is not innat (cancelable) 0018d984: 00e41821 addu r3,r7,r4 |Unit pointer + status offset 0018d988: 9062005d lbu r2,0x005d(r3) |load poison CT 0018d98c: 00000000 nop | 0018d990: 2442ffff addiu r2,r2,-0x0001 | 0018d994: a062005d sb r2,0x005d(r3) |decrement CT and store 0018d998: 304200ff andi r2,r2,0x00ff | 0018d99c: 14400009 bne r2,r0,0x0018d9c4 #If New CT is 0 0018d9a0: 00000000 nop | 0018d9a4: 3c038019 lui r3,0x8019 |Unit action pointer 0018d9a8: 8c632d90 lw r3,0x2d90(r3) | 0018d9ac: 00000000 nop | 0018d9b0: 00681821 addu r3,r3,r8 |Action pointer + this iteration set offset 0018d9b4: 90620020 lbu r2,0x0020(r3) |load attack status removal 0018d9b8: 00000000 nop | 0018d9bc: 00c21025 or r2,r6,r2 | 0018d9c0: a0620020 sb r2,0x0020(r3) |Store Cancel status with CT at 0 0018d9c4: 24840001 addiu r4,r4,0x0001 |Counter +1 0018d9c8: 2882000f slti r2,r4,0x000f |Check limit 0018d9cc: 1440ffdb bne r2,r0,0x0018d93c Λ loop 16 times 0018d9d0: 00000000 nop | 0018d9d4: 0c0612c9 jal 0x00184b24 |-->Validate Status Changes 0018d9d8: 00002021 addu r4,r0,r0 | 0018d9dc: 10400005 beq r2,r0,0x0018d9f4 #If There is something to cancel 0018d9e0: 34020008 ori r2,r0,0x0008 | 0018d9e4: 3c038019 lui r3,0x8019 | 0018d9e8: 8c632d90 lw r3,0x2d90(r3) |Target current action pointer 0018d9ec: 00000000 nop | 0018d9f0: a0620025 sb r2,0x0025(r3) |store attack type = 0x08 status change 0018d9f4: 8fbf0010 lw r31,0x0010(r29) END 0018d9f8: 27bd0018 addiu r29,r29,0x0018 0018d9fc: 03e00008 jr r31 0018da00: 00000000 nop