Difference between revisions of "Elemental XA * YA"
Jump to navigation
Jump to search
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | 0018877c: 27bdffe8 addiu r29,r29, | + | No Parameters |
− | 00188780: afbf0010 sw r31,0x0010(r29) | + | |
− | 00188784: 0c06195a jal 0x00186568 | + | Returns r2 = 0x00 if Attacks Hits |
− | 00188788: 00000000 nop | + | r2 = 0x01 if Attack is nullified because of elements |
− | 0018878c: 0c061bb4 jal 0x00186ed0 | + | |
− | 00188790: 00000000 nop | + | Handles Elemental Damage modification (Weakness / Resistance / Nullification / Absorption / Weather) |
− | 00188794: 0c061bfe jal 0x00186ff8 | + | ------------------------------------------------------------------------------------------------- |
− | 00188798: 00000000 nop | + | 0018877c: 27bdffe8 addiu r29,r29,-0x0018 |
− | 0018879c: 3c028019 lui r2,0x8019 | + | 00188780: afbf0010 sw r31,0x0010(r29) |
− | 001887a0: 8c422d90 lw r2,0x2d90(r2) | + | 00188784: 0c06195a jal 0x00186568 |{{f/jal|XA * YA Calculation|XA * YA Calculation}} Multiply Ability XA and YA and store the result as HP damage |
− | 001887a4: 00000000 nop | + | 00188788: 00000000 nop | |
− | 001887a8: 90420000 lbu r2,0x0000(r2) | + | 0018878c: 0c061bb4 jal 0x00186ed0 |{{f/jal|Weather Elemental effects|Weather Elemental effects}} +25% HP damage For Thunder and Ice or -25% damage For Fire according to the weather |
− | 001887ac: 00000000 nop | + | 00188790: 00000000 nop | |
− | 001887b0: 2c420001 sltiu r2,r2,0x0001 | + | 00188794: 0c061bfe jal 0x00186ff8 |{{f/jal|Ability Elemental?|Ability Elemental?}} Checks For Target Elemental resistance/Weakness - Deals with [Oil + Fire] and [Float + Earth] |
− | 001887b4: 8fbf0010 lw r31,0x0010(r29) | + | 00188798: 00000000 nop | |
− | 001887b8: 27bd0018 addiu r29,r29,0x0018 | + | 0018879c: 3c028019 lui r2,0x8019 | |
− | 001887bc: 03e00008 jr r31 | + | 001887a0: 8c422d90 lw r2,0x2d90(r2) |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}} |
− | 001887c0: 00000000 nop | + | 001887a4: 00000000 nop | |
+ | 001887a8: 90420000 lbu r2,0x0000(r2) |{{f/load|<nowiki>r2 = TCA Hit flag (set to 0x00 if Attack is nullified because of elements)</nowiki>}} | ||
+ | 001887ac: 00000000 nop | | ||
+ | 001887b0: 2c420001 sltiu r2,r2,0x0001 |{{f/std|<nowiki>r2 = 0x01 if Attacks misses, 0x00 if Attack hits</nowiki>}} | ||
+ | 001887b4: 8fbf0010 lw r31,0x0010(r29) END | ||
+ | 001887b8: 27bd0018 addiu r29,r29,0x0018 | ||
+ | 001887bc: 03e00008 jr r31 | ||
+ | 001887c0: 00000000 nop | ||
+ | === Returns locations === | ||
+ | '''Battle.bin''' | ||
+ | 00188984: [[Truth/Formula_5E-5F_Magical_damage]] | ||
+ | 00188c74: [[04_Magic_Gun|Formula 04 : Magic Gun]] | ||
+ | 00188dbc: [[08_Dmg_F(MA*Y)|Formula 08 : 08 Dmg F(MA*Y)]] | ||
+ | 0018949c: [[1F_Dmg_((100-CasF)*(100-TarF)*(MA%2BY)*MA/2)|Formula 1f : Dmg ((100-CasF)*(100-TarF)*(MA+Y)*MA/2)]] |
Latest revision as of 20:01, 10 April 2022
No Parameters Returns r2 = 0x00 if Attacks Hits r2 = 0x01 if Attack is nullified because of elements Handles Elemental Damage modification (Weakness / Resistance / Nullification / Absorption / Weather) ------------------------------------------------------------------------------------------------- 0018877c: 27bdffe8 addiu r29,r29,-0x0018 00188780: afbf0010 sw r31,0x0010(r29) 00188784: 0c06195a jal 0x00186568 |-->XA * YA Calculation Multiply Ability XA and YA and store the result as HP damage 00188788: 00000000 nop | 0018878c: 0c061bb4 jal 0x00186ed0 |-->Weather Elemental effects +25% HP damage For Thunder and Ice or -25% damage For Fire according to the weather 00188790: 00000000 nop | 00188794: 0c061bfe jal 0x00186ff8 |-->Ability Elemental? Checks For Target Elemental resistance/Weakness - Deals with [Oil + Fire] and [Float + Earth] 00188798: 00000000 nop | 0018879c: 3c028019 lui r2,0x8019 | 001887a0: 8c422d90 lw r2,0x2d90(r2) |r2 = Target Current Action (TCA) data pointer 001887a4: 00000000 nop | 001887a8: 90420000 lbu r2,0x0000(r2) |r2 = TCA Hit flag (set to 0x00 if Attack is nullified because of elements) 001887ac: 00000000 nop | 001887b0: 2c420001 sltiu r2,r2,0x0001 |r2 = 0x01 if Attacks misses, 0x00 if Attack hits 001887b4: 8fbf0010 lw r31,0x0010(r29) END 001887b8: 27bd0018 addiu r29,r29,0x0018 001887bc: 03e00008 jr r31 001887c0: 00000000 nop
Returns locations
Battle.bin 00188984: Truth/Formula_5E-5F_Magical_damage 00188c74: Formula 04 : Magic Gun 00188dbc: Formula 08 : 08 Dmg F(MA*Y) 0018949c: Formula 1f : Dmg ((100-CasF)*(100-TarF)*(MA+Y)*MA/2)