Esempio n. 1
0
        public int ApplyDamageBuffs(int damage)
        {
            double perc = 0;
            int    stat = 0;

            foreach (BuffDebuff eff in Effects)
            {
                perc += eff.DamagePercentBuff;
                perc -= eff.DamagePercentDebuff;
                stat += eff.DamageStaticBuff;
                stat -= eff.DamageStaticDebuff;
                if (eff.BleedAttackDamage > 0)
                {
                    TakeDebuffDamage(eff.BleedAttackDamage);
                }
                eff.AttackTick();
            }

            if (HasPassive)
            {
                perc = Passive.PassiveDamagePercentCalculation(perc);
                stat = Passive.PassiveDamageStaticCalculation(stat);
            }

            EffectCleanup();

            return(damage + (int)((double)damage * perc) + stat);
        }