Examples of chooseUse()


Examples of mage.players.Player.chooseUse()

            if (target.isTapped()) {
                if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) {
                    target.untap(game);
                }
            } else {
                if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) {
                    target.tap(game);
                }
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.chooseUse()

            Spell spell = game.getStack().getSpell(ability.getId());
            if (player != null && spell != null) {
                this.resetMorph();
                spell.setFaceDown(true); // so only the back is visible
                if (alternateCosts.canPay(ability, sourceId, controllerId, game)) {
                    if (player.chooseUse(Outcome.Benefit, new StringBuilder("Cast this card as a 2/2 face-down creature for ").append(getCosts().getText()).append(" ?").toString(), game)) {
                        activateMorph(game);
                        // change mana costs
                        ability.getManaCostsToPay().clear();
                        ability.getCosts().clear();
                        for (Iterator it = this.alternateCosts.iterator(); it.hasNext();) {
View Full Code Here

Examples of mage.players.Player.chooseUse()

        if (event.getType() == EventType.DRAW_CARD
                && event.getPlayerId().equals(source.getControllerId())
                && archmage != null
                && archmage.getCounters().getCount(CounterType.QUEST) >= 6
                && you != null
                && you.chooseUse(Outcome.Benefit, "Would you like to search you library instead of drawing a card?", game)) {
            return true;
        }
        return false;
    }
}
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) {
            Cost cost = new ManaCostsImpl("{8}");
            if (player.chooseUse(Outcome.Tap, "Pay " + cost.getText() + " and " + staticText, game)) {
                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    for (UUID target : this.targetPointer.getTargets(game, source)) {
                        Permanent permanent = game.getPermanent(target);
                        if (permanent != null) {
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) {
            if (player.chooseUse(Outcome.Benefit, "Pay " + cost.getText()  + "?", game)) {
                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)){
                    return true;
                }
            }
View Full Code Here

Examples of mage.players.Player.chooseUse()

            Player controller = game.getPlayer(source.getControllerId());
            MageObject object = game.getObject(source.getSourceId());
            if (controller == null || object == null) {
                return false;
            }
            if (!controller.chooseUse(outcome, new StringBuilder("Use effect of ").append(object.getLogName()).append("?").toString(), game)) {
                return false;
            }
        }
        Spell spell = game.getStack().getSpell(event.getSourceId());
        for (Effect effect: baseEffects) {
View Full Code Here

Examples of mage.players.Player.chooseUse()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game)
                    && player.chooseUse(Outcome.Benefit, cost.getText() + "? (otherwise " + permanent.getName() + " becomes tapped)", game)) {
                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    return true;
                }
            }
View Full Code Here

Examples of mage.players.Player.chooseUse()

        if (player != null) {
            int cardsToDraw = amount.calculate(game, source, this);
            if (upTo) {
                cardsToDraw = player.getAmount(0, cardsToDraw, "Draw how many cards?", game);
            }
            if (!optional || player.chooseUse(outcome, "Use draw effect?", game)) {
                player.drawCards(cardsToDraw, game);
            }
            return true;
        }
        return false;
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 || !player.chooseUse(Outcome.PutCreatureInPlay, choiceText, game)) {
            return false;
        }

        TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
        if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
View Full Code Here

Examples of mage.players.Player.chooseUse()

    @Override
    protected void actionWithSelectedCards(Cards cards, Game game, Ability source, String windowName) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null && foundCardsToPick > 0) {
            if (!optional || player.chooseUse(Outcome.DrawCard, getMayText(), game)) {
                FilterCard pickFilter = filter.copy();
                pickFilter.setMessage(getPickText());
                TargetCard target = new TargetCard((upTo ? 0:numberToPick.calculate(game, source, this)),numberToPick.calculate(game, source, this), Zone.PICK, pickFilter);
                if (player.choose(Outcome.DrawCard, cards, target, game)) {
                    Cards reveal = new CardsImpl();
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.