Difference between revisions of "Conditional Status Proc Roll (19%)"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " 001884c0: 27bdffe8 addiu r29,r29,0xffe8 001884c4: afbf0010 sw r31,0x0010(r29) 001884c8: 0c061da4 jal 0x00187690 # Conditional status proc roll (19%) 001884cc: 00000000 no...")
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  001884c0: 27bdffe8 addiu r29,r29,0xffe8
+
No Parameters
 +
 +
Returns r2 = 0x00 if Proc is triggered or if Action is a preview ( 0x8018f5fc = 0x02 )
 +
-----------------------------------------------------------------------------------------------------------
 +
  001884c0: 27bdffe8 addiu r29,r29,-0x0018
 
  001884c4: afbf0010 sw r31,0x0010(r29)
 
  001884c4: afbf0010 sw r31,0x0010(r29)
  001884c8: 0c061da4 jal 0x00187690 # Conditional status proc roll (19%)
+
  001884c8: 0c061da4 jal 0x00187690 # [[Conditional Status Proc Roll (19%) Inner Routine]]
 
  001884cc: 00000000 nop
 
  001884cc: 00000000 nop
 
  001884d0: 3c038019 lui r3,0x8019
 
  001884d0: 3c038019 lui r3,0x8019
Line 19: Line 23:
 
  00188508: 03e00008 jr r31
 
  00188508: 03e00008 jr r31
 
  0018850c: 00000000 nop
 
  0018850c: 00000000 nop
 +
=== Alternatives Notes ===
 +
001884c0: 27bdffe8 addiu r29,r29,-0x0018
 +
001884c4: afbf0010 sw r31,0x0010(r29)     
 +
001884c8: 0c061da4 jal 0x00187690              |{{f/jal|Conditional Status Proc Roll (19%) Inner Routine|Conditional Status Proc Roll (19%) Inner Routine}} Enable TCA special flag 2 0x02 if Proc is triggered
 +
001884cc: 00000000 nop                          |
 +
001884d0: 3c038019 lui r3,0x8019                |
 +
001884d4: 8c63f5fc lw r3,-0x0a04(r3)            |{{f/adr|<nowiki>r3 = Action Stata data pointer 0x8018f5fc</nowiki>}}
 +
001884d8: 34020002 ori r2,r0,0x0002            |{{f/std|<nowiki>r2 = 0x02</nowiki>}}
 +
001884dc: 10620008 beq r3,r2,0x00188500        {{f/Cond|If Action is not an attack preview}} /If preview : branch to END returns r2 = 0x00
 +
001884e0: 00001021 addu r2,r0,r0                |{{f/std|<nowiki>r2 = 0x00</nowiki>}}
 +
001884e4: 3c028019 lui r2,0x8019                    |
 +
001884e8: 8c422d90 lw r2,0x2d90(r2)                |{{f/adr|<nowiki>r2 = TCA data pointer</nowiki>}}
 +
001884ec: 00000000 nop                              |
 +
001884f0: 94420010 lhu r2,0x0010(r2)                |{{f/load|<nowiki>r2 = TCA special flags</nowiki>}}
 +
001884f4: 00000000 nop                              |
 +
001884f8: 30420200 andi r2,r2,0x0200                |{{f/std|<nowiki>r2 = 0x0200 if Proc is triggered</nowiki>}}
 +
001884fc: 2c420001 sltiu r2,r2,0x0001              |{{f/std|<nowiki>r2 = 0x00 if proc is triggered / Else 0x01</nowiki>}}
 +
00188500: 8fbf0010 lw r31,0x0010(r29)          END
 +
00188504: 27bd0018 addiu r29,r29,0x0018           
 +
00188508: 03e00008 jr r31                         
 +
0018850c: 00000000 nop
 +
=== Return location ===
 +
00188694: [[Weapon_Damage_Calculation]] (return to formula 01 and 02)
 +
