forked from External/mage
You may play an additional land - added card hint to all lands about played count and max limit (#13216)
This commit is contained in:
parent
0505f5159e
commit
a5c354f960
4 changed files with 60 additions and 24 deletions
|
|
@ -1,14 +1,13 @@
|
|||
package mage.abilities;
|
||||
|
||||
import mage.ApprovingObject;
|
||||
import mage.abilities.hint.common.CanPlayAdditionalLandsHint;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,6 +20,8 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
|
|||
super(AbilityType.PLAY_LAND, Zone.HAND);
|
||||
this.usesStack = false;
|
||||
this.name = "Play " + cardName;
|
||||
|
||||
this.addHint(CanPlayAdditionalLandsHint.instance);
|
||||
}
|
||||
|
||||
protected PlayLandAbility(final PlayLandAbility ability) {
|
||||
|
|
@ -43,7 +44,7 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
|
|||
}
|
||||
|
||||
//20091005 - 114.2a
|
||||
if(!game.isActivePlayer(playerId)
|
||||
if (!game.isActivePlayer(playerId)
|
||||
|| !game.getPlayer(playerId).canPlayLand()
|
||||
|| !game.canPlaySorcery(playerId)) {
|
||||
return ActivationStatus.getFalse();
|
||||
|
|
@ -54,16 +55,15 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
|
|||
if (!approvingObjects.isEmpty()) {
|
||||
Card card = game.getCard(sourceId);
|
||||
Zone zone = game.getState().getZone(sourceId);
|
||||
if(card != null && card.isOwnedBy(playerId) && Zone.HAND.match(zone)) {
|
||||
if (card != null && card.isOwnedBy(playerId) && Zone.HAND.match(zone)) {
|
||||
// Regular casting, to be an alternative to the AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE from hand (e.g. One with the Multiverse):
|
||||
approvingObjects.add(new ApprovingObject(this, game));
|
||||
}
|
||||
}
|
||||
|
||||
if(approvingObjects.isEmpty()) {
|
||||
if (approvingObjects.isEmpty()) {
|
||||
return ActivationStatus.withoutApprovingObject(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return new ActivationStatus(approvingObjects);
|
||||
}
|
||||
}
|
||||
|
|
@ -87,5 +87,4 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
|
|||
public PlayLandAbility copy() {
|
||||
return new PlayLandAbility(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue