mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Player: canPlayLand use the mayPlay of the Land Ability
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user