- Hopefully a better solution for the LKI problem: add a special flag to show that the card is a temporary copy and should not be considered as being in play

This commit is contained in:
Agetian
2016-12-17 20:12:08 +00:00
parent b50183e7c4
commit 281e5f12c0
2 changed files with 12 additions and 3 deletions

View File

@@ -238,6 +238,8 @@ public class Card extends GameEntity implements Comparable<Card> {
private CardRules cardRules; private CardRules cardRules;
private final CardView view; private final CardView view;
private boolean isTemporaryCopy = false;
// Enumeration for CMC request types // Enumeration for CMC request types
public enum SplitCMCMode { public enum SplitCMCMode {
CurrentSideCMC, CurrentSideCMC,
@@ -6704,7 +6706,7 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
public boolean isInPlay() { public boolean isInPlay() {
return isInZone(ZoneType.Battlefield); return isInZone(ZoneType.Battlefield) && !isTemporaryCopy;
} }
public void onCleanupPhase(final Player turn) { public void onCleanupPhase(final Player turn) {
@@ -7097,4 +7099,12 @@ public class Card extends GameEntity implements Comparable<Card> {
public final Collection<Player> getGoaded() { public final Collection<Player> getGoaded() {
return goad.values(); return goad.values();
} }
public final boolean getIsTemporaryCopy() {
return this.isTemporaryCopy;
}
public final void setIsTemporaryCopy(boolean temp) {
this.isTemporaryCopy = temp;
}
} }

View File

@@ -323,8 +323,7 @@ public final class CardUtil {
newCopy.setZone(in.getZone()); newCopy.setZone(in.getZone());
// copy the timestamp, necessary for the purpose of triggers that test the timestamp of a LKI-copied card. newCopy.setIsTemporaryCopy(true); // signals that this card should not be considered to be in play
newCopy.setTimestamp(in.getTimestamp());
return newCopy; return newCopy;
} }