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;
}
Aggregations