Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect


        this.color.setBlue(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(6);

        // Constellation — Whenever Thassa's Devourer or another enchantment enters the battlefield under your control, target player puts the top two cards of his or her library into his or her graveyard.
        Ability ability = new ConstellationAbility(new PutTopCardOfLibraryIntoGraveTargetEffect(2), false);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here


    public MesmericOrb(UUID ownerId) {
        super(ownerId, 204, "Mesmeric Orb", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "MRD";

        // Whenever a permanent becomes untapped, that permanent's controller puts the top card of his or her library into his or her graveyard.
        Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(1);
        effect.setText("that permanent's controller puts the top card of his or her library into his or her graveyard");
        this.addAbility(new BecomesUntappedPermanentTriggeredAbility(effect, false));
    }
View Full Code Here

        // As long as your devotion to blue and black is less than seven, Phenax isn't a creature.
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.B), 7);
        effect.setText("As long as your devotion to blue and black is less than seven, Phenax isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));          
        // Creatures you control have "{T}: Target player puts the top X cards of his or her library into his or her graveyard, where X is this creature's toughness."       
        effect = new PutTopCardOfLibraryIntoGraveTargetEffect(SourcePermanentToughnessValue.getInstance());
        effect.setText("Target player puts the top X cards of his or her library into his or her graveyard, where X is this creature's toughness");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        effect = new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"),false);
        effect.setText("Creatures you control have \"{T}: Target player puts the top X cards of his or her library into his or her graveyard, where X is this creature's toughness.\"");
View Full Code Here

        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Enchanted creature has "{1}{U}, {T}: Target player puts the top three cards of his or her library into his or her graveyard."
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), new ManaCostsImpl("{1}{U}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield)));
    }
View Full Code Here

}

class SewerNemesisTriggeredAbility extends TriggeredAbilityImpl {

    public SewerNemesisTriggeredAbility() {
        super(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(1), false);
    }
View Full Code Here

    public GrindingStation(UUID ownerId) {
        super(ownerId, 127, "Grinding Station", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "5DN";

        // {tap}, Sacrifice an artifact: Target player puts the top three cards of his or her library into his or her graveyard.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), new TapSourceCost());
        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.
View Full Code Here

    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player player = game.getPlayer(event.getPlayerId());
        if (player != null) {
            if (player.getHand().isEmpty()) {
                // he or she puts the top card of his or her library into his or her graveyard
                Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(1);
                effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
                effect.apply(game, source);
                return true;
            } else  {
                // discards a card instead. If the player discards a card this way, he or she draws a card.
                player.discard(1, source, game);
                return false; // because player draws a card, the draw event is kept
View Full Code Here

        // Breaking
        // Target player puts the top eight cards of his or her library into his or her graveyard.
        getLeftHalfCard().getColor().setBlue(true);
        getLeftHalfCard().getColor().setBlack(true);
        getLeftHalfCard().getSpellAbility().addEffect(new PutTopCardOfLibraryIntoGraveTargetEffect(8));
        getLeftHalfCard().getSpellAbility().addTarget(new TargetPlayer());

        // Entering
        // Put a creature card from a graveyard onto the battlefield under your control. It gains haste until end of turn.
        getRightHalfCard().getColor().setRed(true);
View Full Code Here

                    }
                }
            }
            if (xSum > 0) {
                for(UUID playerId : controller.getInRange()) {
                    Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(xSum);
                    effect.setTargetPointer(new FixedTarget(playerId));
                    effect.apply(game, source);
                }

            }
            // prevent undo
            controller.resetStoredBookmark(game);
View Full Code Here

TOP

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

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.