示例#1
0
        public int AbilityCount()
        {
            int count = 0;

            if (MagicalAbility != MagicalAbility.None)
            {
                count++;
            }

            if (SpecialAbilities != null)
            {
                count += SpecialAbilities.Count(a => !a.NaturalAbility);
            }

            if (AreaEffects != null)
            {
                count += AreaEffects.Length;
            }

            if (WeaponAbilities != null)
            {
                count += WeaponAbilities.Length;
            }

            return(count);
        }
示例#2
0
        public bool CanChooseSpecialAbility(SpecialAbility[] list)
        {
            if (!Creature.Controlled)
            {
                return(true);
            }

            if (HasSpecialMagicalAbility() &&
                list.Any(abil => IsRuleBreaker(abil)) &&
                (AreaEffects == null || AreaEffects.Length == 0) &&
                (SpecialAbilities == null || SpecialAbilities.Length == 0 || SpecialAbilities.All(a => a.NaturalAbility)))
            {
                return(true);
            }

            return(!HasSpecialMagicalAbility() && (SpecialAbilities == null || SpecialAbilities.Count(a => !a.NaturalAbility) == 0) && AbilityCount() < 3);
        }