@Override public CantBeTargetedAllEffect copy() { return new CantBeTargetedAllEffect(this); }
public CantBeTargetedAllEffect(FilterPermanent filterTarget, FilterObject filterSource, Duration duration) { super(duration, Outcome.Benefit); this.filterTarget = filterTarget; this.filterSource = filterSource; setText(); }
public SpellbaneCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.CENTAUR); this.power = new MageInt(3); this.toughness = new MageInt(2); // Creatures you control can't be the targets of blue spells or abilities from blue sources. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeTargetedAllEffect(new FilterControlledCreaturePermanent("Creatures you control"), filter, Duration.WhileOnBattlefield))); }
public DenseFoliage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); // Creatures can't be the targets of spells. CantBeTargetedAllEffect cantTargetEffect = new CantBeTargetedAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, new FilterSpell("spells"), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, cantTargetEffect)); }
public AutumnsVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Spells you control can't be countered by blue or black spells this turn this.getSpellAbility().addEffect(new CantBeCounteredControlledEffect(filterTarget1, filterSource, Duration.EndOfTurn)); // and creatures you control can't be the targets of blue or black spells this turn. this.getSpellAbility().addEffect(new CantBeTargetedAllEffect(filterTarget2, filterSource, Duration.EndOfTurn)); }