예제 #1
0
        public override void RemoveEffect(IModdable target)
        {
            IStatContainer container = target as IStatContainer;
            Stat           stat      = container.GetStat(Identifier);

            switch (Type)
            {
            case StatType.Additive:
                stat.RemoveAdditive(this);
                break;

            case StatType.Multiplicative:
                stat.RemoveMultiplicative(this);
                break;
            }
        }
예제 #2
0
        public override void ApplyEffect(IModdable target)
        {
            _target = target;
            IStatContainer container = target as IStatContainer;
            Stat           stat      = container.GetStat(Identifier);

            //TODO: Consider having StatType be a member of Stat instead of StatMod, then handling how to add the stat in Stat.
            switch (Type)
            {
            case StatType.Additive:
                stat.AddAdditive(Value.Get() * Coeffecient.Get(), this);
                break;

            case StatType.Multiplicative:
                stat.AddMultiplicative(Value.Get() * Coeffecient.Get(), this);
                break;
            }
        }