fixed Martial Impetus boost (fixes
@@ -13,6 +13,7 @@ import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
+import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
@@ -29,6 +30,7 @@ public final class MartialImpetus extends CardImpl {
static {
filter.add(MartialImpetusPredicate.instance);
+ filter.add(AnotherPredicate.instance);
}
public MartialImpetus(UUID ownerId, CardSetInfo setInfo) {
@@ -69,9 +71,10 @@ enum MartialImpetusPredicate implements ObjectSourcePlayerPredicate<ObjectSource
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
- return input.getObject() != null && input.getObject().isAttacking() &&
- game.getCombat()
- .getDefendingPlayerId(input.getObject().getId(), game)
- .equals(game.getControllerId(input.getSourceId()));
+ return input.getObject() != null
+ && input.getObject().isAttacking()
+ && game
+ .getOpponents(input.getPlayerId())
+ .contains(game.getCombat().getDefenderId(input.getObject().getId()));
}
}
