Package mage.abilities

Examples of mage.abilities.Ability.addCost()


        this.color.setWhite(true);

        // {W}, Discard a card: You gain 3 life.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new ManaCostsImpl("{W}"));
        ability.addCost(new DiscardCardCost());
        this.addAbility(ability);
    }

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


        super(ownerId, 390, "Millstone", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "5ED";

        // {2}, {tap}: Target player puts the top two cards of his or her library into his or her graveyard.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(2), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }

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

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

        // {2}{W}, {tap}: Tap target creature. If that creature is a Zombie, exile it.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HolyJusticiarEffect(), new ManaCostsImpl("{2}{W}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }
View Full Code Here

        // {tap}: Put a 2/2 black Vampire creature token with flying onto the battlefield.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VampireToken()), new TapSourceCost()));
        // {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires.
        this.addAbility(new TransformAbility());
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ColoredManaCost(ColoredManaSymbol.B));
        ability.addCost(new ControlFiveVampiresCost());
        this.addAbility(ability);
    }

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

        filter.add(new EvilTwinPredicate());
    }
    @Override
    public Boolean apply(Game game, Permanent permanent) {
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{U}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent(filter));
        permanent.addAbility(ability, game);
        return true;
    }
}
View Full Code Here

        this.addAbility(ReachAbility.getInstance());
        // At the beginning of your upkeep, put the top two cards of your library into your graveyard.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2), TargetController.YOU, false));
        // {1}{B}{G}, Exile Nyx Weaver: Return target card from your graveyard to your hand.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{1}{B}{G}"));
        ability.addCost(new ExileSourceCost());
        ability.addTarget(new TargetCardInYourGraveyard());
        this.addAbility(ability);
    }

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

        super(ownerId, 218, "Cranial Archive", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "KTK";

        // {2}, Exile Cranial Archive: Target player shuffles his or her gravyeard into his or her library. Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CranialArchiveEffect(), new GenericManaCost(2));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);

    }
View Full Code Here

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

        // {2}{G}, {T}, Put a verse counter on Yisan, the Wanderer Bard: Search your library for a creature card with converted mana cost equal to the number of verse counters on Yisan, put it onto the battlefield, then shuffle your library.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new YisanTheWandererBardEffect(), new ManaCostsImpl("{2}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new PutCountersSourceCost(new Counter("verse")));
        this.addAbility(ability);
    }

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

        this.toughness = new MageInt(3);

        // {2}{G}, {T}, Put a verse counter on Yisan, the Wanderer Bard: Search your library for a creature card with converted mana cost equal to the number of verse counters on Yisan, put it onto the battlefield, then shuffle your library.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new YisanTheWandererBardEffect(), new ManaCostsImpl("{2}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new PutCountersSourceCost(new Counter("verse")));
        this.addAbility(ability);
    }

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

        // {T}: Add {1} to your mana pool.
        this.addAbility(new ColorlessManaAbility());

        // {3}{B}{R}, {T}: Stensia Bloodhall deals 2 damage to target player.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{B}{R}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }

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