Difference between revisions of "Physical Evade Calculation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
  Physical Evade Calculation:
+
  No Parameters
  00188510: 27bdffe8 addiu r29,r29,0xffe8
+
  00188514: afbf0010 sw r31,0x0010(r29)
+
Returns r2 = 0x00 if Attack Hits
  00188518: 0c0613e7 jal 0x00184f9c [[Equipment Evasion Setting (Physical)]]  - Seek and store item evasion , set base hit to 100 (current action date table)
+
  0018851c: 00000000 nop
+
Set the 4 Ability Evade bytes
  00188520: 0c0614b9 jal 0x001852e4 [[Concentrate Calculation]] - Nullify stored evasion if concentrate is equipped
+
  - 0x801938de - Accessory Evade
  00188524: 00000000 nop
+
  - 0x801938df - RH Evade (weapon or shield)
  00188528: 0c0614ca jal 0x00185328 [[Dark/Confuse Caclulation]] Base Hit/2 if attacker blinded or confuse + Nullify stored evasion if attacker is transparent
+
  - 0x801938e0 - LH Evade (weapon or shield)
  0018852c: 00000000 nop
+
  - 0x801938e1 - Class Evade
  00188530: 0c0614df jal 0x0018537c [[Abandon Calculation]] - If target as abandon (and it is usable) --> Base Hit/2
+
Set Ability Base Hit to 100 (0x801938dc)
  00188534: 00000000 nop
+
  00188538: 0c0614fd jal 0x001853f4 [[Evasion Changes due to Statuses]] - Nullify evasion according to target status - Base Hit/2 if target defending
+
Modify Evade bytes and base Hit according to Statuses/Ability/Facing/Weather etc..
  0018853c: 00000000 nop
+
  00188540: 0c0615ce jal 0x00185738 [[Weather effects on Bows]]
+
Roll Each Ability Evade byte against Ability Base Hit
  00188544: 00000000 nop
+
(So something halvering Ability Base hit, will in fact doubles all Evade bytes)
  00188548: 0c06153f jal 0x001854fc [[Facing Evade Calculation]]
+
----------------------------------------------------------------------------------------------
  0018854c: 00000000 nop
+
  00188510: 27bdffe8 addiu r29,r29,-0x0018   
  00188550: 0c062122 jal 0x00188488 [[Calculate Hit %]]
+
  00188514: afbf0010 sw r31,0x0010(r29)      
  00188554: 00000000 nop
+
  00188518: 0c0613e7 jal 0x00184f9c           |{{f/jal|Equipment Evasion Setting (Physical) |Equipment Evasion Setting (Physical) }} Set the 4 Ability Evade byte , set Ability base hit to 100  
  00188558: 8fbf0010 lw r31,0x0010(r29)
+
  0018851c: 00000000 nop                     |
  0018855c: 27bd0018 addiu r29,r29,0x0018
+
  00188520: 0c0614b9 jal 0x001852e4           |{{f/jal|Concentrate Calculation|Concentrate Calculation}}  Nullify the 4 Ability Evade byte if Attacker uses Concentration
  00188560: 03e00008 jr r31
+
  00188524: 00000000 nop                     |
  00188564: 00000000 nop
+
  00188528: 0c0614ca jal 0x00185328           |{{f/jal|Dark/Confuse Caclulation |Dark/Confuse Caclulation }}  Ability Base Hit/2 if attacker blinded or confused / Nullify the 4 Ability Evade byte if attacker is transparent
 +
  0018852c: 00000000 nop                     |
 +
  00188530: 0c0614df jal 0x0018537c           |{{f/jal|Abandon Calculation |Abandon Calculation }}  If target as abandon (and it is usable) --> Ability Base Hit/2
 +
  00188534: 00000000 nop                     |
 +
  00188538: 0c0614fd jal 0x001853f4           |{{f/jal|Evasion Changes due to Statuses|Evasion Changes due to Statuses}}  Nullify the 4 Ability evade byte based on Target status - Ability Base Hit/2 if target defending
 +
  0018853c: 00000000 nop                     |
 +
  00188540: 0c0615ce jal 0x00185738           |{{f/jal|Weather effects on Bows|Weather effects on Bows}} With Bows/Crossbows : Night = Ability base Hit * 0,75 and/or If Stormy weather Ability base hit *0,75
 +
  00188544: 00000000 nop                     |
 +
  00188548: 0c06153f jal 0x001854fc           |{{f/jal|Facing Evade Calculation|Facing Evade Calculation}}  Side Attack cancels Class evasion, Back Attack additionnaly cancels Right/Left hand evasion
 +
  0018854c: 00000000 nop                     |
 +
  00188550: 0c062122 jal 0x00188488           |{{f/jal|Calculate Hit %|Calculate Hit %}}  Roll the 4 Ability Evade byte (one after another) against Ability base Hit
 +
  00188554: 00000000 nop                    
 +
  00188558: 8fbf0010 lw r31,0x0010(r29)      
 +
  0018855c: 27bd0018 addiu r29,r29,0x0018    
 +
  00188560: 03e00008 jr r31                  
 +
  00188564: 00000000 nop                    
 +
 
 
