Added support for Lens of Clarity.

This commit is contained in:
Krazy
2014-09-13 22:56:30 +00:00
parent 23fc246ea5
commit 20ef2a9d27
3 changed files with 14 additions and 6 deletions

View File

@@ -8918,7 +8918,8 @@ public class Card extends GameEntity implements Comparable<Card> {
case Graveyard:
case Stack:
//cards in these zones are visible to all
if (isFaceDown() && getController().isOpponentOf(viewer) && !hasKeyword("Your opponent may look at this card.")) {
if (isFaceDown() && getController().isOpponentOf(viewer) && !hasKeyword("Your opponent may look at this card.")
&& !isVisibleToWhileFaceDown(viewer)) { //Support Lens of Clarity
break; //exception is face down cards controlled by opponents
}
return true;
@@ -8964,6 +8965,10 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
public boolean isVisibleToWhileFaceDown(final Player viewer) {
return viewer != null && viewer.getAmountOfKeyword("CanSeeOpponentsFaceDownCards") > 0;
}
/**
* <p>