mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
fixed Martial Impetus boost (fixes #7159)
This commit is contained in:
parent
64c6333bce
commit
f28273a126
1 changed files with 8 additions and 5 deletions
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue