Example #1
0
        /// <summary>
        /// Damage the fighter directly, using only the fighter's own damage modifiers
        /// </summary>
        public void Damage(double damage)
        {
            damage = SelfDamageModifiers.CalculateMax(damage, 0);
            Tuple <double, double> pair = SpeedDamage(damage);

            Speed -= pair.Item2;
            damage = SelfDamageModifiers.CalculateMin(pair.Item1, 0);
            HealthDamage(damage);
        }
Example #2
0
        /// <summary>
        /// Damage the fighter applying damage modifiers (on both fighter and attacker)
        /// to the damage.
        /// </summary>
        public void Damage(double damage, PassiveList DamageModifiers)
        {
            PassiveList DamageModifierClone = (PassiveList)DamageModifiers.Clone();

            foreach (PassiveEffect mod in SelfDamageModifiers)
            {
                DamageModifierClone.Add(mod);
            }
            damage = DamageModifierClone.CalculateMax(damage, 0);

            Tuple <double, double> pair = SpeedDamage(damage);

            Speed -= pair.Item2;
            damage = DamageModifierClone.CalculateMin(pair.Item1, 0);
            HealthDamage(damage);
        }