Package mage.filter.common

Examples of mage.filter.common.FilterArtifactPermanent


        this.color.setBlue(true);
        this.color.setBlack(true);

        // {tap}, Sacrifice five artifacts: Take an extra turn after this one.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterArtifactPermanent("five artifacts"), true)));
        this.addAbility(ability);

    }
View Full Code Here


        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {R}, Sacrifice two artifacts: Destroy target artifact.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{R}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterArtifactPermanent("two artifacts"), true)));
        ability.addTarget(new TargetArtifactPermanent());
        this.addAbility(ability);
       
    }
View Full Code Here

        super(effect);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterArtifactPermanent(), source.getControllerId(), source.getSourceId(), game)) {
            creature.moveToZone(Zone.HAND, source.getSourceId(), game, true);
        }
        return true;
    }
View Full Code Here

        this.expansionSetCode = "APC";
        this.color.setRed(true);

        // Destroy target artifact.
        this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
        this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
        // Draw a card.
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
    }
View Full Code Here

        this.toughness = new MageInt(2);

        //Bouncing Beebles is unblockable as long as defending player controls an artifact.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(new FilterArtifactPermanent()));
        effect.setText("{this} is unblockable as long as defending player controls an artifact");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

                    && game.getBattlefield().countAll(new FilterCreaturePermanent(), opponent.getId(), game)
                        > game.getBattlefield().countAll(new FilterCreaturePermanent(), source.getControllerId(), game)) {
                return true;
            }
            if (card.getCardType().contains(CardType.ARTIFACT)
                    && game.getBattlefield().countAll(new FilterArtifactPermanent(), opponent.getId(), game)
                        > game.getBattlefield().countAll(new FilterArtifactPermanent(), source.getControllerId(), game)) {
                return true;
            }
            if (card.getCardType().contains(CardType.ENCHANTMENT)
                    && game.getBattlefield().countAll(new FilterEnchantmentPermanent(), opponent.getId(), game)
                        > game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game)) {
View Full Code Here

        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);

        // Whenever an artifact enters the battlefield, you may untap Grinding Station.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterArtifactPermanent("an artifact"), true));
       
    }
View Full Code Here

        return new TezzeretTheSeekerEffect3(this);
    }

    @Override
    public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
        List<Permanent> permanents = game.getBattlefield().getAllActivePermanents(new FilterArtifactPermanent(), source.getControllerId(), game);
        for (Permanent permanent : permanents) {
            if (permanent != null) {
                switch (layer) {
                    case TypeChangingEffects_4:
                        if (sublayer == SubLayer.NA) {
View Full Code Here

        this.expansionSetCode = "GTC";

        this.color.setRed(true);

        // Target player sacrifices an artifact and a land. Structural Collapse deals 2 damage to that player.
        this.getSpellAbility().addEffect(new SacrificeEffect(new FilterArtifactPermanent(), 1, "Target player"));
        this.getSpellAbility().addEffect(new SacrificeEffect(new FilterLandPermanent(), 1, "Target player"));
        this.getSpellAbility().addEffect(new DamageTargetEffect(2));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.power = new MageInt(5);
        this.toughness = new MageInt(5);

        // Whenever an artifact is put into a graveyard from the battlefield, you may gain 5 life.
        this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
                new GainLifeEffect(5), new FilterArtifactPermanent(),
                "Whenever an artifact is put into a graveyard from the battlefield, ", true));
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterArtifactPermanent

Copyright © 2018 www.massapicom. 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.