Player: canPlayLand use the mayPlay of the Land Ability

This commit is contained in:
Hanmac
2018-09-30 16:41:22 +02:00
parent 5371cbe9c8
commit 45ee00f10b
2 changed files with 5 additions and 2 deletions

View File

@@ -1751,6 +1751,9 @@ public class Player extends GameEntity implements Comparable<Player> {
return canPlayLand(land, false);
}
public final boolean canPlayLand(final Card land, final boolean ignoreZoneAndTiming) {
return canPlayLand(land, ignoreZoneAndTiming, null);
}
public final boolean canPlayLand(final Card land, final boolean ignoreZoneAndTiming, SpellAbility landSa) {
if (!ignoreZoneAndTiming && !canCastSorcery()) {
return false;
}
@@ -1766,7 +1769,7 @@ public class Player extends GameEntity implements Comparable<Player> {
}
if (land != null && !ignoreZoneAndTiming) {
final boolean mayPlay = !land.mayPlay(this).isEmpty();
final boolean mayPlay = landSa == null ? !land.mayPlay(this).isEmpty() : landSa.getMayPlay() != null;
if (land.getOwner() != this && !mayPlay) {
return false;
}

View File

@@ -37,7 +37,7 @@ public class LandAbility extends Ability {
final Card land = this.getHostCard();
final Player p = this.getActivatingPlayer();
return p.canPlayLand(land);
return p.canPlayLand(land, false, this);
}
@Override
public void resolve() {