Difference between revisions of "Magical Evade Calculation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
  Magical Evade Calculation:
+
  No Parameters
  001885b8: 27bdffe8 addiu r29,r29,0xffe8
+
  001885bc: afbf0010 sw r31,0x0010(r29)
+
Returns r2 = 0x00 if Attack hits / Else 0x01
  001885c0: 0c061471 jal 0x001851c4 [[Equipment Evasion Setting (Magical)]]
+
  001885c4: 00000000 nop
+
Set Ability base Hit and Ability Evade bytes (Accessory, Right and Left hands)
  001885c8: 0c06152e jal 0x001854b8 [[Transparent Calculation]]
+
Modify Evade bytes or base hit (Status, support)
  001885cc: 00000000 nop
+
Roll Evade bytes Vs Base Hit
  001885d0: 0c0614df jal 0x0018537c [[Abandon Calculation]]
+
----------------------------------------------------------------------------------
  001885d4: 00000000 nop
+
  001885b8: 27bdffe8 addiu r29,r29,-0x0018   
  001885d8: 0c0614fd jal 0x001853f4 [[Evasion Changes due to Statuses]]
+
  001885bc: afbf0010 sw r31,0x0010(r29)      
  001885dc: 00000000 nop
+
  001885c0: 0c061471 jal 0x001851c4           |{{f/jal|Equipment Evasion Setting (Magical) |Equipment Evasion Setting (Magical) }} Set Base Hit to 100 / Set Ability Acc. Right Hand and Left Hand Evasion
  001885e0: 0c062122 jal 0x00188488 [[Calculate Hit %]]
+
  001885c4: 00000000 nop                     |
  001885e4: 00000000 nop
+
  001885c8: 0c06152e jal 0x001854b8           |{{f/jal|Transparent Calculation|Transparent Calculation}} Nullify the All Ability Evasion bytes if Attacker uses Concentration
  001885e8: 8fbf0010 lw r31,0x0010(r29)
+
  001885cc: 00000000 nop                     |
  001885ec: 27bd0018 addiu r29,r29,0x0018
+
  001885d0: 0c0614df jal 0x0018537c           |{{f/jal|Abandon Calculation |Abandon Calculation }} If target as abandon (and it is usable) --> Ability Base Hit/2
  001885f0: 03e00008 jr r31
+
  001885d4: 00000000 nop                     |
  001885f4: 00000000 nop
+
  001885d8: 0c0614fd jal 0x001853f4           |{{f/jal|Evasion Changes due to Statuses|Evasion Changes due to Statuses}} Nullify all Ability evasion bytes based on Target status - Ability Base Hit/2 if target defending
 
+
  001885dc: 00000000 nop                     |
== Return Locations ==
+
  001885e0: 0c062122 jal 0x00188488           |{{f/jal|Calculate Hit %|Calculate Hit %}} If Ability is evadeable : Roll the All Ability Evade bytes (one after another) against Ability base Hit
 
+
  001885e4: 00000000 nop                     |
*Battle.bin (in progress)
+
  001885e8: 8fbf0010 lw r31,0x0010(r29)      
 
+
  001885ec: 27bd0018 addiu r29,r29,0x0018    
  001890dc: [[10_AbsHP_(Y)%25_Hit_F(MA%2BX)%25]]
+
  001885f0: 03e00008 jr r31                  
 +
  001885f4: 00000000 nop  
 +
=== Return Locations ===
 +
'''Battle.bin '''
 +
00188d94: [[08_Dmg_F(MA*Y)|Formula 08 - Dmg F(MA*Y)]]
 +
00188e04: [[09_Dmg_(Y/100)%25_Hit_F(MA%2BX)%25|Formula 09 - Dmg (Y/100)% Hit F(MA+X)%]]
 +
00188e88: [[0A_Hit_F(MA%2BX)%25|Formula 0A - Hit F(MA+X)%]]
 +
  00188fd4: [[0E_Dmg_(Y)%25_Hit_F(MA%2BX)%25_100%25_Status_Hide_Status|Formula 0E - Dmg (Y)% Hit F(MA+X)% 100% Status Hide Status]]
 +
00189094: [[0F_AbsMP_(Y)%25_Hit_F(MA%2BX)%25|Formula 0F - AbsMP(Y%) Hit F(MA+X)%]]
 +
001890e8: [[10_AbsHP_(Y)%25_Hit_F(MA%2BX)%25|Formula 10 - AbsHP(Y%) Hit F(MA+X)%]]
 +
001891bc: [[15_Set_CT00_Hit_F(MA%2BX)%25|Formula 15 - Set CT00 Hit F(MA+X)%]]
 +
00189214: [[16_DmgMP_(TarCurMP)_Hit_F(MA%2BX)%25|Formula 16 - DmgMP (TarCurMP) Hit F(MA+X)%]]
 +
0018926c: [[17_Dmg_(TarCurHP-1)_Hit_F(MA%2BX)%25|Formula 17 - Dmg (TarCurHP-1) Hit F(MA+X)%]]
 +
