Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.ExileTargetEffect


    }

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent targetPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
        if (targetPermanent != null && new ExileTargetEffect().apply(game, source)) {
            ContinuousEffect effect = new ActOfAuthorityGainControlEffect(Duration.Custom, targetPermanent.getControllerId());
            effect.setTargetPointer(new FixedTarget(source.getSourceId()));
            game.addEffect(effect, source);
            return true;
        }
View Full Code Here


        this.color.setBlack(true);

        // Skip your draw step.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect()));       
        // Whenever you discard a card, exile that card from your graveyard.
        Effect effect = new ExileTargetEffect(null, "", Zone.GRAVEYARD);
        effect.setText("exile that card from your graveyard");
        this.addAbility(new NecropotenceTriggeredAbility(effect));
        // Pay 1 life: Exile the top card of your library face down. Put that card into your hand at the beginning of your next end step.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new NecropotenceEffect(), new PayLifeCost(1)));
       
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        // If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
        // the target creature won't be exiled.
        if (permanent != null) {
            return new ExileTargetEffect(source.getSourceId(), permanent.getLogName()).apply(game, source);
        }
        return false;
    }
View Full Code Here

        this.expansionSetCode = "ODY";

        this.color.setBlack(true);

        // At the beginning of your upkeep, exile a card from your graveyard.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), TargetController.YOU, false);
        TargetCardInYourGraveyard target = new TargetCardInYourGraveyard();
        ability.addTarget(target);
        this.addAbility(ability);
       
        // Threshold - As long as seven or more cards are in your graveyard, Decaying Soil has "Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand."
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Object object = game.getState().getValue(source.getSourceId().toString() + "returnedCreature");
        if ((object instanceof MageObjectReference)) {
            Effect effect = new ExileTargetEffect();
            effect.setTargetPointer(new FixedTarget(((MageObjectReference)object).getSourceId()));
            effect.apply(game, source);
            return new ReturnToHandSourceEffect(true).apply(game, source);
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Object object = game.getState().getValue(source.getSourceId().toString() + "returnedCreature");
        if ((object instanceof MageObjectReference)) {
            Effect effect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD);
            effect.setTargetPointer(new FixedTarget(((MageObjectReference)object).getSourceId()));
            effect.apply(game, source);
        }
        return false;
    }
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(3);

        // Sacrifice three white creatures: Exile target creature.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(3, 3, filterWhite, true)));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
       
        // Whenever another black creature you control dies, put a 1/1 white Spirit creature token with flying onto the battlefield.
        this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("GPT")), false, filterBlack));
View Full Code Here

}

class LightwielderPaladinTriggeredAbility extends TriggeredAbilityImpl {

    public LightwielderPaladinTriggeredAbility() {
        super(Zone.BATTLEFIELD, new ExileTargetEffect(), true);
    }
View Full Code Here

    public Cremate(UUID ownerId) {
        super(ownerId, 45, "Cremate", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}");
        this.expansionSetCode = "GPT";
        this.color.setBlack(true);
        this.getSpellAbility().addEffect(new ExileTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInGraveyard());
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
    }
View Full Code Here

        this.expansionSetCode = "APC";
        this.supertype.add("Legendary");

        // {W}{U}{B}{R}{G}: Exile target permanent.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new ExileTargetEffect(),
                new ManaCostsImpl("{W}{U}{B}{R}{G}"));
        ability.addTarget(new TargetPermanent());
        this.addAbility(ability);
        // If Legacy Weapon would be put into a graveyard from anywhere, reveal Legacy Weapon and shuffle it into its owner's library instead.
        this.addAbility(new PutIntoGraveFromAnywhereAbility(new RevealAndShuffleIntoLibrarySourceEffect()));
View Full Code Here

TOP

Related Classes of mage.abilities.effects.common.ExileTargetEffect

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.