@Override public void adjustTargets(Ability ability, Game game) { if (ability instanceof SimpleActivatedAbility) { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterArtifactPermanent filter = new FilterArtifactPermanent( new StringBuilder("artifact with converted mana cost ").append(xValue).toString()); filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); Target target = new TargetPermanent(filter); ability.addTarget(target); } }
static { filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); }
static { filter.add(new AnotherPredicate()); filter.add(new ControllerPredicate(Constants.TargetController.YOU)); }