Package mage.abilities

Examples of mage.abilities.Ability.addTarget()


        this.expansionSetCode = "EXO";

        // {1}, {tap}: Return target creature to its owner's hand unless its controller pays {1}.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ErraticPortalEffect(new GenericManaCost(1)), new ManaCostsImpl("{1}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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


        this.color.setGreen(true);

        // At the beginning of each player's upkeep, that player chooses target player who controls more creatures than he or she does and is his or her opponent. The first player may reveal cards from the top of his or her library until he or she reveals a creature card. If he or she does, that player puts that card onto the battlefield and all other cards revealed this way into his or her graveyard.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfDruidsEffect(), TargetController.ANY, true);
        ability.addTarget(new TargetPlayer(1, 1, false, filter));
        this.addAbility(ability);
    }

    @Override
    public void adjustTargets(Ability ability, Game game) {
View Full Code Here

        this.color.setBlack(true);

        // Sacrifice a creature, Return Recurring Nightmare to its owner's hand: Return target creature card from your graveyard to the battlefield. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filter2)));
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        ability.addCost(new ReturnToHandSourceCost());
        this.addAbility(ability);
    }

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

                new SubtypePredicate("Ally")));

        // Whenever Bala Ged Thief or another Ally enters the battlefield under your control, target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card.
        Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BalaGedThiefEffect(), filter, false);
        TargetPlayer target = new TargetPlayer();
        ability.addTarget(target);
        this.addAbility(ability);
    }

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

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

        // {tap}: You may put a land card from your hand onto the battlefield. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect(), new TapSourceCost());
        ability.addTarget(new TargetCardInHand(0, 1, new FilterLandCard()));
        this.addAbility(ability);
       
    }

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

        this.subtype.add("Rat");
        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B));
        ability.addTarget(new TargetControlledPermanent(filter));
        this.addAbility(ability);
    }

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

        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);
    }

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

        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new PreventCombatDamageToSourceEffect(Duration.EndOfTurn));
        ability.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn));
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }

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

        this.expansionSetCode = "TMP";

        // {2}, {tap}: You may tap or untap target creature.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MayTapOrUntapTargetEffect(), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

        // {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);
    }

    public SerratedArrows(final SerratedArrows 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.