mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- 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:
@@ -238,6 +238,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
private CardRules cardRules;
|
||||
private final CardView view;
|
||||
|
||||
private boolean isTemporaryCopy = false;
|
||||
|
||||
// Enumeration for CMC request types
|
||||
public enum SplitCMCMode {
|
||||
CurrentSideCMC,
|
||||
@@ -6704,7 +6706,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
public boolean isInPlay() {
|
||||
return isInZone(ZoneType.Battlefield);
|
||||
return isInZone(ZoneType.Battlefield) && !isTemporaryCopy;
|
||||
}
|
||||
|
||||
public void onCleanupPhase(final Player turn) {
|
||||
@@ -7097,4 +7099,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public final Collection<Player> getGoaded() {
|
||||
return goad.values();
|
||||
}
|
||||
|
||||
public final boolean getIsTemporaryCopy() {
|
||||
return this.isTemporaryCopy;
|
||||
}
|
||||
|
||||
public final void setIsTemporaryCopy(boolean temp) {
|
||||
this.isTemporaryCopy = temp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,8 +323,7 @@ public final class CardUtil {
|
||||
|
||||
newCopy.setZone(in.getZone());
|
||||
|
||||
// copy the timestamp, necessary for the purpose of triggers that test the timestamp of a LKI-copied card.
|
||||
newCopy.setTimestamp(in.getTimestamp());
|
||||
newCopy.setIsTemporaryCopy(true); // signals that this card should not be considered to be in play
|
||||
|
||||
return newCopy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user