Examples of clearChoice()


Examples of mage.choices.ChoiceImpl.clearChoice()

        ChoiceImpl choice = new ChoiceImpl(true);
        choice.setChoices(choices);
        while (controller.isInGame() && controller.choose(Outcome.Sacrifice, choice, game) && choices.size() > 1) {
            order.add(getCardType(choice.getChoice()));
            choices.remove(choice.getChoice());
            choice.clearChoice();
        }
        order.add(getCardType(choices.iterator().next()));

        LinkedList<UUID> sacrifices = new LinkedList<>();
        int count = 1;
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

        Player controller = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (controller != null && permanent != null) {
            Choice cardChoice = new ChoiceImpl();
            cardChoice.setChoices(CardRepository.instance.getNonLandNames());
            cardChoice.clearChoice();
            while (!controller.choose(Outcome.Detriment, cardChoice, game)) {
                if (!controller.isInGame()) {
                    return false;
                }
            }
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        Player controller = game.getPlayer(source.getControllerId());
        if (player != null && controller != null) {
            Choice cardChoice = new ChoiceImpl();
            cardChoice.setChoices(CardRepository.instance.getNonLandNames());
            cardChoice.clearChoice();
            cardChoice.setMessage("Name a nonland card");

            while (!controller.choose(Outcome.Exile, cardChoice, game)) {
                if (!controller.isInGame()) {
                    return false;
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        Player playerControls = game.getPlayer(source.getControllerId());
        if (player != null && playerControls != null) {
            Choice cardChoice = new ChoiceImpl();
            cardChoice.setChoices(CardRepository.instance.getNonLandNames());
            cardChoice.clearChoice();
            Choice numberChoice = new ChoiceImpl();
            numberChoice.setMessage("Choose a number greater than 0");
            HashSet<String> numbers = new HashSet<String>();
            for (int i = 1; i <= 4; i++) {
                numbers.add(Integer.toString(i));
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

    public boolean apply(Game game, Ability source) {
        Choice cardChoice = new ChoiceImpl();
        cardChoice.setChoices(CardRepository.instance.getNames());
        for (Player player: game.getPlayers().values()) {
            if(player.getLibrary().size() > 0){
                cardChoice.clearChoice();
                while (!player.choose(Outcome.DrawCard, cardChoice, game&& player.isInGame()) {
                    if (!player.isInGame()) {
                        return false;
                    }
                }
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

                    }
                }

                Choice cardChoice = new ChoiceImpl();
                cardChoice.setChoices(choices);
                cardChoice.clearChoice();
                while (!targetPlayer.choose(Outcome.Benefit, cardChoice, game)) {
                    if (!targetPlayer.isInGame()) {
                        return false;
                    }
                }
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        Player controller = game.getPlayer(source.getControllerId());
        if (player != null && controller != null) {
            Choice cardChoice = new ChoiceImpl();
            cardChoice.setChoices(CardRepository.instance.getNonLandNames());
            cardChoice.clearChoice();

            while (!controller.choose(Outcome.Exile, cardChoice, game)) {
                if (!controller.isInGame()) {
                    return false;
                }
View Full Code Here

Examples of mage.choices.ChoiceImpl.clearChoice()

        Player controller = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (controller != null && permanent != null) {
            Choice cardChoice = new ChoiceImpl();
            cardChoice.setChoices(CardRepository.instance.getNonLandNames());
            cardChoice.clearChoice();
            while (!controller.choose(Outcome.Detriment, cardChoice, game)) {
                if (!controller.isInGame()) {
                    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.