@Override
                public void resolve() {

                    if (card.getController().isHuman()) {
                        StringBuilder question = new StringBuilder();
                        if (card.getName().equals("Academy Rector")) {
                            question.append("Exile ").append(card.getName()).append(" and place ");
                        } else {
                            question.append("Place ");
                        }
                        question.append("an enchantment from your library onto the battlefield?");

                        if (GameActionUtil.showYesNoDialog(card, question.toString())) {
                            if (card.getName().equals("Academy Rector")) {
                                AllZone.getGameAction().exile(card);
                            }
                            CardList list = AllZoneUtil.getPlayerCardsInLibrary(AllZone.getHumanPlayer());
                            list = list.getType("Enchantment");

                            if (list.size() > 0) {
                                Object objectSelected = GuiUtils.getChoiceOptional("Choose an enchantment", list.toArray());

                                if (objectSelected != null) {

                                    final Card c = (Card) objectSelected;
                                    AllZone.getGameAction().moveToPlay(c);

                                    if (c.isAura()) {

                                        String enchantThisType[] = {""};
                                        String message[] = {""};

                                        // The type following "Enchant" maybe upercase or lowercase, cardsfolder has both
                                        // Note that I am being overly cautious.

                                        if (c.hasKeyword("Enchant creature without flying")
                                                || c.hasKeyword("Enchant Creature without flying")) {
                                            enchantThisType[0] = "Creature.withoutFlying";
                                            message[0] = "Select a creature without flying";
                                        } else if (c.hasKeyword("Enchant creature with converted mana cost 2 or less")
                                                || c.hasKeyword("Enchant Creature with converted mana cost 2 or less")) {
                                            enchantThisType[0] = "Creature.cmcLE2";
                                            message[0] = "Select a creature with converted mana cost 2 or less";
                                        } else if (c.hasKeyword("Enchant red or green creature")) {
                                            enchantThisType[0] = "Creature.Red,Creature.Green";
                                            message[0] = "Select a red or green creature";
                                        } else if (c.hasKeyword("Enchant tapped creature")) {
                                            enchantThisType[0] = "Creature.tapped";
                                            message[0] = "Select a tapped creature";
                                        } else if (c.hasKeyword("Enchant creature")
                                                || c.hasKeyword("Enchant Creature")) {
                                            enchantThisType[0] = "Creature";
                                            message[0] = "Select a creature";
                                        } else if (c.hasKeyword("Enchant wall")
                                                || c.hasKeyword("Enchant Wall")) {
                                            enchantThisType[0] = "Wall";
                                            message[0] = "Select a Wall";
                                        } else if (c.hasKeyword("Enchant land you control")
                                                || c.hasKeyword("Enchant Land you control")) {
                                            enchantThisType[0] = "Land.YouCtrl";
                                            message[0] = "Select a land you control";
                                        } else if (c.hasKeyword("Enchant land")
                                                || c.hasKeyword("Enchant Land")) {
                                            enchantThisType[0] = "Land";
                                            message[0] = "Select a land";
                                        } else if (c.hasKeyword("Enchant artifact")
                                                || c.hasKeyword("Enchant Artifact")) {
                                            enchantThisType[0] = "Artifact";
                                            message[0] = "Select an artifact";
                                        } else if (c.hasKeyword("Enchant enchantment")
                                                || c.hasKeyword("Enchant Enchantment")) {
                                            enchantThisType[0] = "Enchantment";
                                            message[0] = "Select an enchantment";
                                        }

                                        CardList allCards = AllZoneUtil.getCardsInPlay();

                                        // Make sure that we were able to match the selected aura with our list of criteria

                                        if (enchantThisType[0] != "" && message[0] != "") {

                                            final CardList choices = allCards.getValidCards(enchantThisType[0], card.getController(), card);
                                            final String msg = message[0];

                                            AllZone.getInputControl().setInput(new Input() {
                                                private static final long serialVersionUID = -6271957194091955059L;

                                                @Override
                                                public void showMessage() {
                                                    AllZone.getDisplay().showMessage(msg);
                                                    ButtonUtil.enableOnlyOK();
                                                }

                                                @Override
                                                public void selectButtonOK() {
                                                    stop();
                                                }

                                                @Override
                                                public void selectCard(Card card, PlayerZone zone) {
                                                    if (choices.contains(card)) {

                                                        if (AllZoneUtil.isCardInPlay(card)) {
                                                            c.enchantCard(card);
                                                            stop();
                                                        }
                                                    }
                                                }//selectCard()
                                            });// Input()

                                        }// if we were able to match the selected aura with our list of criteria
                                    }// If enchantment selected is an aura
                                }// If an enchantment is selected
                            }// If there are enchantments in library

                            card.getController().shuffle();
                        }// If answered yes to may exile
                    }// If player is human

                    // player is the computer
                    else {
                        CardList list = AllZoneUtil.getPlayerCardsInLibrary(AllZone.getComputerPlayer());
                        list = list.filter(new CardListFilter() {
                            public boolean addCard(Card c) {
                                return c.isEnchantment() && !c.isAura();
                            }
                        });

                        if (list.size() > 0) {
                            Card c = CardFactoryUtil.AI_getBestEnchantment(list, card, false);

                            AllZone.getGameAction().moveToPlay(c);
                            if (card.getName().equals("Academy Rector")) {
                                AllZone.getGameAction().exile(card);
                            }
                            card.getController().shuffle();
                        }
                    }// player is the computer
                }