Package mage.abilities.keyword

Examples of mage.abilities.keyword.ProtectionAbility


    @Override
    public boolean apply(Game game, Ability source) {
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        filter2.add(new ColorPredicate(choice.getColor()));
        filter2.setMessage(choice.getChoice());
        setAbility(new ProtectionAbility(new FilterCard(filter2)));
        return super.apply(game, source);
    }
View Full Code Here


        this.toughness = new MageInt(4);

        // Scragnoth can't be countered.
        this.addAbility(new CantCounterAbility());
        // Protection from blue
        this.addAbility(new ProtectionAbility(filter));
    }
View Full Code Here

        this.color.setWhite(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);

        // Protection from red
        this.addAbility(new ProtectionAbility(filter));
        // Shadow
        this.addAbility(ShadowAbility.getInstance());
    }
View Full Code Here

        this.addAbility(FlashAbility.getInstance());
        // Skylasher can't be countered.
        this.addAbility(new CantCounterAbility());
        // Reach, protection from blue
        this.addAbility(ReachAbility.getInstance());
        this.addAbility(new ProtectionAbility(filter));

    }
View Full Code Here

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +2/+2 and has protection from creatures.
        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,2, Duration.WhileOnBattlefield));
        ability.addEffect(new GainAbilityAttachedEffect(new ProtectionAbility(new FilterCreaturePermanent("creatures")), AttachmentType.AURA, Duration.WhileOnBattlefield));
        this.addAbility(ability);
    }
View Full Code Here

}

class RazorBarrierEffect extends GainAbilityTargetEffect {

    public RazorBarrierEffect(Duration duration) {
        super(new ProtectionAbility(new FilterCard()), duration);
        staticText = "Target permanent you control gains protection from artifacts or from the color of your choice until end of turn";
    }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(2);

        this.addAbility(new ProtectionAbility(filter));
    }
View Full Code Here

        this.addAbility(new CantCounterAbility());
        // When you cast Emrakul, take an extra turn after this one.  
        this.addAbility(new EmrakulTheAeonsTornOnCastAbility());
        // Flying, protection from colored spells, annihilator 6
        this.addAbility(FlyingAbility.getInstance());
        this.addAbility(new ProtectionAbility(filter));
        this.addAbility(new AnnihilatorAbility(6));
        // When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.
        this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new EmrakulTheAeonsTornEffect(), false));
    }
View Full Code Here

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && controller.choose(outcome, choice, game)) {
            FilterCard protectionFilter = new FilterCard();
            protectionFilter.add(new ColorPredicate(choice.getColor()));
            protectionFilter.setMessage(choice.getChoice().toLowerCase());
            ContinuousEffect effect = new GainAbilitySourceEffect(new ProtectionAbility(protectionFilter), Duration.EndOfTurn);
            game.addEffect(effect, source);
            return true;
        }
        return false;
    }
View Full Code Here

        this.toughness = new MageInt(4);

        // Vigilance
        this.addAbility(VigilanceAbility.getInstance());
        // protection from creatures
        this.addAbility(new ProtectionAbility(new FilterCreaturePermanent("creatures")));
        // Whenever a creature deals combat damage to you, destroy that creature. Put a 1/1 white and black Spirit creature token with flying onto the battlefield.
       this.addAbility(new TeysaEnvoyOfGhostsTriggeredAbility());

    }
View Full Code Here

TOP

Related Classes of mage.abilities.keyword.ProtectionAbility

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.