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 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user