Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.DoIfCostPaid


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

        // Whenever you gain life, you may pay {2}. If you do, Searing Meditation deals 2 damage to target creature or player.
        Ability ability = new SimpleTriggeredAbility(Zone.BATTLEFIELD, GameEvent.EventType.GAINED_LIFE, new DoIfCostPaid(new DamageTargetEffect(2), new GenericManaCost(2)), "Whenever you gain life, ", true);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }
View Full Code Here


        filter.add(new AnotherPredicate());
    }

    public SludgeStriderTriggeredAbility() {
        // setting optional = false because DoIfCostPaid already asks the player
        super(Zone.BATTLEFIELD, new DoIfCostPaid(new SludgeStriderEffect(), new GenericManaCost(1)), false);
    }
View Full Code Here

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

        // When Viashino Racketeer enters the battlefield, you may discard a card. If you do, draw a card.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new DiscardCardCost())));
    }
View Full Code Here

        this.expansionSetCode = "C13";

        // Whenever you're dealt damage, put that many charge counters on Sun Droplet.
        this.addAbility(new SunDropletTriggeredAbility());
        // At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life.
        Effect effect = new DoIfCostPaid(new GainLifeEffect(1),new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)));
        this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false),
                new SourceHasCounterCondition(CounterType.CHARGE, 1),
                "At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life", false));
    }
View Full Code Here

                new CardTypePredicate(CardType.INSTANT),
                new CardTypePredicate(CardType.SORCERY)));
    }

    MirariTriggeredAbility() {
        super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(), new GenericManaCost(3)), false);
        this.addTarget(new TargetSpell(filter));
    }
View Full Code Here

        this.expansionSetCode = "SOM";
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost());
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
        this.addAbility(new DiesTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{U}")), false));
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);

        // When Iname, Life Aspect dies, you may exile it. If you do, return any number of target Spirit cards from your graveyard to your hand.
        Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new ExileSourceFromGraveCost(), "Exile to return Spirit cards?"), false);
        ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(5);

        // At the beginning of your upkeep, you gain 2 life.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(2), TargetController.YOU, false));
        // Whenever you gain life, you may pay {1}. If you do, draw a card and each opponent loses 1 life.
        this.addAbility(new GainLifeControllerTriggeredAbility(new DoIfCostPaid(new OloroAgelessAsceticEffect(), new GenericManaCost(1)),false));
        // At the beginning of your upkeep, if Oloro, Ageless Ascetic is in the command zone, you gain 2 life.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.COMMAND,
                new GainLifeEffect(new StaticValue(2), "if Oloro, Ageless Ascetic is in the command zone, you gain 2 life"),TargetController.YOU, false));
    }
View Full Code Here

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

        // Whenever Skirk Drill Sergeant or another Goblin dies, you may pay {2}{R}. If you do, reveal the top card of your library. If it's a Goblin permanent card, put it onto the battlefield. Otherwise, put it into your graveyard.
        this.addAbility(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new SkirkDrillSergeantEffect(), new ManaCostsImpl("{2}{R}")), false, filter));

    }
View Full Code Here

        // Haste
        this.addAbility(HasteAbility.getInstance());
        // At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield.
        Ability ability = new ConditionalTriggeredAbility(
                new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD,
                    new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filterSwamp))),
                    TargetController.YOU, false),
                new MoreCardsInHandThanOpponentsCondition(),
                "At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return {this} from your graveyard to the battlefield.");
        this.addAbility(ability);
    }
View Full Code Here

TOP

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

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.