예제 #1
0
        public override void CalculateAbilityDamageTaken(MyHero hero, AbilitiesMenu menu)
        {
            ActiveAbilities.Clear();

            foreach (var ability in hero.GetValidAbilities(this).Where(x => courierDamageAbilities.Contains(x.AbilityId)))
            {
                ActiveAbilities[ability] = ability.CalculateDamage(hero.Hero, Unit);
            }

            if (ActiveAbilities.Any())
            {
                AbilityDamageCalculated = true;
            }
        }
예제 #2
0
        public void CalculateAbilityDamageTaken(MyHero hero, AbilitiesMenu menu)
        {
            if (hero.Team == Team)
            {
                return;
            }

            ActiveAbilities.Clear();

            foreach (var ability in hero.GetValidAbilities(this)
                     .Where(x => menu.IsAbilityEnabled(x.Name))
                     .OrderByDescending(x => menu.GetAbilityPriority(x.Name)))
            {
                ActiveAbilities[ability] = ability.CalculateDamage(hero.Hero, Unit);
            }

            if (ActiveAbilities.Any())
            {
                AbilityDamageCalculated = true;
            }
        }