Difference between revisions of "Katana Break Chance"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Expanding.)
m (return link)
Line 48: Line 48:
 
  001879c0: 03e00008 jr r31
 
  001879c0: 03e00008 jr r31
 
  001879c4: 00000000 nop
 
  001879c4: 00000000 nop
 +
 +
==Return location==
 +
001895d4: [[20_Dmg_(MA*Y)|Formula 20 - Dmg (MA*Y)]]
 +
00189604: [[21_DmgMP_(MA*Y)|Formula 21 - DmgMP (MA*Y)]]
 +
00189664: [[22_Hit_(100%25)_Status|Formula 22 - Hit (100%) Status]]
 +
0018968c: [[23_Heal_(MA*Y)|Formula 23 - Heal (MA*Y)]]

Revision as of 20:09, 26 August 2021

Katana Break Chance: 
00187910: 3c028019 lui r2,0x8019		
00187914: 8c422d94 lw r2,0x2d94(r2)		Load Attacker's Stats
00187918: 27bdffe8 addiu r29,r29,0xffe8		
0018791c: afbf0010 sw r31,0x0010(r29)		
00187920: 90430003 lbu r3,0x0003(r2)		Load Attacker's Job
00187924: 3402005d ori r2,r0,0x005d		r2 = 5d
00187928: 10620023 beq r3,r2,0x001879b8		Branch to the end if Attack is a  Mime (to prevent them from breaking the katana)
0018792c: 34020001 ori r2,r0,0x0001		R2 = 1
00187930: 3c038019 lui r3,0x8019		
00187934: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data   Pointer
00187938: 00000000 nop				
0018793c: a0620000 sb r2,0x0000(r3)		
00187940: 3c028019 lui r2,0x8019		
00187944: 8c422d94 lw r2,0x2d94(r2)		Load Attacker's Stats
00187948: 3c038019 lui r3,0x8019		
0018794c: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data  Pointer
00187950: 90420176 lbu r2,0x0176(r2)		
00187954: 00000000 nop
00187958: a0620003 sb r2,0x0003(r3)		
0018795c: 3c038019 lui r3,0x8019		
00187960: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data  Pointer
00187964: 34020008 ori r2,r0,0x0008		R2 = 8
00187968: a0620002 sb r2,0x0002(r3)		
0018796c: 3c028019 lui r2,0x8019		
00187970: 8c42f5fc lw r2,-0x0a04(r2)		
00187974: 00000000 nop				
00187978: 1440000b bne r2,r0,0x001879a8		
0018797c: 00000000 nop				
00187980: 3c058019 lui r5,0x8019		
00187984: 90a53902 lbu r5,0x3902(r5)		R5 = Weapon Power
00187988: 0c017833 jal 0x0005e0cc		R2 = rollChance(R4,R5)
0018798c: 34040064 ori r4,r0,0x0064		R4 = 100 (break chance equals WP%)
00187990: 10400005 beq r2,r0,0x001879a8		Branch on R2
Case R2 != 0: Not broken
  00187994: 34020008 ori r2,r0,0x0008		r2 = 8
  00187998: 3c038019 lui r3,0x8019		
  0018799c: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data Pointer
  001879a0: 08061e6e j 0x001879b8			
  001879a4: a4620010 sh r2,0x0010(r3)		Action->SpecialFlags = 8 (Put katana back)
Case R2 == 0: Broken
  001879a8: 3c038019 lui r3,0x8019	 	
  001879ac: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data Pointer
  001879b0: 34021000 ori r2,r0,0x1000		
  001879b4: a4620010 sh r2,0x0010(r3)		Action->SpecialFlags = 0x1000 (Show "Broken")
001879b8: 8fbf0010 lw r31,0x0010(r29)		
001879bc: 27bd0018 addiu r29,r29,0x0018		
001879c0: 03e00008 jr r31			
001879c4: 00000000 nop

Return location

001895d4: Formula 20 - Dmg (MA*Y)
00189604: Formula 21 - DmgMP (MA*Y)
00189664: Formula 22 - Hit (100%) Status
0018968c: Formula 23 - Heal (MA*Y)