Package mage.abilities.costs

Examples of mage.abilities.costs.Cost


   
    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            Cost cost = new GenericManaCost(1);
            if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                super.apply(game, source);
            }
            return true;
        }
        return false;
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        Player opponent = game.getPlayer(targetPointer.getFirst(game, source));
        if (controller != null && opponent != null) {
            Cost cost = new GenericManaCost(1);
            String message = "Would you like to pay {1} to prevent the opponent to draw a card?";
            if (!(opponent.chooseUse(Outcome.Benefit, message, game) && cost.pay(source, game, source.getSourceId(), opponent.getId(), false))) {
                controller.drawCards(1, game);
            }
            return true;
        }
        return false;
View Full Code Here

TOP

Related Classes of mage.abilities.costs.Cost

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.