Package mage.abilities.common

Examples of mage.abilities.common.SpellCastControllerTriggeredAbility


        this.expansionSetCode = "ZEN";

        this.color.setWhite(true);

        // Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic.
        this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true));
        // Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuestForTheHolyRelicEffect(), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(5)));
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
    }
View Full Code Here


        this.expansionSetCode = "EXO";

        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);
    }
View Full Code Here

    public StaffOfTheDeathMagus(UUID ownerId) {
        super(ownerId, 219, "Staff of the Death Magus", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "M14";

        // Whenever you cast a black spell or a Swamp enters the battlefield under your control, you gain 1 life.
        this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filterSpell,false));
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filterLand, false));
    }
View Full Code Here

    public StaffOfTheWildMagus(UUID ownerId) {
        super(ownerId, 223, "Staff of the Wild Magus", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "M14";

        // Whenever you cast a green spell or a Forest enters the battlefield under your control, you may gain 1 life.
        this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filterSpell,false));
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filterLand, false));
    }
View Full Code Here

    public StaffOfTheMindMagus(UUID ownerId) {
        super(ownerId, 221, "Staff of the Mind Magus", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "M14";

        // Whenever you cast a blue spell or an Island enters the battlefield under your control, you gain 1 life.
        this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filterSpell,false));
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filterLand, false));
    }
View Full Code Here

        this.expansionSetCode = "M14";

        this.color.setGreen(true);

        // Whenever you cast a creature spell, put a 3/3 green Beast creature token onto the battlefield.
        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.color.setRed(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);

        // Whenever you cast an instant or sorcery spell, put a 1/1 red Elemental creature token onto the battlefield.
        this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new ElementalToken()), filter, false));
       
    }
View Full Code Here

        this.power = new MageInt(2);
        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);

    }
View Full Code Here

    public StaffOfTheSunMagus(UUID ownerId) {
        super(ownerId, 222, "Staff of the Sun Magus", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "M14";

        // Whenever you cast a white spell or a Plains enters the battlefield under your control, you gain 1 life.
        this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filterSpell,false));
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filterLand, false));
    }
View Full Code Here

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

        // Whenever you cast an artifact spell, draw a card.
        this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), filter, false));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.common.SpellCastControllerTriggeredAbility

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.