(final Card land, final boolean ignoreZoneAndTiming, SpellAbility landSa)
| 1666 | } |
| 1667 | |
| 1668 | public final boolean canPlayLand(final Card land, final boolean ignoreZoneAndTiming, SpellAbility landSa) { |
| 1669 | if (!ignoreZoneAndTiming) { |
| 1670 | // CR 305.3 |
| 1671 | if (!game.getPhaseHandler().isPlayerTurn(this)) { |
| 1672 | return false; |
| 1673 | } |
| 1674 | if (!canCastSorcery() && (landSa == null || !landSa.withFlash(land, this))) { |
| 1675 | return false; |
| 1676 | } |
| 1677 | |
| 1678 | final boolean mayPlay = landSa == null ? !land.mayPlay(this).isEmpty() : landSa.getMayPlay() != null; |
| 1679 | if (land.getOwner() != this && !mayPlay) { |
| 1680 | return false; |
| 1681 | } |
| 1682 | |
| 1683 | final Zone zone = game.getZoneOf(land); |
| 1684 | if (zone != null && (zone.is(ZoneType.Battlefield) || (!zone.is(ZoneType.Hand) && !mayPlay |
| 1685 | && (landSa == null || !landSa.isAlternativeCost(AlternativeCost.Mayhem))))) { |
| 1686 | return false; |
| 1687 | } |
| 1688 | } |
| 1689 | |
| 1690 | // CantBeCast static abilities |
| 1691 | if (StaticAbilityCantBeCast.cantPlayLandAbility(landSa, land, this)) { |
| 1692 | return false; |
| 1693 | } |
| 1694 | |
| 1695 | // **** Check for land play limit per turn **** |
| 1696 | // Dev Mode |
| 1697 | if (getMaxLandPlaysInfinite()) { |
| 1698 | return true; |
| 1699 | } |
| 1700 | |
| 1701 | // check for adjusted max lands play per turn |
| 1702 | return getLandsPlayedThisTurn() < getMaxLandPlays(); |
| 1703 | } |
| 1704 | |
| 1705 | public final int getMaxLandPlays() { |
| 1706 | int adjMax = 1; |
no test coverage detected