Package mage.filter.predicate.permanent

Examples of mage.filter.predicate.permanent.BlockingAttackerIdPredicate


        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {B}{B}: Destroy target creature blocking Knight of Dusk.
        FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking {this}");
        filter.add(new BlockingAttackerIdPredicate(this.getId()));
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{B}{B}"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here


        // {B}{G}: Exile target creature blocking or blocked by Sisters of Stone Death.
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(exileId, "Sisters Of Stone Death"), new ManaCostsImpl("{B}{G}"));
        FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by Sisters of Stone Death");
        filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
                new BlockingAttackerIdPredicate(this.getId())));
        ability2.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability2);

        // {2}{B}: Put a creature card exiled with Sisters of Stone Death onto the battlefield under your control.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SistersOfStoneDeathEffect(exileId), new ManaCostsImpl("{2}{B}")));
View Full Code Here

    @Override
    public void adjustTargets(Ability ability, Game game) {
        if (ability.getAbilityType().equals(AbilityType.ACTIVATED)) {
            ability.getTargets().clear();
            FilterCreaturePermanent filter = basicFilter.copy();
            filter.add(new BlockingAttackerIdPredicate(this.getId()));
            Target target = new TargetCreaturePermanent(filter);
            ability.addTarget(target);
        }
    }
View Full Code Here

        this.toughness = new MageInt(5);

        // {W}{B}: Destroy target creature blocking or blocked by Cromat.
        FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by {this}");
        filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
                                 new BlockingAttackerIdPredicate(this.getId())));       
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}{B}"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
        // {U}{R}: Cromat gains flying until end of turn.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{U}{R}")));
View Full Code Here

        this.toughness = new MageInt(6);

        // Creatures blocking or blocked by Alms Beast have lifelink.
        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
                                 new BlockingAttackerIdPredicate(this.getId())));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(LifelinkAbility.getInstance(), Duration.EndOfCombat, filter,
                "Creatures blocking or blocked by {this} have lifelink")));
    }
View Full Code Here

TOP

Related Classes of mage.filter.predicate.permanent.BlockingAttackerIdPredicate

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.