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.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.ObjectSourcePlayer;
|
import mage.filter.predicate.ObjectSourcePlayer;
|
||||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
@ -29,6 +30,7 @@ public final class MartialImpetus extends CardImpl {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(MartialImpetusPredicate.instance);
|
filter.add(MartialImpetusPredicate.instance);
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MartialImpetus(UUID ownerId, CardSetInfo setInfo) {
|
public MartialImpetus(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -69,9 +71,10 @@ enum MartialImpetusPredicate implements ObjectSourcePlayerPredicate<ObjectSource
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
|
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
|
||||||
return input.getObject() != null && input.getObject().isAttacking() &&
|
return input.getObject() != null
|
||||||
game.getCombat()
|
&& input.getObject().isAttacking()
|
||||||
.getDefendingPlayerId(input.getObject().getId(), game)
|
&& game
|
||||||
.equals(game.getControllerId(input.getSourceId()));
|
.getOpponents(input.getPlayerId())
|
||||||
|
.contains(game.getCombat().getDefenderId(input.getObject().getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue