use of mage.abilities.effects.common.continuous.SetToughnessSourceEffect in project mage by magefree.
the class WallOfTombstonesEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int newToughness = CardUtil.overflowInc(1, new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this));
game.addEffect(new SetToughnessSourceEffect(StaticValue.get(newToughness), Duration.Custom, SubLayer.SetPT_7b), source);
return true;
}
use of mage.abilities.effects.common.continuous.SetToughnessSourceEffect in project mage by magefree.
the class SentinelEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent targetPermanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (controller != null && targetPermanent != null) {
int newToughness = CardUtil.overflowInc(targetPermanent.getPower().getValue(), 1);
game.addEffect(new SetToughnessSourceEffect(StaticValue.get(newToughness), Duration.Custom, SubLayer.SetPT_7b), source);
return true;
}
return false;
}
Aggregations