Package mage.abilities.effects.common.counter

Examples of mage.abilities.effects.common.counter.AddCountersTargetEffect


        // Whenever a creature you control deals combat damage to a creature, you may put a quest counter on Quest for the Gemblades.
        this.addAbility(new QuestForTheGembladesTriggeredAbility());
        // Remove a quest counter from Quest for the Gemblades and sacrifice it: Put four +1/+1 counters on target creature.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AddCountersTargetEffect(CounterType.P1P1.createInstance(4)),
                new RemoveCountersSourceCost(CounterType.QUEST.createInstance()));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here


    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(source.getSourceId());
        if (card != null) {
            int count = card.getPower().getValue();
            if (count > 0) {
                Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(count));
                effect.setTargetPointer(getTargetPointer());
                return effect.apply(game, source);
            }
        }

        return false;
    }
View Full Code Here

        this.expansionSetCode = "ZEN";

        this.color.setRed(true);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new UntapTargetEffect());
    }
View Full Code Here

        // {1}{R}{R}: Put a blaze counter on target land without a blaze counter on it.
        // For as long as that land has a blaze counter on it, it has "At the beginning
        // of your upkeep, this land deals 1 damage to you." (The land continues to burn
        // after Obsidian Fireheart has left the battlefield.)
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.BLAZE.createInstance()),new ManaCostsImpl("{1}{R}{R}"));
        ability.addTarget(new TargetLandPermanent(filter));
        Effect effect = new ObsidianFireheartGainAbilityEffect(
                new BeginningOfUpkeepTriggeredAbility(
                    new DamageControllerEffect(1),
                    TargetController.YOU,
View Full Code Here

        // Spike Weaver enters the battlefield with three +1/+1 counters on it.
        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3))));
       
        // {2}, Remove a +1/+1 counter from Spike Weaver: Put a +1/+1 counter on target creature.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2));
        ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance()));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
       
        // {1}, Remove a +1/+1 counter from Spike Weaver: Prevent all combat damage that would be dealt this turn.
View Full Code Here

    public ReinforceAbility(int count, Cost cost) {
        this(new StaticValue(count), cost);
    }

    public ReinforceAbility(DynamicValue count, Cost cost) {
        super(Zone.HAND, new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), count), cost);
        this.addCost(new DiscardSourceCost());
        this.addTarget(new TargetCreaturePermanent());
        this.cost = cost.copy();
        this.count = count;
    }
View Full Code Here

        this.subtype.add("Drone");
        this.color.setGreen(true);
        this.power = new MageInt(0);
        this.toughness = new MageInt(0);
        this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1))));
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2));
        ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        effect = new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.ARROWHEAD, 0, 0),
                "if there are no arrowhead counters on {this}, sacrifice it");
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false));
        // {tap}, Remove an arrowhead counter from Serrated Arrows: Put a -1/-1 counter on target creature.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AddCountersTargetEffect(CounterType.M1M1.createInstance()),
                new TapSourceCost());
        ability.addCost(new RemoveCountersSourceCost(CounterType.ARROWHEAD.createInstance()));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        // 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.
View Full Code Here

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

        // Whenever a creature you control attacks, put a +1/+1 counter on it.
        this.addAbility(new AttacksCreatureYourControlTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false, true));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.effects.common.counter.AddCountersTargetEffect

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.