Examples of clearChosen()


Examples of mage.target.common.TargetCardInGraveyard.clearChosen()

            String message = "Play red instant or sorcery card from your graveyard without paying its mana cost?";
            Set<Card> cards = player.getGraveyard().getCards(filter, game);
            TargetCardInGraveyard target = new TargetCardInGraveyard(filter);
            while (!cards.isEmpty() && player.chooseUse(outcome, message, game)) {
                target.clearChosen();
                if (player.choose(outcome, target, source.getSourceId(), game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        player.cast(card.getSpellAbility(), game, true);
                        player.getGraveyard().remove(card);
View Full Code Here

Examples of mage.target.common.TargetCardInHand.clearChosen()

                        Card card = game.getCard(target.getFirstTarget());
                        if (card != null) {
                            if (otherPlayer.discard(card, source, game)) {
                                amount += 1;
                                result = true;
                                target.clearChosen();
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of mage.target.common.TargetCardInHand.clearChosen()

            while (controller.isInGame()) {
                if (currentPlayer != null && controller.getInRange().contains(currentPlayer.getId())) {
                    if (firstInactivePlayer == null) {
                        firstInactivePlayer = currentPlayer.getId();
                    }
                    target.clearChosen();
                    if (target.canChoose(source.getSourceId(), currentPlayer.getId(), game)
                            && currentPlayer.chooseUse(outcome, "Put permanent from your hand to play?", game)) {
                        if (target.chooseTarget(outcome, currentPlayer.getId(), source, game)) {
                            Card card = game.getCard(target.getFirstTarget());
                            if (card != null) {
View Full Code Here

Examples of mage.target.common.TargetCardInHand.clearChosen()

        PlayerList playerList = game.getPlayerList().copy();
        playerList.setCurrent(game.getActivePlayerId());
        Player player = game.getPlayer(game.getActivePlayerId());
        do {
            if (player.chooseUse(outcome, "Put an artifact, creature, enchantment, or land card from hand onto the battlefield?", game)) {
                target.clearChosen();
                if (player.chooseTarget(outcome, target, source, game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        cardsToPutIntoPlay.add(card);
                    }
View Full Code Here

Examples of mage.target.common.TargetCardInLibrary.clearChosen()

                    if (controller.cast(card.getSpellAbility(), game, true))
                    {
                        game.getExile().removeCard(card, game);
                    }
                }
                target.clearChosen();
        }

        return true;
    }
}
View Full Code Here

Examples of mage.target.common.TargetControlledPermanent.clearChosen()

                }
                Permanent land = game.getPermanent(target4.getFirstTarget());
                if (land != null) {
                    chosen.add(land);
                }
                target4.clearChosen();
            }

        }

        for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
View Full Code Here

Examples of mage.target.common.TargetControlledPermanent.clearChosen()

                    if (permanent != null) {
                        chosen.add(permanent);
                    }
                }

                target.clearChosen();

                // opponents follow
                for (UUID playerId : game.getPlayerList()) {
                    if (playerId != you.getId()) {
                        Player player = game.getPlayer(playerId);
View Full Code Here

Examples of mage.target.common.TargetControlledPermanent.clearChosen()

                            }
                            Permanent permanent = game.getPermanent(target.getFirstTarget());
                            if (permanent != null) {
                                chosen.add(permanent);
                            }
                            target.clearChosen();
                        }
                    }
                }

                // all chosen permanents are sacrificed together
View Full Code Here

Examples of mage.target.common.TargetControlledPermanent.clearChosen()

                }
                Permanent planeswalker = game.getPermanent(target5.getFirstTarget());
                if (planeswalker != null) {
                    chosen.add(planeswalker.getId());
                }
                target5.clearChosen();
            }

        }

        for (UUID uuid : chosen) {
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayer.clearChosen()

            possibleTargets.removeAll(getTargets());
            Iterator<UUID> it = possibleTargets.iterator();
            while (it.hasNext()) {
                UUID targetId = it.next();
                TargetCreatureOrPlayer target = this.copy();
                target.clearChosen();
                target.addTarget(targetId, source, game, true);

                if (target.getTargets().size() == numberTargets) {
                    chosen = 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.