'''Return Locations'''
 
'''Return Locations'''
 
  00188b64: Formula 01 ([[01 Dmg (Weapon)|link]])
 
  00188b64: Formula 01 ([[01 Dmg (Weapon)|link]])

Revision as of 13:57, 7 April 2022

No Parameters 

Returns r2 = 0x00 if Attack Hits

Set the 4 Ability Evade bytes
 - 0x801938de - Accessory Evade
 - 0x801938df - RH Evade (weapon or shield)
 - 0x801938e0 - LH Evade (weapon or shield)
 - 0x801938e1 - Class Evade
Set Ability Base Hit to 100 (0x801938dc)

Modify Evade bytes and base Hit according to Statuses/Ability/Facing/Weather etc..

Roll Each Ability Evade byte against Ability Base Hit
(So something halvering Ability Base hit, will in fact doubles all Evade bytes)
----------------------------------------------------------------------------------------------
00188510: 27bdffe8 addiu r29,r29,-0x0018    
00188514: afbf0010 sw r31,0x0010(r29)       
00188518: 0c0613e7 jal 0x00184f9c           |-->Equipment Evasion Setting (Physical)  Set the 4 Ability Evade byte , set Ability base hit to 100 
0018851c: 00000000 nop                      |
00188520: 0c0614b9 jal 0x001852e4           |-->Concentrate Calculation  Nullify the 4 Ability Evade byte if Attacker uses Concentration
00188524: 00000000 nop                      |
00188528: 0c0614ca jal 0x00185328           |-->Dark/Confuse Caclulation    Ability Base Hit/2 if attacker blinded  or confused / Nullify the 4 Ability Evade byte if attacker is transparent
0018852c: 00000000 nop                      |
00188530: 0c0614df jal 0x0018537c           |-->Abandon Calculation   If target as abandon (and it is usable) --> Ability Base Hit/2
00188534: 00000000 nop                      |
00188538: 0c0614fd jal 0x001853f4           |-->Evasion Changes due to Statuses  Nullify the 4 Ability evade byte based on Target status - Ability Base Hit/2 if target defending
0018853c: 00000000 nop                      |
00188540: 0c0615ce jal 0x00185738           |-->Weather effects on Bows With Bows/Crossbows : Night = Ability base Hit * 0,75 and/or If Stormy weather Ability base hit *0,75
00188544: 00000000 nop                      |
00188548: 0c06153f jal 0x001854fc           |-->Facing Evade Calculation  Side Attack cancels Class evasion, Back Attack additionnaly cancels Right/Left hand evasion
0018854c: 00000000 nop                      |
00188550: 0c062122 jal 0x00188488           |-->Calculate Hit %  Roll the 4 Ability Evade byte (one after another) against Ability base Hit
00188554: 00000000 nop                      
00188558: 8fbf0010 lw r31,0x0010(r29)       
0018855c: 27bd0018 addiu r29,r29,0x0018     
00188560: 03e00008 jr r31                   
00188564: 00000000 nop                      

Return Locations

00188b64: Formula 01 (link)
00188ba4: Formula 02 (link)
00188cf4: Formula 06 (link)
001896ec: Formula 25 (link)
00189794: Formula 26 (link)
00189828: Formula 27 (link)
00189870: Formula 28 (link)
00189a90: Formula 2B (link return at 00189a9c)
00189ad8: Formula 2C (link)
00189b20: Formula 2D (link)
00189b94: Formula 2E (link)
00189c50: Formula 2F (link)
00189c90: Formula 30 (link)
00189cd0: Formula 31 (link)
00189f84: Formula 37 (link)
0018a3d0: Formula 4D (link)
0018a458: Formula 4F (link)
0018a4a0: Formula 50 (link)
0018ab98: Formula 63 (link)