Difference between revisions of "XA * YA Calculation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  00186568: 3c038019 lui r3,0x8019
+
No Parameters - Returns nothing
  0018656c: 946338ce lhu r3,0x38ce(r3) Load XA
+
  00186570: 3c028019 lui r2,0x8019
+
Load Current Ability XA and YA and Store XA * YA as Target current action HP Damage
  00186574: 944238d0 lhu r2,0x38d0(r2) Load YA
+
Enable Target current action Type HP Damage flag
  00186578: 00000000 nop
+
  0018657c: 00620018 mult r3,r2 XA * YA
+
'''Note : past this routine, any change of XA or YA will be pointless''' (this is why oil doesn't work as intended in vanilla)
  00186580: 3c038019 lui r3,0x8019
+
------------------------------------------------------------------------------------------------------------------------
  00186584: 8c632d90 lw r3,0x2d90(r3) Load Target Current Action Data Pointer
+
  00186568: 3c038019 lui r3,0x8019           |
  00186588: 34020080 ori r2,r0,0x0080 r2 = 80 (Attack Type = HP Damage)
+
  0018656c: 946338ce lhu r3,0x38ce(r3)       |{{f/load|<nowiki>r3 = Current Ability XA ( 0x801938ce )</nowiki>}}
  0018658c: a0620025 sb r2,0x0025(r3) Store Attack Type
+
  00186570: 3c028019 lui r2,0x8019           |
  00186590: 00001012 mflo r2 r2 = XA * YA
+
  00186574: 944238d0 lhu r2,0x38d0(r2)       |{{f/load|<nowiki>r3 = Current Ability YA ( 0x801938d0 )</nowiki>}}
  00186594: 03e00008 jr r31
+
  00186578: 00000000 nop                     |
  00186598: a4620004 sh r2,0x0004(r3) Store HP Damage
+
  0018657c: 00620018 mult r3,r2               |{{f/std|XA * YA}}
'''Return Location'''
+
  00186580: 3c038019 lui r3,0x8019           |
  001886a4 - [[Damage Calculation]]
+
  00186584: 8c632d90 lw r3,0x2d90(r3)         |{{f/adr|<nowiki>r3 = Target Current Action Data Pointer</nowiki>}}
  0018877c - [[Elemental XA * YA]]
+
  00186588: 34020080 ori r2,r0,0x0080         |{{f/std|<nowiki>r2 = 0x80 (Attack Type = HP Damage)</nowiki>}}
  00188858 - [[Magical XA * YA]]
+
  0018658c: a0620025 sb r2,0x0025(r3)         |{{f/store|Store Attack Type is HP Damage}}
 +
  00186590: 00001012 mflo r2                 |{{f/std|<nowiki>r2 = XA * YA</nowiki>}}
 +
  00186594: 03e00008 jr r31                   |
 +
  00186598: a4620004 sh r2,0x0004(r3)         |{{f/store|Store Target Current Action HP Damage}}
 +
 
 +
=== Return Location ===
 +
'''Battle.bin'''
 +
  001886c4: [[Damage Calculation]]
 +
  0018878c: [[Elemental XA * YA]]
 +
  00188878: [[Magical XA * YA]]
 +
00188d6c: [[07 Heal_(Weapon)]]
 +
0018969c: [[23 Heal_(MA*Y)]]
 +
00189d18: [[31 Dmg_((PA+Y)/2*PA)]]
 +
00189ebc: [[34 Heal_(PA*Y) HealMP_(PA*Y/2)]]
 +
0018ac08: [[63 Dmg_(SP*WP)]]
 +
0018ac64: [[64 Dmg_(PA * WP); if using Spear (PA * 3/2 * WP); if weaponless (PA * Brave /100 * WP)]]

Latest revision as of 12:14, 3 April 2022

No Parameters - Returns nothing

Load Current Ability XA and YA and Store XA * YA as Target current action HP Damage
Enable Target current action Type HP Damage flag

Note : past this routine, any change of XA or YA will be pointless (this is why oil doesn't work as intended in vanilla)
------------------------------------------------------------------------------------------------------------------------
00186568: 3c038019 lui r3,0x8019            |
0018656c: 946338ce lhu r3,0x38ce(r3)        |r3 = Current Ability XA ( 0x801938ce )
00186570: 3c028019 lui r2,0x8019            |
00186574: 944238d0 lhu r2,0x38d0(r2)        |r3 = Current Ability YA ( 0x801938d0 )
00186578: 00000000 nop                      |
0018657c: 00620018 mult r3,r2               |XA * YA
00186580: 3c038019 lui r3,0x8019            |
00186584: 8c632d90 lw r3,0x2d90(r3)         |r3 = Target Current Action Data Pointer
00186588: 34020080 ori r2,r0,0x0080         |r2 = 0x80 (Attack Type = HP Damage)
0018658c: a0620025 sb r2,0x0025(r3)         |Store Attack Type is HP Damage
00186590: 00001012 mflo r2                  |r2 = XA *  YA
00186594: 03e00008 jr r31                   |
00186598: a4620004 sh r2,0x0004(r3)         |Store Target Current Action HP Damage

Return Location

Battle.bin
001886c4: Damage Calculation
0018878c: Elemental XA * YA
00188878: Magical XA * YA
00188d6c: 07 Heal_(Weapon)
0018969c: 23 Heal_(MA*Y)
00189d18: 31 Dmg_((PA+Y)/2*PA)
00189ebc: 34 Heal_(PA*Y) HealMP_(PA*Y/2)
0018ac08: 63 Dmg_(SP*WP)
0018ac64: 64 Dmg_(PA * WP); if using Spear (PA * 3/2 * WP); if weaponless (PA * Brave /100 * WP)