Package mage.abilities.common

Examples of mage.abilities.common.SpellCastControllerTriggeredAbility.addTarget()


        this.color.setBlue(true);

        // Whenever you cast a creature spell, you may pay {1}. If you do, return target creature to its owner's hand.
        Ability ability = new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new GenericManaCost(1)), filter, false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

    public Equilibrium(final Equilibrium card) {
        super(card);
View Full Code Here


        this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new BeastToken()), filterCreature, false));

        // Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control.
        Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false);
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);

        // Whenever a land enters the battlefield under your control, you gain 3 life.
        effect = new GainLifeEffect(3);
        ability = new EntersBattlefieldControlledTriggeredAbility(effect, new FilterLandPermanent("a land"));
View Full Code Here

        this.toughness = new MageInt(3);

        // Whenever you cast an enchantment spell, you may have target creature get -2/-2 until end of turn.
        Effect effect = new BoostTargetEffect(-2,-2, Duration.EndOfTurn);
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filter, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }

    public Blightcaster(final Blightcaster card) {
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        this.addAbility(ReachAbility.getInstance());
        Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(2), filterElf, true);
        ability.addTarget(new TargetCreaturePermanent(filterFlying));
        this.addAbility(ability);
    }

    public LysAlanaBowmaster(final LysAlanaBowmaster card) {
        super(card);
View Full Code Here

        DoIfCostPaid doIfCostPaid = new DoIfCostPaid(new TapTargetEffect(), new GenericManaCost(1),"Tap creature?");       
        Effect effect = new SkipNextUntapTargetEffect();
        effect.setText("and it doesn't untap during its controller's next untap step");
        doIfCostPaid.addEffect(effect);
        Ability ability = new SpellCastControllerTriggeredAbility(doIfCostPaid, filterNonCreature, false);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);       
    }

    public QuietContemplation(final QuietContemplation card) {
        super(card);
View Full Code Here

        super(ownerId, 225, "Sphinx-Bone Wand", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{7}");
        this.expansionSetCode = "ROE";

        // Whenever you cast an instant or sorcery spell, you may put a charge counter on Sphinx-Bone Wand. If you do, Sphinx-Bone Wand deals damage equal to the number of charge counters on it to target creature or player.
        SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new SphinxBoneWandEffect(), filter, true);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }

    public SphinxBoneWand(final SphinxBoneWand card) {
        super(card);
View Full Code Here

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

        // Whenever you cast a red spell, target creature can't block this turn.
        Ability ability = new SpellCastControllerTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), filter, false);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

    public GoblinBattleJester(final GoblinBattleJester card) {
        super(card);
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        Ability ability = new SpellCastControllerTriggeredAbility(new LoseLifeTargetEffect(1), filter, false);
        ability.addEffect(new GainLifeEffect(1));
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
        this.addAbility(new SoulshiftAbility(2));
    }

    public ThiefOfHope(final ThiefOfHope card) {
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of his or her library into his or her graveyard, where X is that spell's converted mana cost.
        Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), new FilterSpiritOrArcaneCard(), true, true);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }

    public CloudhoofKirin(final CloudhoofKirin card) {
        super(card);
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // Whenever you cast an artifact spell, you may untap target creature.
        SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new UntapTargetEffect(), filter, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

    public MirranSpy(final MirranSpy card) {
        super(card);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.