Package mage.filter.common

Examples of mage.filter.common.FilterArtifactPermanent


        this.toughness = new MageInt(2);

        // Battered Golem doesn't untap during your untap step.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipUntapSourceEffect()));
        // Whenever an artifact enters the battlefield, you may untap Battered Golem.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterArtifactPermanent("an artifact"), true));
    }
View Full Code Here


    public CreepingCorrosion(UUID ownerId) {
        super(ownerId, 78, "Creeping Corrosion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
        this.expansionSetCode = "MBS";
        this.color.setGreen(true);
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent()));
    }
View Full Code Here

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

        // Choose one - Exile all artifacts
        this.getSpellAbility().addEffect(new ExileAllEffect(new FilterArtifactPermanent("artifacts")));
        // or exile all creatures
        Mode mode = new Mode();
        mode.getEffects().add(new ExileAllEffect(new FilterCreaturePermanent("creatures")));
        this.getSpellAbility().addMode(mode);
        // or exile all enchantments
View Full Code Here

        this.toughness = new MageInt(5);

        // Scrapdiver Serpent 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

class ControlsAnotherArtifactCondition implements Condition {

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> controlledArtifacts = game.getBattlefield().getAllActivePermanents(new FilterArtifactPermanent(), source.getControllerId(), game);
        for (Permanent permanent : controlledArtifacts) {
            if (!permanent.getId().equals(game.getObject(source.getSourceId()).getId())) {
                return true;
            }
        }
View Full Code Here

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

        // Destroy target artifact. It can't be regenerated.
        this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
        this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
        // Put X 1/1 green Saproling creature tokens onto the battlefield, where X is that artifact's converted mana cost.
        this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
    }
View Full Code Here

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

        // {tap}: Choose target artifact a player controls and target artifact card in that player's graveyard. If both targets are still legal as this ability resolves, that player simultaneously sacrifices the artifact and returns the artifact card to the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinWelderEffect(), new TapSourceCost());
        ability.addTarget(new TargetArtifactPermanent(new FilterArtifactPermanent("artifact a player controls")));
        ability.addTarget(new GoblinWelderTarget());
        this.addAbility(ability);
    }
View Full Code Here

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

        // {R}, Sacrifice an artifact: Target creature can't block this turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBlockTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, new FilterArtifactPermanent("an artifact"), true)));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

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

        // Whenever an artifact is put into a graveyard from the battlefield, you may put a +1/+1 counter on Moriok Rigger.
         Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
                new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new FilterArtifactPermanent(),
                "Whenever an artifact is put into a graveyard from the battlefield, ", true);
         this.addAbility(ability);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            for (Permanent artifact: game.getBattlefield().getAllActivePermanents(new FilterArtifactPermanent(), game)) {
                artifact.untap(game);
            }
            return true;
        }
        return false;
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.