* War's Toll - Fixed the land tapping effect to only tap the lands of the one opponent that tapped a land for mana.

This commit is contained in:
LevelX2 2017-08-29 10:05:46 +02:00
parent 3a5b2611dd
commit c6084934af

View file

@ -38,6 +38,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
@ -99,12 +100,13 @@ class WarsTollTapEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
filter.add(new ControllerIdPredicate(getTargetPointer().getFirst(game, source)));
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.tap(game);
if (getTargetPointer().getFirst(game, source) != null) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LAND, getTargetPointer().getFirst(game, source), game)) {
permanent.tap(game);
}
return true;
}
return true;
return false;
}
}