Search in sources :

Example 1 with CantAttackBlockAllEffect

use of mage.abilities.effects.common.combat.CantAttackBlockAllEffect in project mage by magefree.

the class DroningBureaucratsEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    int xValue = source.getManaCostsToPay().getX();
    FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with mana value X");
    filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, xValue));
    game.addEffect(new CantAttackBlockAllEffect(Duration.EndOfTurn, filter), source);
    return true;
}
Also used : ManaValuePredicate(mage.filter.predicate.mageobject.ManaValuePredicate) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) CantAttackBlockAllEffect(mage.abilities.effects.common.combat.CantAttackBlockAllEffect)

Aggregations

CantAttackBlockAllEffect (mage.abilities.effects.common.combat.CantAttackBlockAllEffect)1 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)1 ManaValuePredicate (mage.filter.predicate.mageobject.ManaValuePredicate)1