Examples of FilterControlledLandPermanent


Examples of mage.filter.common.FilterControlledLandPermanent

            if (!controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD)){
                return false;
            }           
            Player player = game.getPlayer(permanent.getControllerId());
            if (player.chooseUse(Outcome.ReturnToHand, "Sacrifice a land to copy this spell?", game)){
                TargetControlledPermanent target = new TargetControlledPermanent(new FilterControlledLandPermanent());
                if (player.chooseTarget(Outcome.Sacrifice, target, source, game)){
                    Permanent land = game.getPermanent(target.getFirstTarget());
                    if(land != null){
                        if(land.sacrifice(source.getSourceId(), game)){
                            Spell spell = game.getStack().getSpell(source.getSourceId());
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        this.color.setBlack(true);

        // Until end of turn, lands you control gain "Sacrifice this land: Add {B} to your mana pool."
        ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new SacrificeSourceCost());
        this.getSpellAbility().addEffect(new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterControlledLandPermanent()));
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        this.toughness = new MageInt(5);

        // {5}{R}{R}: Monstrosity 3.
        this.addAbility(new MonstrosityAbility("{5}{R}{R}", 3));
        // When Ember Swallower becomes monstrous, each player sacrifices three lands.
        this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new SacrificeAllEffect(3, new FilterControlledLandPermanent("lands"))));
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
                new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
        // {2}{R}, {tap}, Sacrifice a land: Put a 3/3 colorless Golem enchantment artifact creature token onto the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HammerOfPurphorosGolemToken()), new ManaCostsImpl("{2}{R}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        this.color.setRed(true);
        this.color.setGreen(true);

        // Ground Assault deals damage to target creature equal to the number of lands you control.
        this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent())));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

            int minLand = Integer.MAX_VALUE;
            Cards landsToSacrifice = new CardsImpl();
            for (UUID playerId : controller.getInRange()) {
                Player player = game.getPlayer(playerId);
                if (player != null) {
                    int count = game.getBattlefield().countAll(new FilterControlledLandPermanent(), player.getId(), game);
                    if (count < minLand) {
                        minLand = count;
                    }
                }
            }
           
            for (UUID playerId : controller.getInRange()) {
                Player player = game.getPlayer(playerId);
                if (player != null) {
                    TargetControlledPermanent target = new TargetControlledPermanent(minLand, minLand, new FilterControlledLandPermanent(), true);
                    if (target.choose(Outcome.Sacrifice, player.getId(), source.getSourceId(), game)) {
                        for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledLandPermanent(), player.getId(), source.getSourceId(), game)) {
                            if (permanent != null && !target.getTargets().contains(permanent.getId())) {
                                landsToSacrifice.add(permanent);
                            }
                        }
                    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        this.expansionSetCode = "ODY";

        this.color.setRed(true);

        // Each player sacrifices a land.
        this.getSpellAbility().addEffect(new SacrificeAllEffect(1, new FilterControlledLandPermanent("land")));
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        super(cost);
    }

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        for(Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledLandPermanent(), ability.getControllerId(), game)){
            paid |= permanent.sacrifice(sourceId, game);
        }
        return paid;
    }
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        Player player = game.getPlayer(source.getControllerId());
        if (player == null){
            return false;
        }
        int amount = 0;
        TargetControlledPermanent sacrificeLand = new TargetControlledPermanent(0, Integer.MAX_VALUE, new FilterControlledLandPermanent(), true);
        if(player.chooseTarget(Outcome.Sacrifice, sacrificeLand, source, game)){
            for(Object uuid : sacrificeLand.getTargets()){
                Permanent land = game.getPermanent((UUID)uuid);
                if(land != null){
                    land.sacrifice(source.getSourceId(), game);
View Full Code Here

Examples of mage.filter.common.FilterControlledLandPermanent

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // {2}, Return a land you control to its owner's hand: Target land becomes the basic land type of your choice until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new GenericManaCost(2));
        ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
        ability.addTarget(new TargetLandPermanent());
        this.addAbility(ability);


    }
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.