Difference between revisions of "Dark/Confuse Caclulation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Dark/Confuse Caclulation 00185328: 3c028019 lui r2,0x8019 0018532c: 8c422d94 lw r2,0x2d94(r2) Load Attacker's Data Pointer 00185330: 27bdffe8 addiu r29,r29,0xffe8 001853...")
 
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  Dark/Confuse Caclulation
+
  Dark/Confuse Caclulation - No Parameters, Returns nothing
  00185328: 3c028019 lui r2,0x8019
+
  0018532c: 8c422d94 lw r2,0x2d94(r2) Load Attacker's Data Pointer
+
If Attacker has Darkness or Confusion : Halve Current ability base Hit (0x801938dc)
  00185330: 27bdffe8 addiu r29,r29,0xffe8
+
If Attacker has Transparent : nullify Current Ability Evasion bytes
  00185334: afbf0010 sw r31,0x0010(r29)
+
----------------------------------------------------------------------------------------------------------
  00185338: 90420059 lbu r2,0x0059(r2) Load Attacker's 2nd set of statuses
+
  00185328: 3c028019 lui r2,0x8019           |
  0018533c: 00000000 nop
+
  0018532c: 8c422d94 lw r2,0x2d94(r2)         |{{f/adr|<nowiki>r2 = Attacker data pointer</nowiki>}}
  00185340: 30420030 andi r2,r2,0x0030
+
  00185330: 27bdffe8 addiu r29,r29,-0x0018    |
  00185344: 10400007 beq r2,r0,0x00185364 Branch if Attacker isn't  Confused/Blind
+
  00185334: afbf0010 sw r31,0x0010(r29)       |
  00185348: 00000000 nop
+
  00185338: 90420059 lbu r2,0x0059(r2)       |{{f/load|<nowiki>r2 = Attacker 2nd set of Statuses byte</nowiki>}}
  0018534c: 3c038019 lui r3,0x8019
+
  0018533c: 00000000 nop                     |
  00185350: 246338dc addiu r3,r3,0x38dc
+
  00185340: 30420030 andi r2,r2,0x0030       |{{f/std|r2 <> 0x00 If Attacker has Darkness or Confusion}}
  00185354: 90620000 lbu r2,0x0000(r3) Load Base Hit
+
  00185344: 10400007 beq r2,r0,0x00185364     {{f/Cond|If Attacker has Darkness or Confusion}} /Else Branch to Transparent check
  00185358: 00000000 nop
+
  00185348: 00000000 nop                         |{{f/std|}}
  0018535c: 00021042 srl r2,r2,0x01 Base Hit / 2
+
  0018534c: 3c038019 lui r3,0x8019               |{{f/std|}}
  00185360: a0620000 sb r2,0x0000(r3) Store new Hit %
+
  00185350: 246338dc addiu r3,r3,0x38dc           |{{f/adr|<nowiki>r3 = 0x801938dc (Base Hit pointer)</nowiki>}}
  00185364: 0c06152e jal 0x001854b8 Transparent Calculation
+
  00185354: 90620000 lbu r2,0x0000(r3)           |{{f/load|<nowiki>r2 = Current Ability Base Hit%</nowiki>}}
  00185368: 00000000 nop
+
  00185358: 00000000 nop                         |
  0018536c: 8fbf0010 lw r31,0x0010(r29)
+
  0018535c: 00021042 srl r2,r2,0x01               |{{f/std|<nowiki>r2 = Base Hit / 2</nowiki>}} {{f/std|Base Hit / 2}}
  00185370: 27bd0018 addiu r29,r29,0x0018
+
  00185360: a0620000 sb r2,0x0000(r3)             |{{f/store|Store Halved Base Hit at 0x801938dc}}
  00185374: 03e00008 jr r31
+
  00185364: 0c06152e jal 0x001854b8           |{{f/jal|Transparent Calculation|Transparent Calculation}} Nullify All Current Ability Evasion byte if Attacker is Transparent
  00185378: 00000000 nop
+
  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)]]

Latest revision as of 20:04, 22 March 2022

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)