L2JMobius

Master Class Ch. 2 mAtk and Magic Damage formulas. [Works for Ertheia and all next chapters]

Mortianna · 4 · 2226

Offline Mortianna

  • Vassal
  • *
    • Posts: 3
Hey there! I did some tests on NA official server (Live) and Erhteia PTS and found that mAtk and Magic Damage formulas in the L2J-Mobius is not correct. I can suggest verified mAtk fromula, and verified spiritshot/bss for magic damage; also I can say that the multiplier for magic damage isn't 77, it's something between 92 and 95.

mAtk formula, old:
Code: [Select]
// Calculate modifiers Magic Attack
final double chaBonus = creature.isPlayer() ? BaseStat.CHA.calcBonus(creature) : 1;
baseValue *= Math.pow(BaseStat.INT.calcBonus(creature) * creature.getLevelMod() * chaBonus, 2.2072);

verified:
Code: [Select]
final double chaBonus = creature.isPlayer() ? BaseStat.CHA.calcBonus(creature) : 1.;
final double levelMod = creature.getLevelMod();
final double intMod = BaseStat.INT.calcBonus(creature);
final double multiplier = intMod * intMod * levelMod * levelMod * chaBonus * chaBonus;
baseValue *= multiplier;

calcMagicDam:
1. Spiritshots multiplier: we have only x2 damage in PVP
Code: [Select]
// Bonus Spirit shot
double shotsBonus = 1.0;
if(bss || sps)
{
if(target.isPlayer() || target.isServitor() || target.isFakePlayer())
{
shotsBonus = 2.0;
}
else
{
shotsBonus = 4.0;
}
shotsBonus += attacker.getStat().getValue(Stat.SHOTS_BONUS);
}


2. The damage formula, the Multiplier value is 92..95, not 77 (it's hard to determinate precise because The Live servers have enabled Damage Randomization by default, I don't have PTS files)
Code: [Select]
double damage = ((95 * (power + attacker.getStat().getValue(Stat.SKILL_POWER_ADD, 0)) * Math.sqrt(mAtk)) / mDef) * shotsBonus;


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16111
What about Classic/Essence that do not have CHA?

There are many calculations that use 77.
A patch would help see what you actually change.
https://l2jmobius.org/forum/index.php?topic=896.0


Offline Mortianna

  • Vassal
  • *
    • Posts: 3
Can't say anything about classic - I'm not interested in this branch of L2 (perhaps, it have formulas similar to original HF, but it is only my assumption),  while Essence can have own math formulas, multipliers table, etc, because if we look at mAtk buffs (like the empower), it have fixed +mAtk value, instead +% mAtk.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16111
Checking Essence, just for curiosity can bring you some different perspective on what you already did.
;D

I ask about Essence because when finding a weakness in one branch others can benefit from that change.
True story, I have fixed a critical bug on latest branches by working on C1 just for fun.