Jump to content

Recommended Posts

  • 1 month later...
  • 4 months later...
Posted
    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;
    }

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...