Package mage.target

Examples of mage.target.Target


        this.color.setGreen(true);

        // Choose target artifact or enchantment. Its owner shuffles it into his or her library.
        this.getSpellAbility().addEffect(new DeglamerShuffleIntoLibraryEffect());
        Target target = new TargetPermanent(1,1,filter,true);
        this.getSpellAbility().addTarget(target);
    }
View Full Code Here


        // When Tidebinder Mage enters the battlefield, tap target red or green creature an opponent controls.
        // That creature doesn't untap during its controller's untap step for as long as you control Tidebinder Mage.
        Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
        ability.addEffect(new TidebinderMageEffect());
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
        this.addWatcher(new TidebinderMageWatcher());

    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Nevermaker leaves the battlefield, put target nonland permanent on top of its owner's library.
        Ability ability = new LeavesBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), false);
        Target target = new TargetNonlandPermanent();
        ability.addTarget(target);
        this.addAbility(ability);

        // Evoke {3}{U}
        this.addAbility(new EvokeAbility(this, "{3}{U}"));
View Full Code Here

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

        // At the beginning of your end step, put a +1/+1 counter on target Beast creature you control.
        Ability ability = new BeginningOfEndStepTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false);
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        // Flash
        this.addAbility(FlashAbility.getInstance());
        // When Offalsnout leaves the battlefield, exile target card from a graveyard.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(),false);
        Target target = new TargetCardInGraveyard();
        ability.addTarget(target);
        this.addAbility(ability);
        // Evoke {B}
        this.addAbility(new EvokeAbility(this, "{B}"));
    }
View Full Code Here

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

        // Heroic — Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
        Ability ability = new HeroicAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false);
        Target target = new TargetCardInYourGraveyard(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        this.power = new MageInt(1);
        this.toughness = new MageInt(3);

        // When Fiend Hunter enters the battlefield, you may exile another target creature.
        Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect("Fiend Hunter Exile"), true);
        Target target = new TargetPermanent(filter);
        ability1.addTarget(target);
        this.addAbility(ability1);

        // When Fiend Hunter leaves the battlefield, return the exiled card to the battlefield under its owner's control.
        Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false);
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        if (source.getTargets().size() > 0) {
            Target multiTarget = source.getTargets().get(0);
            for (UUID target : multiTarget.getTargets()) {
                Permanent permanent = game.getPermanent(target);
                if (permanent != null) {
                    permanent.addCounters(CounterType.P1P1.createInstance(multiTarget.getTargetAmount(target)), game);
                }
            }
        }
        return true;
    }
View Full Code Here

        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G), 7);
        effect.setText("As long as your devotion to black and green is less than seven, Pharika isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));            
        // {B}{G}: Exile target creature card from a graveyard. It's owner puts a 1/1 black and green Snake enchantment creature token with deathtouch onto the battlefield.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}"));
        Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard"));
        ability.addTarget(target);
        this.addAbility(ability);
               
       
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent sourcePermanent = game.getPermanent(source.getSourceId());
        if (player != null && sourcePermanent != null) {
            Target target = new TargetPermanent(new FilterControlledCreaturePermanent());
            target.setNotTarget(true);
            if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
                player.choose(Outcome.Copy, target, source.getSourceId(), game);
                Permanent copyFromPermanent = game.getPermanent(target.getFirstTarget());
                if (copyFromPermanent != null) {
                    game.copyPermanent(copyFromPermanent, sourcePermanent, source, new ApplyToPermanent() {
                        @Override
                        public Boolean apply(Game game, Permanent permanent) {
                            // {2}{U}{U}: Return this creature to its owner's hand.
View Full Code Here

TOP

Related Classes of mage.target.Target

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.