Package mage.abilities.effects.common.discard

Examples of mage.abilities.effects.common.discard.DiscardTargetEffect


    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        Player targetedPlayer = game.getPlayer(source.getFirstTarget());
        if (you != null) {
            Effect discardEffect = new DiscardTargetEffect(1, true, true);
            discardEffect.setTargetPointer(new FixedTarget(you.getId()));
            if (discardEffect.apply(game, source)) {
                Card discardedCard = game.getCard(this.getTargetPointer().getFirst(game, source));
                if (discardedCard != null
                        && discardedCard.getCardType().contains(CardType.CREATURE)) {
                    int damage = discardedCard.getPower().getValue();
                    if (targetedPlayer != null) {
View Full Code Here


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

        this.addAbility(IntimidateAbility.getInstance());
        // Sacrifice Brain Weevil: Target player discards two cards. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new SacrificeSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

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

        // Whenever Hollowsage becomes untapped, you may have target player discard a card.
        TriggeredAbility ability = new BecomesUntappedTriggeredAbility(new DiscardTargetEffect(1), true);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
       
    }
View Full Code Here

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


        // Whenever Headhunter deals combat damage to a player, that player discards a card.
        this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true));
       
        // Morph {B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
        this.addAbility(new MorphAbility(this, new ManaCostsImpl("{B}")));

    }
View Full Code Here

        // Mardu Skullhunter enters the battlefield tapped.
        this.addAbility(new EntersBattlefieldTappedAbility());
       
        // <em>Raid</em> - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.", false);       
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

    static {
        filter.add(new SubtypePredicate("Swamp"));
    }

    public SlaveringNullsTriggeredAbility() {
        super(Zone.BATTLEFIELD, new DiscardTargetEffect(1), true);
    }
View Full Code Here

        this.expansionSetCode = "FEM";

        this.color.setBlack(true);

        // Target player discards two cards at random.
        this.getSpellAbility().addEffect(new DiscardTargetEffect(2, true));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.expansionSetCode = "TSP";

        this.color.setBlack(true);

        // Target player discards three cards.
        this.getSpellAbility().addEffect(new DiscardTargetEffect(3));
        this.getSpellAbility().addTarget(new TargetPlayer());

        // Suspend 4—{B} (Rather than cast this card from your hand, you may pay {B} and exile it with four time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.)
        this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{B}"), this));
    }
View Full Code Here

        this.expansionSetCode = "STH";

        this.color.setBlack(true);

        // At the beginning of each player's upkeep, that player discards a card at random.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DiscardTargetEffect(1, true), TargetController.ANY, false));
    }
View Full Code Here

        this.addAbility(ability);
        // Enchanted creature gets +3/+3 and has flying.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield)));
        // Whenever enchanted creature deals damage to a player, that player discards two cards.
        this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DiscardTargetEffect(2), "enchanted", false, true));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.effects.common.discard.DiscardTargetEffect

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.