Difference between revisions of "Weapon Element Strengthen"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
  Weapon Element Strengthen Calculation
+
  No Parameters - Returns Nothing
  00185fa4: 3c028019 lui r2,0x8019
+
  00185fa8: 8c422d94 lw r2,0x2d94(r2) Load Attacker's Data Pointer
+
Checks if Ability's Weapon Element (0x80193904) is strengthened - then Increase Ability XA (0x801938ce)  : 125% of initial XA
  00185fac: 3c038019 lui r3,0x8019
+
------------------------------------------------------------------------------------------------------------------------------
  00185fb0: 90633904 lbu r3,0x3904(r3) Load Weapon's Element
+
  00185fa4: 3c028019 lui r2,0x8019          
  00185fb4: 90420071 lbu r2,0x0071(r2) Load Attacker's Elements Strengthened
+
  00185fa8: 8c422d94 lw r2,0x2d94(r2)         |{{f/adr|<nowiki>r2 = Attacker's Data Pointer</nowiki>}}
  00185fb8: 00000000 nop
+
  00185fac: 3c038019 lui r3,0x8019           |
  00185fbc: 00431024 and r2,r2,r3
+
  00185fb0: 90633904 lbu r3,0x3904(r3)       |{{f/load|<nowiki>r3 = Current Ability Weapon's Element</nowiki>}} {{f/std| 0x80193904 / 80193904}}
  00185fc0: 1040000c beq r2,r0,0x00185ff4 Branch if Weapon's Element is not Strengthened
+
  00185fb4: 90420071 lbu r2,0x0071(r2)       |{{f/load|r2 Attacker's Elements Strengthened byte}}
  00185fc4: 00000000 nop
+
  00185fb8: 00000000 nop                     |
  00185fc8: 3c038019 lui r3,0x8019
+
  00185fbc: 00431024 and r2,r2,r3             |{{f/std|r2 <> 0x00 if Ability Weapon Element is Strengthened}}
  00185fcc: 846338ce lh r3,0x38ce(r3) Load XA
+
  00185fc0: 1040000c beq r2,r0,0x00185ff4     {{f/Cond|If Weapon's Element is Strengthened}} /Else branch to END
  00185fd0: 00000000 nop
+
  00185fc4: 00000000 nop                         |{{f/std|}}
  00185fd4: 00031080 sll r2,r3,0x02 XA * 4
+
  00185fc8: 3c038019 lui r3,0x8019               |{{f/std|}}
  00185fd8: 00431021 addu r2,r2,r3 XA * 5
+
  00185fcc: 846338ce lh r3,0x38ce(r3)             |{{f/load|<nowiki>r3 = Current Ability XA</nowiki>}} {{f/std| 0x801938ce / 801938ce}}
  00185fdc: 04410002 bgez r2,0x00185fe8 Branch if XA >= 0
+
  00185fd0: 00000000 nop                         |
  00185fe0: 00000000 nop
+
  00185fd4: 00031080 sll r2,r3,0x02               |{{f/std|XA * 4}}
  00185fe4: 24420003 addiu r2,r2,0x0003 XA + 3
+
  00185fd8: 00431021 addu r2,r2,r3               |{{f/std|XA * 5}}
  00185fe8: 00021083 sra r2,r2,0x02 XA * 5 / 4
+
  00185fdc: 04410002 bgez r2,0x00185fe8           {{f/Cond|If XA < 0}}
  00185fec: 3c018019 lui r1,0x8019
+
  00185fe0: 00000000 nop                             |{{f/std|}}
  00185ff0: a42238ce sh r2,0x38ce(r1) Store new XA
+
  00185fe4: 24420003 addiu r2,r2,0x0003               |{{f/std|<nowiki>Min XA = 3</nowiki>}}
  00185ff4: 03e00008 jr r31
+
  00185fe8: 00021083 sra r2,r2,0x02               |{{f/std|<nowiki>r2 = XA * 5 / 4</nowiki>}}
  00185ff8: 00000000 nop
+
  00185fec: 3c018019 lui r1,0x8019               |
 
+
  00185ff0: a42238ce sh r2,0x38ce(r1)             |{{f/store|Store Strengthened XA}}
 
+
  00185ff4: 03e00008 jr r31                      
== Return Locations ==
+
  00185ff8: 00000000 nop                     END 
 
+
=== Return Locations ===
*Battle.bin
+
'''Battle.bin'''
  00188650: [[Weapon Damage Calculation]]
+
  00188658: [[Weapon Damage Calculation]]
  00188c5c: [[04 Magic Gun]]
+
  00188c64: [[04 Magic Gun]]
  00189b40: [[2D Dmg_(PA*(WP+Y)) 100% Status]]
+
  00189b48: [[2D Dmg_(PA*(WP+Y)) 100% Status]]
  00189c04: [[2E Equipped:Break Dmg_(PA*WP)]]
+
  00189c0c: [[2E Equipped:Break Dmg_(PA*WP)]]

Latest revision as of 14:54, 26 March 2022

No Parameters - Returns Nothing

Checks if Ability's Weapon Element (0x80193904) is strengthened - then Increase Ability XA (0x801938ce)  : 125% of initial XA
------------------------------------------------------------------------------------------------------------------------------
00185fa4: 3c028019 lui r2,0x8019            
00185fa8: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker's Data Pointer
00185fac: 3c038019 lui r3,0x8019            |
00185fb0: 90633904 lbu r3,0x3904(r3)        |r3 = Current Ability Weapon's Element  0x80193904 / 80193904
00185fb4: 90420071 lbu r2,0x0071(r2)        |r2 Attacker's Elements Strengthened byte
00185fb8: 00000000 nop                      |
00185fbc: 00431024 and r2,r2,r3             |r2 <> 0x00 if Ability Weapon Element is Strengthened
00185fc0: 1040000c beq r2,r0,0x00185ff4     #If Weapon's Element is Strengthened /Else branch to END
00185fc4: 00000000 nop                          |
00185fc8: 3c038019 lui r3,0x8019                |
00185fcc: 846338ce lh r3,0x38ce(r3)             |r3 = Current Ability XA  0x801938ce / 801938ce
00185fd0: 00000000 nop                          |
00185fd4: 00031080 sll r2,r3,0x02               |XA * 4
00185fd8: 00431021 addu r2,r2,r3                |XA * 5
00185fdc: 04410002 bgez r2,0x00185fe8           #If XA < 0
00185fe0: 00000000 nop                              |
00185fe4: 24420003 addiu r2,r2,0x0003               |Min XA = 3
00185fe8: 00021083 sra r2,r2,0x02               |r2 = XA * 5 / 4
00185fec: 3c018019 lui r1,0x8019                |
00185ff0: a42238ce sh r2,0x38ce(r1)             |Store Strengthened XA
00185ff4: 03e00008 jr r31                       
00185ff8: 00000000 nop                      END  

Return Locations

Battle.bin
00188658: Weapon Damage Calculation
00188c64: 04 Magic Gun
00189b48: 2D Dmg_(PA*(WP+Y)) 100% Status
00189c0c: 2E Equipped:Break Dmg_(PA*WP)