mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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;
|
||||
// faceDown has higher priority over clone states
|
||||
// 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();
|
||||
if (cloneStates != null) {
|
||||
if (!cloneStates.containsKey(state)) {
|
||||
throw new RuntimeException(getName() + " tried to switch to non-existant cloned state \"" + state + "\"!");
|
||||
//return false; // Nonexistant state.
|
||||
}
|
||||
} else {
|
||||
if (!states.containsKey(state)) {
|
||||
System.out.println(getName() + " tried to switch to non-existant state \"" + state + "\"!");
|
||||
return false; // Nonexistant state.
|
||||
}
|
||||
} else if (!states.containsKey(state)) {
|
||||
System.out.println(getName() + " tried to switch to non-existant state \"" + state + "\"!");
|
||||
return false; // Nonexistant state.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user