Difference between revisions of "Steal Routine"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Steal Routine 0018d3c0: 3c028019 lui r2,0x8019 0018d3c4: 8c422d90 lw r2,0x2d90(r2) target current action pointer 0018d3c8: 27bdffe0 addiu r29,r29,0xffe0 0018d3cc: afbf00...")
 
m (link)
Line 52: Line 52:
 
  0018d488: 3c048019 lui r4,0x8019
 
  0018d488: 3c048019 lui r4,0x8019
 
  0018d48c: 8c842d94 lw r4,0x2d94(r4) attacker data ponter
 
  0018d48c: 8c842d94 lw r4,0x2d94(r4) attacker data ponter
  0018d490: 0c063a7a jal 0x0018e9e8 item/stat increment routines?
+
  0018d490: 0c063a7a jal 0x0018e9e8 [[Item_quantity_increment_for_steal/break%3F]]
 
  0018d494: 00000000 nop
 
  0018d494: 00000000 nop
 
  0018d498: 26100001 addiu r16,r16,0x0001 counter
 
  0018d498: 26100001 addiu r16,r16,0x0001 counter

Revision as of 21:00, 15 March 2022

Steal Routine
0018d3c0: 3c028019 lui r2,0x8019
0018d3c4: 8c422d90 lw r2,0x2d90(r2)		target current action pointer
0018d3c8: 27bdffe0 addiu r29,r29,0xffe0
0018d3cc: afbf001c sw r31,0x001c(r29)
0018d3d0: afb20018 sw r18,0x0018(r29)
0018d3d4: afb10014 sw r17,0x0014(r29)
0018d3d8: afb00010 sw r16,0x0010(r29)
0018d3dc: 94420010 lhu r2,0x0010(r2)		load steal/break item flags
0018d3e0: 00000000 nop
0018d3e4: 30420014 andi r2,r2,0x0014		
0018d3e8: 10400059 beq r2,r0,0x0018d550		branch if not stealing or breaking
0018d3ec: 00008821 addu r17,r0,r0
0018d3f0: 00008021 addu r16,r0,r0
0018d3f4: 341200ff ori r18,r0,0x00ff
0018d3f8: 3c028019 lui r2,0x8019
0018d3fc: 8c422d90 lw r2,0x2d90(r2)		target current action pointer again
0018d400: 34030080 ori r3,r0,0x0080		
0018d404: 90420019 lbu r2,0x0019(r2)		load remove equipment byte
0018d408: 02031807 srav r3,r3,r16		r3 = 0?
0018d40c: 00431024 and r2,r2,r3			
0018d410: 10400021 beq r2,r0,0x0018d498		skip if nothing stolen/broken?
0018d414: 00000000 nop
0018d418: 3c028019 lui r2,0x8019
0018d41c: 8c422d98 lw r2,0x2d98(r2)		target data pointer
0018d420: 00000000 nop
0018d424: 00501821 addu r3,r2,r16		
0018d428: 9065001a lbu r5,0x001a(r3)		??
0018d42c: 00000000 nop
0018d430: 10a00019 beq r5,r0,0x0018d498
0018d434: 00000000 nop
0018d438: 10b20017 beq r5,r18,0x0018d498	
0018d43c: 00051040 sll r2,r5,0x01		
0018d440: 00451021 addu r2,r2,r5
0018d444: 00021080 sll r2,r2,0x02
0018d448: 3c018006 lui r1,0x8006
0018d44c: 00220821 addu r1,r1,r2
0018d450: 90222ebb lbu r2,0x2ebb(r1)		item data pointer
0018d454: 00000000 nop
0018d458: 30420001 andi r2,r2,0x0001		
0018d45c: 1440000e bne r2,r0,0x0018d498
0018d460: 00000000 nop
0018d464: a072001a sb r18,0x001a(r3)		decrement?
0018d468: 3c028019 lui r2,0x8019
0018d46c: 8c422d90 lw r2,0x2d90(r2)		target current action pointer
0018d470: 00000000 nop
0018d474: 94420010 lhu r2,0x0010(r2)		steal/break byte
0018d478: 00000000 nop
0018d47c: 30420010 andi r2,r2,0x0010		steal check
0018d480: 10400005 beq r2,r0,0x0018d498
0018d484: 26310001 addiu r17,r17,0x0001		
0018d488: 3c048019 lui r4,0x8019
0018d48c: 8c842d94 lw r4,0x2d94(r4)		attacker data ponter
0018d490: 0c063a7a jal 0x0018e9e8		Item_quantity_increment_for_steal/break?
0018d494: 00000000 nop
0018d498: 26100001 addiu r16,r16,0x0001		counter
0018d49c: 2a020007 slti r2,r16,0x0007		runs 7 times
0018d4a0: 1440ffd5 bne r2,r0,0x0018d3f8
0018d4a4: 00000000 nop
0018d4a8: 1220002a beq r17,r0,0x0018d554	branch if no steal?
0018d4ac: 00001021 addu r2,r0,r0
0018d4b0: 3c028019 lui r2,0x8019
0018d4b4: 8c42f5fc lw r2,-0x0a04(r2)
0018d4b8: 00000000 nop
0018d4bc: 14400005 bne r2,r0,0x0018d4d4		?
0018d4c0: 00000000 nop
0018d4c4: 3c048019 lui r4,0x8019
0018d4c8: 8c842d98 lw r4,0x2d98(r4)		target data pointe r
0018d4cc: 0c017578 jal 0x0005d5e0		status setting/checking + equip  R/S/M stats check
0018d4d0: 00000000 nop
0018d4d4: 3c058019 lui r5,0x8019
0018d4d8: 8ca52d90 lw r5,0x2d90(r5)		target current action pointer
0018d4dc: 00000000 nop
0018d4e0: 90a30019 lbu r3,0x0019(r5)		remove item byte
0018d4e4: 34020010 ori r2,r0,0x0010		
0018d4e8: 10620003 beq r3,r2,0x0018d4f8		branch if right hand weapon
0018d4ec: 34020004 ori r2,r0,0x0004		
0018d4f0: 14620018 bne r3,r2,0x0018d554		branch if left hand weapon
0018d4f4: 34020001 ori r2,r0,0x0001		
0018d4f8: 3c048019 lui r4,0x8019
0018d4fc: 8c842d98 lw r4,0x2d98(r4)		target data pointer?? again??
0018d500: 00000000 nop
0018d504: 90820058 lbu r2,0x0058(r4)		load status 1	
0018d508: 00000000 nop
0018d50c: 30420008 andi r2,r2,0x0008		if  charging?
0018d510: 1040000d beq r2,r0,0x0018d548		branch if not charging
0018d514: 340200ff ori r2,r0,0x00ff
0018d518: 9083015d lbu r3,0x015d(r4)		load target current ability CT
0018d51c: 00000000 nop
0018d520: 10620009 beq r3,r2,0x0018d548
0018d524: 34020008 ori r2,r0,0x0008
0018d528: 9083016f lbu r3,0x016f(r4)		skillset of last attack used
0018d52c: 00000000 nop
0018d530: 14620005 bne r3,r2,0x0018d548		branch if skillset != charge?
0018d534: 00000000 nop
0018d538: 90a20020 lbu r2,0x0020(r5)		attack status removal 1
0018d53c: 00000000 nop
0018d540: 34420008 ori r2,r2,0x0008
0018d544: a0a20020 sb r2,0x0020(r5)		store remove charge
0018d548: 08063555 j 0x0018d554			
0018d54c: 34020001 ori r2,r0,0x0001
0018d550: 00001021 addu r2,r0,r0
0018d554: 8fbf001c lw r31,0x001c(r29)
0018d558: 8fb20018 lw r18,0x0018(r29)
0018d55c: 8fb10014 lw r17,0x0014(r29)
0018d560: 8fb00010 lw r16,0x0010(r29)
0018d564: 27bd0020 addiu r29,r29,0x0020
0018d568: 03e00008 jr r31
0018d56c: 00000000 nop