forked from External/mage
Gonti & Thief of Sanity - Do not allow to play land half of MDFCs
This commit is contained in:
parent
eae954d0c5
commit
bb1a63ea48
2 changed files with 16 additions and 13 deletions
|
|
@ -147,21 +147,22 @@ class GontiLordOfLuxuryCastFromExileEffect extends AsThoughEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
UUID targetId = getTargetPointer().getFirst(game, source);
|
||||
if (targetId == null) {
|
||||
this.discard(); // card is no longer in the origin zone, effect can be discarded
|
||||
return false;
|
||||
}
|
||||
Card theCard = game.getCard(objectId);
|
||||
if (theCard == null) {
|
||||
if (theCard == null || theCard.isLand()) {
|
||||
return false;
|
||||
}
|
||||
objectId = theCard.getMainCard().getId(); // for split cards
|
||||
|
||||
UUID targetId = getTargetPointer().getFirst(game, source);
|
||||
if (targetId == null) {
|
||||
this.discard();
|
||||
} else if (objectId.equals(targetId)
|
||||
if (objectId.equals(targetId)
|
||||
&& affectedControllerId.equals(source.getControllerId())) {
|
||||
Card card = game.getCard(objectId);
|
||||
// TODO: Allow to cast Zoetic Cavern face down
|
||||
return card != null
|
||||
&& !card.isLand();
|
||||
return card != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,20 +147,22 @@ class ThiefOfSanityCastFromExileEffect extends AsThoughEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
UUID cardId = getTargetPointer().getFirst(game, source);
|
||||
if (cardId == null) {
|
||||
this.discard(); // card is no longer in the origin zone, effect can be discarded
|
||||
return false;
|
||||
}
|
||||
Card theCard = game.getCard(objectId);
|
||||
if (theCard == null) {
|
||||
if (theCard == null || theCard.isLand()) {
|
||||
return false;
|
||||
}
|
||||
objectId = theCard.getMainCard().getId();// for split cards
|
||||
|
||||
UUID cardId = getTargetPointer().getFirst(game, source);
|
||||
if (cardId == null) {
|
||||
this.discard(); // card is no longer in the origin zone, effect can be discarded
|
||||
} else if (objectId.equals(cardId)
|
||||
if (objectId.equals(cardId)
|
||||
&& affectedControllerId.equals(authorizedPlayerId)) {
|
||||
Card card = game.getCard(objectId);
|
||||
// TODO: Allow to cast Zoetic Cavern face down
|
||||
return card != null && !card.isLand();
|
||||
return card != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue