Examples of clearChoice()


Examples of mage.choices.Choice.clearChoice()

  public boolean apply(Game game, Ability source) {
    Set<String> cardNames = Sets.getCardNames();
    Choice cardChoice = new ChoiceImpl();
    cardChoice.setChoices(Sets.getCardNames());
    for (Player player: game.getPlayers().values()) {
      cardChoice.clearChoice();
      player.choose(Outcome.DrawCard, cardChoice, game);
      Card card = player.getLibrary().removeFromTop(game);
      Cards cards  = new CardsImpl();
      cards.add(card);
      player.revealCards(cards, game);
View Full Code Here

Examples of mage.choices.Choice.clearChoice()

                case NON_LAND_NAME:
                    cardChoice.setChoices(CardRepository.instance.getNonLandNames());
                    cardChoice.setMessage("Name a non land card");
                    break;                   
            }           
            cardChoice.clearChoice();
            while (!controller.choose(Outcome.Detriment, cardChoice, game)) {
                if (!controller.isInGame()) {
                    return false;
                }
            }
View Full Code Here

Examples of mage.choices.Choice.clearChoice()

        Player controller = game.getPlayer(source.getControllerId());
        MageObject sourceObject = game.getObject(source.getSourceId());
        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.Choice.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.Choice.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.Discard, cardChoice, game)) {
                if (!controller.isInGame()) {
                    return false;
                }
View Full Code Here

Examples of mage.choices.Choice.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.Choice.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.Choice.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.Choice.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.Choice.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
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.