00188734: [[Elemental_Absorb_and_status_roll]]
 +
001887dc: [[Elemental_Absorb/Status]]
 +
00188cd4: [[05_Dmg_(Weapon)|Formula 05 - Dmg (Weapon)]]
 +
00189d54: [[31_Dmg_((PA%2BY)/2*PA)|Formula 31 - Dmg ((PA+Y)/2*PA)]]

Latest revision as of 19:22, 5 April 2022

No Parameters

Returns r2 = 0x00 if Proc is triggered or if Action is a preview ( 0x8018f5fc = 0x02 ) 
-----------------------------------------------------------------------------------------------------------
001884c0: 27bdffe8 addiu r29,r29,-0x0018
001884c4: afbf0010 sw r31,0x0010(r29)
001884c8: 0c061da4 jal 0x00187690		#	Conditional Status Proc Roll (19%) Inner Routine
001884cc: 00000000 nop
001884d0: 3c038019 lui r3,0x8019
001884d4: 8c63f5fc lw r3,-0x0a04(r3)
001884d8: 34020002 ori r2,r0,0x0002
001884dc: 10620008 beq r3,r2,0x00188500		#	if (mem_word[0x8018f5fc] == 2)
001884e0: 00001021 addu r2,r0,r0		#		return 0;
001884e4: 3c028019 lui r2,0x8019
001884e8: 8c422d90 lw r2,0x2d90(r2)
001884ec: 00000000 nop
001884f0: 94420010 lhu r2,0x0010(r2)
001884f4: 00000000 nop
001884f8: 30420200 andi r2,r2,0x0200
001884fc: 2c420001 sltiu r2,r2,0x0001		#	Return 0 if status proc succeeds, 1 otherwise
00188500: 8fbf0010 lw r31,0x0010(r29)
00188504: 27bd0018 addiu r29,r29,0x0018
00188508: 03e00008 jr r31
0018850c: 00000000 nop

Alternatives Notes

001884c0: 27bdffe8 addiu r29,r29,-0x0018
001884c4: afbf0010 sw r31,0x0010(r29)       
001884c8: 0c061da4 jal 0x00187690               |-->Conditional Status Proc Roll (19%) Inner Routine Enable TCA special flag 2 0x02 if Proc is triggered
001884cc: 00000000 nop                          |
001884d0: 3c038019 lui r3,0x8019                |
001884d4: 8c63f5fc lw r3,-0x0a04(r3)            |r3 = Action Stata data pointer 0x8018f5fc
001884d8: 34020002 ori r2,r0,0x0002             |r2 = 0x02
001884dc: 10620008 beq r3,r2,0x00188500         #If Action is not an attack preview /If preview : branch to END returns r2 = 0x00
001884e0: 00001021 addu r2,r0,r0                |r2 = 0x00
001884e4: 3c028019 lui r2,0x8019                    |
001884e8: 8c422d90 lw r2,0x2d90(r2)                 |r2 = TCA data pointer
001884ec: 00000000 nop                              |
001884f0: 94420010 lhu r2,0x0010(r2)                |r2 = TCA special flags
001884f4: 00000000 nop                              |
001884f8: 30420200 andi r2,r2,0x0200                |r2 = 0x0200 if Proc is triggered
001884fc: 2c420001 sltiu r2,r2,0x0001               |r2 = 0x00 if proc is triggered / Else 0x01
00188500: 8fbf0010 lw r31,0x0010(r29)          END
00188504: 27bd0018 addiu r29,r29,0x0018             
00188508: 03e00008 jr r31                           
0018850c: 00000000 nop 

Return location

00188694: Weapon_Damage_Calculation (return to formula 01 and 02)
00188734: Elemental_Absorb_and_status_roll
001887dc: Elemental_Absorb/Status
00188cd4: Formula 05 - Dmg (Weapon)
00189d54: Formula 31 - Dmg ((PA+Y)/2*PA)