Examples of AbilityPredicate


Examples of mage.filter.predicate.mageobject.AbilityPredicate

    public FilterCreatureForAttack(String name) {
        super(name);
        this.add(Predicates.not(new AttackingPredicate()));
        this.add(Predicates.not(new BlockingPredicate()));
        this.add(Predicates.not(new TappedPredicate()));
        this.add(Predicates.not(new AbilityPredicate(DefenderAbility.class)));
        this.add(new CanTapPredicate());
    }
View Full Code Here

Examples of mage.filter.predicate.mageobject.AbilityPredicate

    public boolean apply(Game game, Ability source) {
        UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game);
        if (defendingPlayerId != null) {
            FilterCreaturePermanent filter = new FilterCreaturePermanent();
            filter.add(new ControllerIdPredicate(defendingPlayerId));
            filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
            List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
            for (Permanent permanent : permanents) {
                permanent.damage(2, source.getSourceId(), game, false, true);
            }
            return 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.