示例#1
0
        private void ApplyDebuff(Damageable target)
        {
            var interceptor = new DamageInterceptor {
                // Apply this effect pretty much last
                Order       = 10,
                Interceptor = amount => {
                    // Don't change healing
                    if (amount >= 0)
                    {
                        return(amount);
                    }
                    // Increase dmg
                    var p = (float)PercentileIncrease / 100;
                    return((int)(amount + amount * p));
                }
            };

            target.AddDamageInterceptorWithDuration(interceptor, Duration);
        }