Ejemplo n.º 1
0
        public override void Apply(StaticAbilities abilities)
        {
            _abilities = abilities;
            _modifier  = new AddToList <StaticAbility>(_staticAbility);
            _modifier.Initialize(ChangeTracker);
            _staticAbility.Initialize(OwningCard, Game);

            abilities.AddModifier(_modifier);
        }
Ejemplo n.º 2
0
        public bool CanBeTargetedBy(IResolvable other)
        {
            // Permanents with Shroud cannot be targeted by spells
            if (StaticAbilities.Contains(StaticAbility.Shroud))
            {
                return(false);
            }

            if (other is Card)
            {
                var ctrl = (other as Card).Controller;

                // Permanents with Hexproof can't be targeted other players' spells.
                if (StaticAbilities.Contains(StaticAbility.Hexproof))
                {
                    if (ctrl != Controller)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }