use of mage.abilities.effects.common.counter.ProliferateEffect in project mage by magefree.
the class SwordOfTruthAndJusticeEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Target target = new TargetControlledCreaturePermanent();
target.setNotTarget(true);
if (player.choose(outcome, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {
permanent.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game);
}
}
return new ProliferateEffect().apply(game, source);
}
Aggregations