Dark/Confuse Caclulation

From Final Fantasy Hacktics Wiki
Revision as of 20:04, 22 March 2022 by Orkney (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Dark/Confuse Caclulation - No Parameters, Returns nothing

If Attacker has Darkness or Confusion : Halve Current ability base Hit (0x801938dc)
If Attacker has Transparent : nullify Current Ability Evasion bytes
---------------------------------------------------------------------------------------------------------- 
00185328: 3c028019 lui r2,0x8019            |
0018532c: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker data pointer
00185330: 27bdffe8 addiu r29,r29,-0x0018    |
00185334: afbf0010 sw r31,0x0010(r29)       |
00185338: 90420059 lbu r2,0x0059(r2)        |r2 = Attacker 2nd set of Statuses byte
0018533c: 00000000 nop                      |
00185340: 30420030 andi r2,r2,0x0030        |r2 <> 0x00 If Attacker has Darkness or Confusion
00185344: 10400007 beq r2,r0,0x00185364     #If Attacker has Darkness or Confusion /Else Branch to Transparent check
00185348: 00000000 nop                          |
0018534c: 3c038019 lui r3,0x8019                |
00185350: 246338dc addiu r3,r3,0x38dc           |r3 = 0x801938dc (Base Hit pointer)
00185354: 90620000 lbu r2,0x0000(r3)            |r2 = Current Ability Base Hit%
00185358: 00000000 nop                          |
0018535c: 00021042 srl r2,r2,0x01               |r2 = Base Hit / 2 Base Hit / 2
00185360: a0620000 sb r2,0x0000(r3)             |Store Halved Base Hit at 0x801938dc
00185364: 0c06152e jal 0x001854b8           |-->Transparent Calculation Nullify All Current Ability Evasion byte if Attacker is Transparent
00185368: 00000000 nop                      
0018536c: 8fbf0010 lw r31,0x0010(r29)       END
00185370: 27bd0018 addiu r29,r29,0x0018     
00185374: 03e00008 jr r31                   
00185378: 00000000 nop                    

Return Locations

Battle.bin
00188530: Physical Evade Calculation
00188588: Physical Evade Calculation(Charge)