Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.DoIfCostPaid


        this.expansionSetCode = "ALL";

        this.color.setWhite(true);

        // Whenever a creature dies, you may pay {3}. If you do, draw a card.
        Ability ability = new DiesCreatureTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{3}")), false);
        this.addAbility(ability);
    }
View Full Code Here


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

        // When Kuldotha Flamefiend enters the battlefield, you may sacrifice an artifact. If you do, Kuldotha Flamefiend deals 4 damage divided as you choose among any number of target creatures and/or players.
        EntersBattlefieldTriggeredAbility ability =
                new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageMultiEffect(4), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))), false);
        ability.addTarget(new TargetCreatureOrPlayerAmount(4));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setGreen(true);

        // Whenever a creature you control dies, you may pay {1}. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest into your graveyard.
        Ability ability = new DiesCreatureTriggeredAbility(
                new DoIfCostPaid(new FosterEffect(), new GenericManaCost(1)),
                false, filter);
        this.addAbility(ability);
    }
View Full Code Here

        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBlockTargetEffect(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("{R}")), false));
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Vorosh, the Hunter deals combat damage to a player, you may pay {2}{G}. If you do, put six +1/+1 counters on Vorosh.
        this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
                new DoIfCostPaid(new AddCountersSourceEffect(CounterType.P1P1.createInstance(6), true), new ManaCostsImpl("{2}{G}")), false));
    }
View Full Code Here

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

        // When Academy Rector dies, you may exile it. If you do, search your library for an enchantment card, put that card onto the battlefield, then shuffle your library.
        Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new AcademyRectorEffect(), new ExileSourceFromGraveCost(), "Exile to search enchantment?"), false);
        this.addAbility(ability);
    }
View Full Code Here

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

        // When Drainpipe Vermin dies, you may pay {B}. If you do, target player discards a card.
        Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new DiscardTargetEffect(1), new ColoredManaCost(ColoredManaSymbol.B)), false);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Oros, the Avenger deals combat damage to a player, you may pay {2}{W}. If you do, Oros deals 3 damage to each nonwhite creature.
        this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
                new DoIfCostPaid(new DamageAllEffect(3, filter), new ManaCostsImpl("{2}{W}")), false));       
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Teneb, the Harvester deals combat damage to a player, you may pay {2}{B}. If you do, put target creature card from a graveyard onto the battlefield under your control.
        Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
                new DoIfCostPaid(new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{2}{B}")), false);
        Target target = new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard"));
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

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

        // Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.
        this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new RikuOfTwoReflectionsCopyEffect(), new ManaCostsImpl("{U}{R}")), filter, false, true));

        // Whenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, put a token that's a copy of that creature onto the battlefield.
        Ability ability = new EntersBattlefieldAllTriggeredAbility(
                Zone.BATTLEFIELD, new RikuOfTwoReflectionsCopyTokenEffect(),filterPermanent, false, true,
                "Whenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, put a token that's a copy of that creature onto the battlefield.",
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.