Пример #1
0
        public override BaseBuffData CreateBuff(EnemyInstance target)
        {
            if (TotalAmount && InfiniteDuration)
            {
                throw new InvalidOperationException("Cannot use total poison damage if we don't know how long it lasts.");
            }

            if (InfiniteDuration)
            {
                return(PoisonBuffData.FromDps(target, PoisonAmount, float.PositiveInfinity));
            }

            return(TotalAmount
                ? PoisonBuffData.FromTotalDamage(target, PoisonAmount, Duration)
                : PoisonBuffData.FromDps(target, PoisonAmount, Duration));
        }
Пример #2
0
        public override void ApplySpecialEffect(EnemyInstance target)
        {
            var poisonBuff = PoisonBuffData.FromDps(target, Dps, Duration);

            poisonBuff.Activate();
        }