use of mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect in project mage by magefree.
the class JoragaInvocationEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, game)) {
ContinuousEffect effect = new MustBeBlockedByAtLeastOneTargetEffect();
effect.setTargetPointer(new FixedTarget(permanent, game));
game.addEffect(effect, source);
}
return true;
}
return false;
}
use of mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect in project mage by magefree.
the class NeyithOfTheDireHuntEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null) {
return false;
}
int power = permanent.getPower().getValue();
game.addEffect(new BoostTargetEffect(power, 0, Duration.EndOfTurn), source);
game.addEffect(new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfCombat), source);
return true;
}
Aggregations