Package mage.players

Examples of mage.players.Player.chooseUse()


                Card card = cards.get(target.getFirstTarget(), game);
                if (card != null) {
                    Card copy1 = card.copy();
                    Card copy2 = card.copy();
                    Card copy3 = card.copy();
                    if (copy1 != null && you.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), game)) {
                        you.cast(copy1.getSpellAbility(), game, true);
                    }
                    if (copy2 != null && you.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), game)) {
                        you.cast(copy2.getSpellAbility(), game, true);
                    }
View Full Code Here


                    Card copy2 = card.copy();
                    Card copy3 = card.copy();
                    if (copy1 != null && you.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), game)) {
                        you.cast(copy1.getSpellAbility(), game, true);
                    }
                    if (copy2 != null && you.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), game)) {
                        you.cast(copy2.getSpellAbility(), game, true);
                    }
                    if (copy3 != null && you.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), game)) {
                        you.cast(copy3.getSpellAbility(), game, true);
                    }
View Full Code Here

                        you.cast(copy1.getSpellAbility(), game, true);
                    }
                    if (copy2 != null && you.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), game)) {
                        you.cast(copy2.getSpellAbility(), game, true);
                    }
                    if (copy3 != null && you.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), game)) {
                        you.cast(copy3.getSpellAbility(), game, true);
                    }
                    return true;
                }
            }
View Full Code Here

        }
        // check if player wants to use splice

        if (spliceAbilities.size() > 0) {
            Player controller = game.getPlayer(abilityToModify.getControllerId());
            if (controller.chooseUse(Outcome.Benefit, "Splice a card?", game)) {
                Cards cardsToReveal = new CardsImpl();
                do {
                    FilterCard filter = new FilterCard("a card to splice");
                    ArrayList<Predicate<MageObject>> idPredicates = new ArrayList<>();
                    for (SpliceOntoArcaneAbility ability : spliceAbilities) {
View Full Code Here

                            spliceEffect.apply(game, selectedAbility, abilityToModify);
                            cardsToReveal.add(game.getCard(cardId));
                            spliceAbilities.remove(selectedAbility);
                        }
                    }
                } while (!spliceAbilities.isEmpty() && controller.chooseUse(Outcome.Benefit, "Splice another card?", game));
                controller.revealCards("Spliced cards", cardsToReveal, game);
            }
        }
    }
View Full Code Here

                Card card = controller.getLibrary().getFromTop(game);
                if (card != null) {
                    Cards cards = new CardsImpl(card);
                    controller.lookAtCards(sourcePermanent.getLogName(), cards, game);
                    if (CardUtil.shareSubtypes(sourcePermanent, card)) {
                        if (controller.chooseUse(outcome,new StringBuilder("Kinship - Reveal ").append(card.getLogName()).append("?").toString(), game)) {
                            controller.revealCards(sourcePermanent.getLogName(), cards, game);
                            for (Effect effect: kinshipEffects) {
                                effect.setTargetPointer(new FixedTarget(card.getId()));
                                if (effect.getEffectType().equals(EffectType.ONESHOT)) {
                                    effect.apply(game, source);
View Full Code Here

        // TODO: Handle optionalCosts at the same time as already OptionalAdditionalSourceCosts are handled.
        for (Cost cost : optionalCosts) {
              if (cost instanceof ManaCost) {
                cost.clearPaid();
                if (controller.chooseUse(Outcome.Benefit, "Pay optional cost " + cost.getText() + "?", game)) {
                    manaCostsToPay.add((ManaCost) cost);
                }
            }
        }
        //20100716 - 601.2e
View Full Code Here

                sb.append(this.getRule(object.getLogName()));
            }
            else {
                sb.append("Use the following ability? ").append(this.getRule());
            }
            if (!player.chooseUse(getEffects().get(0).getOutcome(), sb.toString(), game)) {
                return false;
            }
        }
        //20091005 - 603.4
        if (checkInterveningIfClause(game)) {
View Full Code Here

            if (!damageEvent.isCombatDamage() && game.getOpponents(event.getTargetId()).contains(playerId)) {
                Player target = game.getPlayer(event.getTargetId());
                Player player = game.getPlayer(playerId);
                if (target != null && player != null) {
                    int numPlaneswalkers = game.getBattlefield().countAll(filter, target.getId(), game);
                    if (numPlaneswalkers > 0 && player.chooseUse(outcome, "Redirect damage to planeswalker?", game)) {
                        redirectTarget = new TargetPermanent(filter);
                        if (numPlaneswalkers == 1) {
                            redirectTarget.add(game.getBattlefield().getAllActivePermanents(filter, target.getId(), game).get(0).getId(), game);
                        }
                        else {
View Full Code Here

            if (ability != null && controller != null && sourcePermanent != null) {
                Ability newAbility = ability.copy();
                newAbility.newId();
                game.getStack().push(new StackAbility(newAbility, source.getControllerId()));
                if (newAbility.getTargets().size() > 0) {
                    if (controller.chooseUse(newAbility.getEffects().get(0).getOutcome(), "Choose new targets?", game)) {
                        newAbility.getTargets().clearChosen();
                        if (newAbility.getTargets().chooseTargets(newAbility.getEffects().get(0).getOutcome(), source.getControllerId(), newAbility, game) == false) {
                            return false;
                        }
                    }
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.