multiplier for critical rate and magic critical rate is wrong
multiplier for critical rate and magic critical rate is wrong the stats of both crit rate and m crit rate when u are affected from multiplier buffs doesnt match to retail
Comments (20)
-
reporter -
Issue
#202was marked as a duplicate of this issue. -
- changed status to invalid
(44 * 2 * 1.3) and (44 * (2 * 1.3)) have the same result. Please open a new ticket when you have retail proof.
-
reporter maybe i dont write it right look in l2off for crit rate calculation is not like other mul like atk speed p ak etc
crit rate buffs are mul together and after mul with the base
example result:
l2j with 44 crit rate if u add buffs focus and song of hunter = 114.4 crit rate now instead on l2off result is different with 44 crit rate if u add buffs focus and song of hunter = 101.2 crit rate i tested both on rpg club h5 and grand crusade official the result was 101 so calc should be like: 44 * 2.3 = 101.2 instead of 44 * 2 * 1.3 = 114.4
-
- changed status to open
I check again, I will try to find more info
-
Issue is started when we remove basemul from datapack, I'm checking how to fix it.
-
reporter yes should use base mul to merge muls and adds
-
Zoey76, the issue is after this commit, https://bitbucket.org/l2jserver/l2j_server/commits/ac875a3457c8b4af95db2646346cfdb1442be25e,
-
base * (1 + mul1 + mul2 + ...) + add
Where mul are flat value, not 1+ x
Eg 63% stays 0.63 in the calc.
To pick example above it does
44 * (1 + 1 + 0.3) which lands on correct value.
-
So how do we solve this issue? Critical rate is way too high now.
-
Mul for Critical rate use BaseMul, it's always using BaseValue for multiplicand and the BaseValue is (initVal * BaseStats.DEX.calcBonus(effector) * 10).
@Override public double calc(L2Character effector, L2Character effected, Skill skill, double initVal) { if ((getApplayCond() == null) || getApplayCond().test(effector, effected, skill)) { return initVal + (BaseValue * getValue()); } return initVal; }
-
Zoey76, write in commit https://bitbucket.org/l2jserver/l2j_server/commits/ac875a3457c8b4af95db2646346cfdb1442be25e
* Removed BaseMul, now Mul with order 0x01 will replace it.
How to use Mul with order 0x01? It's need place in FuncAtkCritical or what?
-
Its changed in DataPack, BaseMul has the highest priority that it should be calculate first, but after this commit it just like other Mul.
-
I'm try use mul with attribute order="0x01" in skills with stat="critRate", but in not work(NPE), because order take only integers, then i try with order="1", but it did not change anything for crit chance calculate.
-
Any idea to make the calculate correct without modify DataPack?
-
reporter public double calc(L2Character caster, L2Character target, Skill skill, double initVal) { double value = initVal; double mul = 1; for (AbstractFunction func : _functions) { if ((func instanceof FuncMul) && (func.getStat() == Stats.CRITICAL_RATE)) { mul += func.getValue() - 1; } else { value = func.calc(caster, target, skill, value); } } if (mul > 1) { value *= mul; } return value; }
-
Still not correct, maybe wrong order, some mul should calculate before add
-
public double calc(L2Character caster, L2Character target, Skill skill, double initVal) { double value = initVal; double mul = 1; for (AbstractFunction func : _functions) { if ((func instanceof FuncMul) && ((func.getStat() == Stats.CRITICAL_RATE) || (func.getStat() == Stats.MCRITICAL_RATE)) && (func.getValue() > 1)) { mul += func.getValue() - 1; } else { if (mul > 1) { value *= mul; mul = 1; } value = func.calc(caster, target, skill, value); } } if (mul > 1) { value *= mul; } return value; }
-
Is there any skills that reduce CritRate in Lineage2?
-
Yes, Paladin have active debuff - Tribunal(400) and Rogue Class have passive skill Light Armor Mastery(233) for reduce crit rate for enemy.
- Log in to comment
normal critical rate mul is wrong
currently now is like example 44 (base) * 2 (song of hunter) * 1.3 focus this is wrong mul for critical rate, critical rate is different in l2off
should be (44 * (2 * 1.3)) all buffs should mul together and in the end mul with base