Package mage.filter.predicate.other

Examples of mage.filter.predicate.other.AuraCardCanAttachToPermanentId


        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            Permanent auraPermanent = game.getPermanent(source.getSourceId());
            if (auraPermanent != null && auraPermanent.getSubtype().contains("Aura") && auraPermanent.getOwnerId().equals(source.getControllerId())) {
                Permanent enchantedPermanent = game.getPermanent(auraPermanent.getAttachedTo());
                filter.add(new AuraCardCanAttachToPermanentId(enchantedPermanent.getId()));
                TargetCardInHand target = new TargetCardInHand(0, 1, filter);
                if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
                    Card auraInHand = game.getCard(target.getFirstTarget());
                    if (auraInHand != null) {
                        player.putOntoBattlefieldWithInfo(auraInHand, game, Zone.HAND, source.getSourceId());
View Full Code Here


        filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT));
        filterAura.add(new SubtypePredicate("Aura"));
        filterAura.add(new AuraPermanentCanAttachToPermanentId(bruna));
        filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
        filterAuraCard.add(new SubtypePredicate("Aura"));
        filterAuraCard.add(new AuraCardCanAttachToPermanentId(bruna));
       
        if (player == null) {
            return false;
        }
        Permanent permanent = game.getPermanent(source.getSourceId());
View Full Code Here

        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null){
            FilterCard filter = new FilterCard();
            filter.add(new SubtypePredicate("Aura"));
            filter.add(new AuraCardCanAttachToPermanentId(permanent.getId()));
            TargetCardInHand target = new TargetCardInHand(0, 1, filter);
            if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
                Card auraInHand = game.getCard(target.getFirstTarget());
                if (auraInHand != null) {
                    game.getState().setValue("attachTo:" + auraInHand.getId(), permanent);
View Full Code Here

                    return false;
                }
                FilterCard filterAuraCard = new FilterCard("Aura card with converted mana cost X or less from your hand");
                filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
                filterAuraCard.add(new SubtypePredicate("Aura"));
                filterAuraCard.add(new AuraCardCanAttachToPermanentId(evershrikePermanent.getId()));
                filterAuraCard.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xAmount));
                int count = you.getHand().count(filterAuraCard, game);
                while (you.isInGame() && count > 0 && you.chooseUse(Outcome.Benefit, "Do you wish to put an Aura card from your hand onto Evershrike", game)) {
                    TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
                    if (you.choose(Outcome.Benefit, you.getHand(), targetAura, game)) {
View Full Code Here

        Player you = game.getPlayer(source.getControllerId());
        Permanent attackingCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
        if (you != null && attackingCreature != null) {
            FilterCard filter = new FilterCard("aura that could enchant the lone attacking creature");
            filter.add(new SubtypePredicate("Aura"));
            filter.add(new AuraCardCanAttachToPermanentId(attackingCreature.getId()));
            if (you.chooseUse(Outcome.Benefit, "Do you want to search your library?", game)) {
                TargetCardInLibrary target = new TargetCardInLibrary(filter);
                target.setNotTarget(true);
                if (you.searchLibrary(target, game)) {
                    if (target.getFirstTarget() != null) {
View Full Code Here

TOP

Related Classes of mage.filter.predicate.other.AuraCardCanAttachToPermanentId

Copyright © 2018 www.massapicom. 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.