Examples of FilterControlledPermanent


Examples of mage.filter.common.FilterControlledPermanent

* @author BetaSteward_at_googlemail.com
*/
public class TargetControlledPermanent<T extends TargetControlledPermanent<T>> extends TargetPermanent<TargetControlledPermanent<T>> {

  public TargetControlledPermanent() {
    this(1, 1, new FilterControlledPermanent(), false);
  }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

  public TargetControlledPermanent() {
    this(1, 1, new FilterControlledPermanent(), false);
  }

  public TargetControlledPermanent(int numTargets) {
    this(numTargets, numTargets, new FilterControlledPermanent(), false);
  }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

        this.value = value;
    }

    @Override
    public int calculate(Game game, Ability sourceAbility, Effect effect) {
        FilterControlledPermanent pp = new FilterControlledPermanent("Urza's Power Plant");
        pp.add(new NamePredicate("Urza's Power Plant"));
        PermanentsOnBattlefieldCount ppP = new PermanentsOnBattlefieldCount(pp);
        if (ppP.calculate(game, sourceAbility, effect) < 1)
        {
            return 1;
        }

        FilterControlledPermanent to = new FilterControlledPermanent("Urza's Tower");
        to.add(new NamePredicate("Urza's Tower"));
        PermanentsOnBattlefieldCount toP = new PermanentsOnBattlefieldCount(to);
        if (toP.calculate(game, sourceAbility, effect) < 1)
        {
            return 1;
        }

        FilterControlledPermanent mi = new FilterControlledPermanent("Urza's Mine");
        mi.add(new NamePredicate("Urza's Mine"));
        PermanentsOnBattlefieldCount miP = new PermanentsOnBattlefieldCount(mi);
        if (miP.calculate(game, sourceAbility, effect) < 1)
        {
            return 1;
        }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

* @author BetaSteward_at_googlemail.com
*/
public class TargetControlledPermanent extends TargetPermanent {

    public TargetControlledPermanent() {
        this(1, 1, new FilterControlledPermanent(), false);
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

    public TargetControlledPermanent() {
        this(1, 1, new FilterControlledPermanent(), false);
    }

    public TargetControlledPermanent(int numTargets) {
        this(numTargets, numTargets, new FilterControlledPermanent(), false);
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

        Player player = game.getPlayer(source.getControllerId());
        if (player == null) {
            return false;
        }

        FilterControlledPermanent filter = new FilterControlledPermanent("Vampire");
        filter.add(new SubtypePredicate("Vampire"));
        int amount = game.getBattlefield().countAll(filter, source.getControllerId(), game);
        Set<UUID> opponents = game.getOpponents(source.getControllerId());

        int total = 0;
        for (UUID opponentUuid : opponents) {
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

            return false;
        }

        Player you = game.getPlayer(source.getControllerId());

        FilterControlledPermanent filter = new FilterControlledPermanent();
        filter.add(new SubtypePredicate("Ally"));

        int numberOfAllies = game.getBattlefield().countAll(filter, you.getId(), game);

        Cards cardsInHand = new CardsImpl(Zone.PICK);
        cardsInHand.addAll(targetPlayer.getHand());
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

                type = CardType.PLANESWALKER;
            } else if (choosenType.equals(CardType.TRIBAL.toString())) {
                type = CardType.TRIBAL;
            }
            if (type != null) {
                FilterPermanent filter = new FilterControlledPermanent(new StringBuilder("permanent you control of type ").append(type.toString()).toString());
                filter.add(new CardTypePredicate(type));

                TargetPermanent target = new TargetControlledPermanent(1, 1, filter, false);
                target.setNotTarget(true);

                // you always go first
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

       
        //Flying
        this.addAbility(FlyingAbility.getInstance());
       
        //When Kor Skyfisher enters the battlefield, return a permanent you control to its owner's hand.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(new FilterControlledPermanent()), false));
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledPermanent

                sb.append(" or ").append(subtype);
            }
            i++;
        }
        this.objectDescription = sb.toString();
        FilterControlledPermanent filter = new FilterControlledPermanent(objectDescription);
        filter.add(Predicates.or(subtypesPredicates));
        filter.add(new AnotherPredicate());

        // When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control.
        Ability ability1 = new EntersBattlefieldTriggeredAbility(
                new SacrificeSourceUnlessPaysEffect(new ChampionExileCost(filter, new StringBuilder(card.getName()).append(" championed permanents").toString())),false);
        ability1.setRuleVisible(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.