001892bc: [[1A_Hit_F(MA%2BY)%25_//_-PA/MA/SP_(X)|Formula 1A - Hit F(MA+Y)% // -PA/MA/SP (X)]]
 +
0018934c: [[1B_DmgMP_(MA%2BY)%25_Hit_F(X)%25|Formula 1B - DmgMP (MA+Y)% Hit F(X)%]]
 +
00189444: [[1E_Dmg_((MA%2BY)*MA/2)#Hit.28Rdm.281.2CX.29.29|Formula 1E - Dmg ((MA+Y)*MA/2)]]
 +
00189474: [[1F_Dmg_((100-CasF)*(100-TarF)*(MA%2BY)*MA/2)#Hit.28Rdm.281.2CX.29.29|Formula 1F - Dmg ((100-CasF)*(100-TarF)*(MA+Y)*MA/2)]]
 +
001896c4: [[24_Dmg_((PA%2BY)/2*MA)|Formula 24 - Dmg ((PA+Y)/2*MA)]]
 +
00189fdc: [[3D_Hit_(MA%2BX)%25|Formula 3D - Hit (MA+X)%]]
 +
0018a430: [[4E_Dmg_(MA*Y)|Formula 3E - Dmg (MA*Y)]]
 +
0018a5f4: [[53_Dmg_(X)%25_Hit_(MA%2BX)%25|Formula 53 - Dmg (X)% Hit (MA+X)%]]
 +
0018a6a8: [[55_–PA_(Y)_Hit_(MA%2BX)%25|Formula 55 - –PA (Y) Hit (MA+X)%]]
 +
0018a708: [[56_–MA_(Y)_Hit_(MA%2BX)%25|Formula 56 - –MA (Y) Hit (MA+X)%]]
 +
0018a918: [[59_–Lvl(1)_Hit_(MA%2BX)%25|Formula 59 - –Lvl(1) Hit (MA+X)%]]
 +
0018aaa8: [[5E_Dmg_((MA%2BY)/2*MA)#Hit_.28X.2B1.29_Status|Formula 5E - Dmg ((MA+Y)/2*MA)]]
 +
0018aad8: [[5F_Dmg_((MA%2BY)/2*MA)|Formula 5F - Dmg ((MA+Y)/2*MA)]]
 +
0018ab28: [[61_–Brave_(Y)_Hit_F(MA%2BX)%25|Formula 61 - –Brave (Y) Hit F(MA+X)%]]
 +
0018ab68: [[62_–Brave_(Y)_Hit_(MA%2BX)%25|Formula 62 - –Brave (Y) Hit (MA+X)%]]

Latest revision as of 18:50, 13 April 2022

No Parameters 

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

Set Ability base Hit and Ability Evade bytes (Accessory, Right and Left hands)
Modify Evade bytes or base hit (Status, support)
Roll Evade bytes Vs Base Hit
----------------------------------------------------------------------------------
001885b8: 27bdffe8 addiu r29,r29,-0x0018    
001885bc: afbf0010 sw r31,0x0010(r29)       
001885c0: 0c061471 jal 0x001851c4           |-->Equipment Evasion Setting (Magical)  Set Base Hit to 100 / Set Ability Acc. Right Hand and Left Hand Evasion
001885c4: 00000000 nop                      |
001885c8: 0c06152e jal 0x001854b8           |-->Transparent Calculation Nullify the All Ability Evasion bytes if Attacker uses Concentration
001885cc: 00000000 nop                      |
001885d0: 0c0614df jal 0x0018537c           |-->Abandon Calculation  If target as abandon (and it is usable) --> Ability Base Hit/2
001885d4: 00000000 nop                      |
001885d8: 0c0614fd jal 0x001853f4           |-->Evasion Changes due to Statuses Nullify all Ability evasion bytes based on Target status - Ability Base Hit/2 if target defending
001885dc: 00000000 nop                      |
001885e0: 0c062122 jal 0x00188488           |-->Calculate Hit % If Ability is evadeable : Roll the All Ability Evade bytes (one after another) against Ability base Hit
001885e4: 00000000 nop                      |
001885e8: 8fbf0010 lw r31,0x0010(r29)       
001885ec: 27bd0018 addiu r29,r29,0x0018     
001885f0: 03e00008 jr r31                   
001885f4: 00000000 nop 

Return Locations

Battle.bin 
00188d94: Formula 08 - Dmg F(MA*Y)
00188e04: Formula 09 - Dmg (Y/100)% Hit F(MA+X)%
00188e88: Formula 0A - Hit F(MA+X)%
00188fd4: Formula 0E - Dmg (Y)% Hit F(MA+X)% 100% Status Hide Status
00189094: Formula 0F - AbsMP(Y%) Hit F(MA+X)%
001890e8: Formula 10 - AbsHP(Y%) Hit F(MA+X)%
001891bc: Formula 15 - Set CT00 Hit F(MA+X)%
00189214: Formula 16 - DmgMP (TarCurMP) Hit F(MA+X)%
0018926c: Formula 17 - Dmg (TarCurHP-1) Hit F(MA+X)%
001892bc: Formula 1A - Hit F(MA+Y)% // -PA/MA/SP (X)
0018934c: Formula 1B - DmgMP (MA+Y)% Hit F(X)%
00189444: Formula 1E - Dmg ((MA+Y)*MA/2)
00189474: Formula 1F - Dmg ((100-CasF)*(100-TarF)*(MA+Y)*MA/2)
001896c4: Formula 24 - Dmg ((PA+Y)/2*MA)
00189fdc: Formula 3D - Hit (MA+X)%
0018a430: Formula 3E - Dmg (MA*Y)
0018a5f4: Formula 53 - Dmg (X)% Hit (MA+X)%
0018a6a8: Formula 55 - –PA (Y) Hit (MA+X)%
0018a708: Formula 56 - –MA (Y) Hit (MA+X)%
0018a918: Formula 59 - –Lvl(1) Hit (MA+X)%
0018aaa8: Formula 5E - Dmg ((MA+Y)/2*MA)
0018aad8: Formula 5F - Dmg ((MA+Y)/2*MA)
0018ab28: Formula 61 - –Brave (Y) Hit F(MA+X)%
0018ab68: Formula 62 - –Brave (Y) Hit (MA+X)%