Пример #1
0
 @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);
   }
 }
Пример #2
0
 static {
   filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
 }
Пример #3
0
 static {
   filter.add(new AnotherPredicate());
   filter.add(new ControllerPredicate(Constants.TargetController.YOU));
 }