Example #1
0
    public void onGetPowerCalculation(object sender, object args)
    {
        ValueCalculationException exc = (ValueCalculationException)args;

        AddValueModifier modifier = new AddValueModifier(0, powerBonus);

        exc.addModifier(modifier);
    }
Example #2
0
    public int getAbilityPower()
    {
        int calculatedPower = 0;

        ValueCalculationException exc = new ValueCalculationException(basePower);

        this.PostNotification(getPowerCalculation, exc);
        calculatedPower = Mathf.FloorToInt(exc.getModifiedValue());

        if (exc.toggle == false)
        {
            return(basePower);
        }

        return(calculatedPower);
    }