Package mage.target

Examples of mage.target.TargetSpell


        this.color.setBlue(true);
        this.color.setBlack(true);

        // Counter target spell. Its controller puts the top two cards of his or her library into his or her graveyard.
        this.getSpellAbility().addTarget(new TargetSpell(new FilterSpell()));
        this.getSpellAbility().addEffect(new PsychicStrikeEffect());
    }
View Full Code Here


        // Counter target spell unless its controller discards his or her hand.
        Effect effect = new CounterUnlessPaysEffect(new DiscardHandCost());
        effect.setText("Counter target spell unless its controller discards his or her hand");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetSpell());
        // Transmute {1}{U}{B}
        this.addAbility(new TransmuteAbility("{1}{U}{B}"));
    }
View Full Code Here

        // Buyback {3}
        this.addAbility(new BuybackAbility("{3}"));

        // Counter target spell with converted mana cost X.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell(new FilterSpell("spell with converted mana cost X")));
    }
View Full Code Here

    public void adjustTargets(Ability ability, Game game) {
        if (ability instanceof SpellAbility) {
            ability.getTargets().clear();
            FilterSpell filter = new FilterSpell("spell with converted mana cost X");
            filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, ability.getManaCostsToPay().getX()));
            ability.addTarget(new TargetSpell(filter));
        }
    }
View Full Code Here

        mode.getTargets().add(new TargetCreaturePermanent());
        this.getSpellAbility().addMode(mode);

        mode = new Mode();
        mode.getEffects().add(new CounterTargetEffect());
        mode.getTargets().add(new TargetSpell(filter));
        this.getSpellAbility().addMode(mode);
    }
View Full Code Here

        this.color.setBlue(true);

        // Counter target spell.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
        // Flashback {5}{U}{U}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{U}{U}"),TimingRule.INSTANT));
    }
View Full Code Here

        this.color.setWhite(true);

        // Counter target spell. You gain 3 life.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addEffect(new GainLifeEffect(3));
        this.getSpellAbility().addTarget(new TargetSpell());
    }
View Full Code Here

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

        // Exile an instant or sorcery spell you control: Put two +1/+1 counters on Nivmagus Elemental. (That spell won't resolve.)
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),new ExileFromStackCost(new TargetSpell(filter)));
        this.addAbility(ability);
       
    }
View Full Code Here

        // Kicker {2}
        this.addAbility(new KickerAbility("{2}"));

        // Counter target spell if its converted mana cost is 2 or less. If Prohibit was kicked, counter that spell if its converted mana cost is 4 or less instead.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell(filter4));
    }
View Full Code Here

    @Override
    public void adjustTargets(Ability ability, Game game) {
        if (ability instanceof SpellAbility) {
            if (!KickedCondition.getInstance().apply(game, ability)) {
                ability.getTargets().clear();
                ability.getTargets().add(new TargetSpell(filter2));
            }
        }
    }
View Full Code Here

TOP

Related Classes of mage.target.TargetSpell

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.