Examples of chooseUse()


Examples of mage.players.Player.chooseUse()

        Target target = new TargetControlledCreaturePermanent(1, Integer.MAX_VALUE, filter,true);
        target.setTargetName("creatures to convoke");
        if (!target.canChoose(sourceId, controllerId, game)) {
            return;
        }
        if (player.chooseUse(Outcome.Detriment, "Convoke creatures?", game)) {
            player.chooseTarget(Outcome.Tap, target, ability, game);
            if (target.getTargets().size() > 0) {
                for (UUID creatureId: target.getTargets()) {
                    Permanent perm = game.getPermanent(creatureId);
                    if (perm == null || ability.getManaCostsToPay().convertedManaCost() == 0) {
View Full Code Here

Examples of mage.players.Player.chooseUse()

    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        if (((ZoneChangeEvent)event).getFromZone() == Zone.BATTLEFIELD) {
            Permanent permanent = ((ZoneChangeEvent)event).getTarget();
            if (permanent != null) {
                Player player = game.getPlayer(permanent.getOwnerId());
                if (player != null && player.chooseUse(Outcome.Benefit, "Move commander to command zone?", game)){
                    boolean result = permanent.moveToZone(Zone.COMMAND, source.getSourceId(), game, false);
                    return result;
                }
            }
        } else {
View Full Code Here

Examples of mage.players.Player.chooseUse()

            if (card == null) {
                card = game.getCard(event.getTargetId());
            }          
            if (card != null) {
                Player player = game.getPlayer(card.getOwnerId());
                if (player != null && player.chooseUse(Outcome.Benefit, "Move commander to command zone?", game)){
                    game.informPlayers(player.getName() + " moved his commander to the command zone instead");
                    return card.moveToZone(Zone.COMMAND, source.getSourceId(), game, false);
                }
            }
        }
View Full Code Here

Examples of mage.players.Player.chooseUse()

            Card card = controller.getLibrary().getFromTop(game);
            if (card == null) {
                return false;
            }
            controller.lookAtCards(sourceObject.getLogName(), new CardsImpl(card), game);
            boolean toBottom = controller.chooseUse(outcome, "Put card on the bottom of your library?", game);
            return controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, !toBottom, false);
        }
        return true;
    }
View Full Code Here

Examples of mage.players.Player.chooseUse()

            if(cumulativeCost instanceof ManaCost){
                ManaCostsImpl totalCost = new ManaCostsImpl();
                for(int i = 0 ; i < ageCounter; i++){
                    totalCost.add(cumulativeCost.copy());
                }
                if (player.chooseUse(Outcome.Benefit, "Pay " + totalCost.getText() + "?", game)) {
                    totalCost.clearPaid();
                    if (totalCost.payOrRollback(source, game, source.getSourceId(), source.getControllerId())){
                        return true;
                    }
                }
View Full Code Here

Examples of mage.players.Player.chooseUse()

            else{
                CostsImpl totalCost = new CostsImpl();
                for(int i = 0 ; i < ageCounter; i++){
                    totalCost.add(cumulativeCost.copy());
                }
                if (player.chooseUse(Outcome.Benefit, totalCost.getText() + "?", game)) {
                    totalCost.clearPaid();
                    int bookmark = game.bookmarkState();
                    if (totalCost.pay(source, game, source.getSourceId(), source.getControllerId(), false)){
                        return true;
                    }
View Full Code Here

Examples of mage.players.Player.chooseUse()

                FilterControlledCreaturePermanent filter = ((OfferingAbility) source).getFilter();
                Card spellToCast = game.getCard(source.getSourceId());
                Player player = game.getPlayer(source.getControllerId());
                if (player != null &&  !CardUtil.isCheckPlayableMode(affectedAbility) &&
                        player.chooseUse(Outcome.Benefit, "Offer a " + filter.getMessage() + " to cast " + spellToCast.getName() + "?", game)) {
                    Target target = new TargetControlledCreaturePermanent(1,1,filter,true);
                    player.chooseTarget(Outcome.Sacrifice, target, source, game);
                    if (!target.isChosen()) {
                        return false;
                    }
View Full Code Here

Examples of mage.players.Player.chooseUse()

    }

    @Override
    public boolean canBeUntapped(Permanent permanent, Game game) {
        Player player = game.getPlayer(permanent.getControllerId());
        return player != null && player.chooseUse(Outcome.Benefit, "Untap " + permanent.getName() + "?", game);
    }

    @Override
    public SkipUntapOptionalSourceEffect copy() {
        return new SkipUntapOptionalSourceEffect(this);
View Full Code Here

Examples of mage.players.Player.chooseUse()

        Player player = game.getPlayer(source.getControllerId());
        MageObject sourceObject = game.getObject(source.getSourceId());
        if (player != null && cost != null && sourceObject != null){
            boolean replace = true;
            if (cost.canPay(source, source.getSourceId(), player.getId(), game)) {
                if (player.chooseUse(outcome, cost.getText() + "? (otherwise " + sourceObject.getLogName() + " is put into graveyard)", game)) {
                    cost.clearPaid();
                    replace = !cost.pay(source, game, source.getSourceId(), source.getControllerId(), false);
                }
            }
            if (replace) {
View Full Code Here

Examples of mage.players.Player.chooseUse()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            ManaCosts cost = new ManaCostsImpl("{5}{R}{R}");
            if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + "?", game)) {
                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    new UntapAllControllerEffect(new FilterAttackingCreature(),"").apply(game, source);
                    game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), TurnPhase.COMBAT, null, false));
                    return true;
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.