mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Restore check to treat empty room as dynamic state (#9009)
This commit is contained in:
@@ -557,18 +557,16 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
|
|||||||
boolean needsTransformAnimation = transform || rollback;
|
boolean needsTransformAnimation = transform || rollback;
|
||||||
// faceDown has higher priority over clone states
|
// faceDown has higher priority over clone states
|
||||||
// while text change states doesn't apply while the card is faceDown
|
// while text change states doesn't apply while the card is faceDown
|
||||||
if (state != CardStateName.FaceDown) {
|
if (state != CardStateName.FaceDown && state != CardStateName.EmptyRoom) {
|
||||||
CardCloneStates cloneStates = getLastClonedState();
|
CardCloneStates cloneStates = getLastClonedState();
|
||||||
if (cloneStates != null) {
|
if (cloneStates != null) {
|
||||||
if (!cloneStates.containsKey(state)) {
|
if (!cloneStates.containsKey(state)) {
|
||||||
throw new RuntimeException(getName() + " tried to switch to non-existant cloned state \"" + state + "\"!");
|
throw new RuntimeException(getName() + " tried to switch to non-existant cloned state \"" + state + "\"!");
|
||||||
//return false; // Nonexistant state.
|
//return false; // Nonexistant state.
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!states.containsKey(state)) {
|
||||||
if (!states.containsKey(state)) {
|
System.out.println(getName() + " tried to switch to non-existant state \"" + state + "\"!");
|
||||||
System.out.println(getName() + " tried to switch to non-existant state \"" + state + "\"!");
|
return false; // Nonexistant state.
|
||||||
return false; // Nonexistant state.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user