Difference between revisions of "Compare Target Priority and Hit Rate (00196db0)"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Updated documentation)
m
Line 1: Line 1:
 
  Compare Target Priority and Hit Rate
 
  Compare Target Priority and Hit Rate
  
  00196db0: 90860000 lbu r6,0x0000(r4) Highest ? (0x30 in AI Data)
+
  00196db0: 90860000 lbu r6,0x0000(r4) Highest ? (0x30 in AI Data) (Can kill this unit flag?)
 
  00196db4: 90a30000 lbu r3,0x0000(r5) Always zero, but set in a half word along with Hit Rate
 
  00196db4: 90a30000 lbu r3,0x0000(r5) Always zero, but set in a half word along with Hit Rate
 
  00196db8: 00000000 nop
 
  00196db8: 00000000 nop

Revision as of 01:46, 9 March 2017

Compare Target Priority and Hit Rate
00196db0: 90860000 lbu r6,0x0000(r4)				Highest ? (0x30 in AI Data) (Can kill this unit flag?)
00196db4: 90a30000 lbu r3,0x0000(r5)				Always zero, but set in a half word along with Hit Rate
00196db8: 00000000 nop
00196dbc: 0066102b sltu r2,r3,r6
00196dc0: 14400015 bne r2,r0,0x00196e18			
00196dc4: 34020002 ori r2,r0,0x0002
00196dc8: 00c3102b sltu r2,r6,r3
00196dcc: 14400012 bne r2,r0,0x00196e18
00196dd0: 00001021 addu r2,r0,r0
00196dd4: 84860002 lh r6,0x0002(r4)					Highest Target Priority
00196dd8: 84a30002 lh r3,0x0002(r5)					Load Unit Target Priority
00196ddc: 00000000 nop
00196de0: 0066102a slt r2,r3,r6						
00196de4: 1440000c bne r2,r0,0x00196e18				Exit and return 2 if Current Priority is lower than the highest Priority
00196de8: 34020002 ori r2,r0,0x0002
00196dec: 00c3102a slt r2,r6,r3
00196df0: 14400009 bne r2,r0,0x00196e18				Exit and return 0 if Current Priority is higher than the highest Priority
00196df4: 00001021 addu r2,r0,r0
00196df8: 90840001 lbu r4,0x0001(r4)				Highest Hit%
00196dfc: 90a50001 lbu r5,0x0001(r5)				Load Hit%
00196e00: 00000000 nop
00196e04: 00a4102b sltu r2,r5,r4					
00196e08: 14400003 bne r2,r0,0x00196e18				Exit and return 2 if Current Hit% is lower than highest Hit%
00196e0c: 34020002 ori r2,r0,0x0002
00196e10: 0085102b sltu r2,r4,r5
00196e14: 38420001 xori r2,r2,0x0001				Return 0 if Current Hit% is higher than Highest Hit%; else return 1
00196e18: 03e00008 jr r31
00196e1c: 00000000 nop