multiplier for critical rate and magic critical rate is wrong

Issue #129 open
FinalDestination created an issue

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)

  1. FinalDestination reporter

    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

  2. Adry_85

    (44 * 2 * 1.3) and (44 * (2 * 1.3)) have the same result. Please open a new ticket when you have retail proof.

  3. FinalDestination 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

  4. Sdw-

    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.

  5. ShinichiYao

    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;
        }
    
  6. ShinichiYao

    Its changed in DataPack, BaseMul has the highest priority that it should be calculate first, but after this commit it just like other Mul.

  7. UchihaSV

    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.

  8. FinalDestination 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;
        }
    

  9. ShinichiYao

        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;
        }
    

  10. UchihaSV

    Yes, Paladin have active debuff - Tribunal(400) and Rogue Class have passive skill Light Armor Mastery(233) for reduce crit rate for enemy.

  11. Log in to comment