Difference between revisions of "Calculate Accuracy for Physical"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
  Routine used in formula 2B
+
  No Parameters
  001886d4: 27bdffe8 addiu r29,r29,0xffe8
+
  001886d8: afbf0010 sw r31,0x0010(r29)
+
Returns r2 = 0x00 if Attack hits / Else 0x01
  001886dc: 0c06217e jal 0x001885f8 [[Physical_XA_Modifying_Statuses/Support]]
+
  001886e0: 00000000 nop
+
Modify Ability XA (Support, Status etc...)
  001886e4: 0c061967 jal 0x0018659c [[Set XA + YA for Status Formulas (Stupid section)]]
+
Modify Ability YA (Compat)
  001886e8: 00000000 nop
+
Uses XA+YA as Hit% vs Random (0 to 100)
  001886ec: 0c061d44 jal 0x00187510             [[Use_Specific_Action_Hit_Percentage]]
+
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  001886f0: 00000000 nop
+
  001886d4: 27bdffe8 addiu r29,r29,-0x0018    |
  001886f4: 3c028019 lui r2,0x8019
+
  001886d8: afbf0010 sw r31,0x0010(r29)       |
  001886f8: 8c422d90 lw r2,0x2d90(r2) target action pointer
+
  001886dc: 0c06217e jal 0x001885f8           |{{f/jal|Physical_XA_Modifying_Statuses/Support|Physical_XA_Modifying_Statuses/Support}} Modify Ability XA (Support Abilities, Status, Compatibility)
  001886fc: 00000000 nop
+
  001886e0: 00000000 nop                     |
  00188700: 90420000 lbu r2,0x0000(r2) load hit flag
+
  001886e4: 0c061967 jal 0x0018659c           |{{f/jal|Set XA + YA for Status Formulas (Stupid section)|Set XA + YA for Status Formulas (Stupid section)}} XA+YA becomes TCA HP damage (YA is processed via compatibility)
  00188704: 00000000 nop
+
  001886e8: 00000000 nop                     |
  00188708: 2c420001 sltiu r2,r2,0x0001 set if did not hit
+
  001886ec: 0c061d44 jal 0x00187510           |{{f/jal|Uses_HP_damage_as_Action_hit%25|Uses_HP_damage_as_Action_hit%25}} HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
  0018870c: 8fbf0010 lw r31,0x0010(r29)
+
  001886f0: 00000000 nop                     |
  00188710: 27bd0018 addiu r29,r29,0x0018
+
  001886f4: 3c028019 lui r2,0x8019           |
  00188714: 03e00008 jr r31
+
  001886f8: 8c422d90 lw r2,0x2d90(r2)         |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  00188718: 00000000 nop
+
  001886fc: 00000000 nop                     |
 
+
  00188700: 90420000 lbu r2,0x0000(r2)       |{{f/load|<nowiki>r2 = TCA hit flag</nowiki>}}
== Return Locations ==
+
  00188704: 00000000 nop                     |
 
+
  00188708: 2c420001 sltiu r2,r2,0x0001       |{{f/std|<nowiki>r2 = 0x01 is attack miss / 0x00 if Attack hits</nowiki>}}
*Battle.bin (in progress)
+
  0018870c: 8fbf0010 lw r31,0x0010(r29)      
 
+
  00188710: 27bd0018 addiu r29,r29,0x0018    
 +
  00188714: 03e00008 jr r31                  
 +
  00188718: 00000000 nop
 +
=== Return Locations ===
 +
'''Battle.bin'''
 +
00189744: [[25_Equipped:_Break_Hit_(PA%2BWP%2BX)%25|Formula 25 : Equipped: Break Hit (PA+WP+X)%]]
 
  00189ab8: [[2B_Hit_(PA%2BX)%25_//_-PA/MA/SP_(X)|Formula 2B : Hit(PA+X)% -PA/MA/SP(X)]]
 
  00189ab8: [[2B_Hit_(PA%2BX)%25_//_-PA/MA/SP_(X)|Formula 2B : Hit(PA+X)% -PA/MA/SP(X)]]
  00189744: [[25_Equipped:_Break_Hit_(PA%2BWP%2BX)%25|Formula 25 : Equipped: Break Hit (PA+WP+X)%]]
+
  00189b00: [[2C_DmgMP_(X)%25_Hit_(PA%2BY)%25]]

Revision as of 19:44, 20 April 2022

No Parameters 

Returns r2 = 0x00 if Attack hits / Else 0x01

Modify Ability XA (Support, Status etc...)
Modify Ability YA (Compat)
Uses XA+YA as Hit% vs Random (0 to 100)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
001886d4: 27bdffe8 addiu r29,r29,-0x0018    |
001886d8: afbf0010 sw r31,0x0010(r29)       |
001886dc: 0c06217e jal 0x001885f8           |-->Physical_XA_Modifying_Statuses/Support Modify Ability XA (Support Abilities, Status, Compatibility)
001886e0: 00000000 nop                      |
001886e4: 0c061967 jal 0x0018659c           |-->Set XA + YA for Status Formulas (Stupid section) XA+YA becomes TCA HP damage (YA is processed via compatibility) 
001886e8: 00000000 nop                      |
001886ec: 0c061d44 jal 0x00187510           |-->Uses_HP_damage_as_Action_hit%25 HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
001886f0: 00000000 nop                      |
001886f4: 3c028019 lui r2,0x8019            |
001886f8: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
001886fc: 00000000 nop                      |
00188700: 90420000 lbu r2,0x0000(r2)        |r2 = TCA hit flag
00188704: 00000000 nop                      |
00188708: 2c420001 sltiu r2,r2,0x0001       |r2 = 0x01 is attack miss / 0x00 if Attack hits
0018870c: 8fbf0010 lw r31,0x0010(r29)       
00188710: 27bd0018 addiu r29,r29,0x0018     
00188714: 03e00008 jr r31                   
00188718: 00000000 nop  

Return Locations

Battle.bin
00189744: Formula 25 : Equipped: Break Hit (PA+WP+X)%
00189ab8: Formula 2B : Hit(PA+X)% -PA/MA/SP(X)
00189b00: 2C_DmgMP_(X)%_Hit_(PA+Y)%