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)); }
public override void ApplySpecialEffect(EnemyInstance target) { var poisonBuff = PoisonBuffData.FromDps(target, Dps, Duration); poisonBuff.Activate(); }