Package mage.filter.common

Examples of mage.filter.common.FilterArtifactPermanent


        // Whenever an artifact is put into a graveyard from the battlefield, you may have target opponent lose 1 life.
        Effect effect = new LoseLifeTargetEffect(1);
        effect.setText("you may have target opponent lose 1 life");
        Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
                effect, new FilterArtifactPermanent(),
                "Whenever an artifact is put into a graveyard from the battlefield, ", true);
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }
View Full Code Here


* @author ayratn
*/
public class TargetArtifactPermanent extends TargetPermanent {
   
    public TargetArtifactPermanent() {
        this(1, 1, new FilterArtifactPermanent(), false);
    }
View Full Code Here

    public TargetArtifactPermanent(FilterArtifactPermanent filter) {
        this(1, 1, filter, false);
    }

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

    public TargetArtifactPermanent(int numTargets) {
        this(numTargets, numTargets, new FilterArtifactPermanent(), false);
    }

    public TargetArtifactPermanent(int minNumTargets, int maxNumTargets) {
        this(minNumTargets, maxNumTargets, new FilterArtifactPermanent(), false);
    }
View Full Code Here

        this.toughness = new MageInt(2);

        //Neurok Spy 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

        this.color.setBlue(true);

        // You and target player exchange control of the creature you each control with the highest converted mana cost. Then exchange control of artifacts the same way. If two or more permanents a player controls are tied for highest cost, their controller chooses one of them.
        this.getSpellAbility().addEffect(new JuxtaposeEffect(new FilterCreaturePermanent(), "You and target player exchange control of the creature you each control with the highest converted mana cost."));
        this.getSpellAbility().addEffect(new JuxtaposeEffect(new FilterArtifactPermanent(), "Then exchange control of artifacts the same way. If two or more permanents a player controls are tied for highest cost, their controller chooses one of them."));
        this.getSpellAbility().addTarget(new TargetPlayer() );
    }
View Full Code Here

        // At the beginning of your upkeep, if you control twenty or more artifacts, you win the game.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
        this.addAbility(new ConditionalTriggeredAbility(
                ability,
                new PermanentsOnTheBattlefieldCondition(new FilterArtifactPermanent(), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN,19),
                "At the beginning of your upkeep, if you control twenty or more artifacts, you win the game."));

    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
        if (player == null) {
            return false;
        }
        FilterPermanent filter = new FilterArtifactPermanent();
        filter.add(new ControllerIdPredicate(player.getId()));

        List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId() , game);
        for (Permanent permanent : permanents) {
            ContinuousEffect effect = new HellkiteTyrantControlEffect(source.getControllerId());
            effect.setTargetPointer(new FixedTarget(permanent.getId()));
View Full Code Here

        this.expansionSetCode = "5ED";

        this.color.setRed(true);

        // Destroy all artifacts. They can't be regenerated.
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent(), true));
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        if (targetPointer.getFirst(game, source) != null) {
            FilterArtifactPermanent filter = new FilterArtifactPermanent();
            filter.add(new ControllerIdPredicate(targetPointer.getFirst(game, source)));
            for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
                permanent.moveToZone(Zone.HAND, source.getSourceId(), game, true);
            }
            return 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.