mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Add support for MeldedWith in Game State.
- Add proper support for PS_ONE3 (goal and all).
This commit is contained in:
@@ -303,6 +303,10 @@ public abstract class GameState {
|
||||
newText.append("|Flipped");
|
||||
} else if (c.getCurrentStateName().equals(CardStateName.Meld)) {
|
||||
newText.append("|Meld");
|
||||
if (c.getMeldedWith() != null) {
|
||||
newText.append("|MeldedWith:");
|
||||
newText.append(c.getMeldedWith().getName());
|
||||
}
|
||||
} else if (c.getCurrentStateName().equals(CardStateName.Modal)) {
|
||||
newText.append("|Modal");
|
||||
}
|
||||
@@ -1245,6 +1249,16 @@ public abstract class GameState {
|
||||
c.setBackSide(true);
|
||||
} else if (info.startsWith("Flipped")) {
|
||||
c.setState(CardStateName.Flipped, true);
|
||||
} else if (info.startsWith("MeldedWith")) {
|
||||
String meldCardName = info.substring(info.indexOf(':') + 1).replace("^", ",");
|
||||
Card meldTarget;
|
||||
PaperCard pc = StaticData.instance().getCommonCards().getCard(meldCardName);
|
||||
if (pc == null) {
|
||||
System.err.println("ERROR: Tried to create a non-existent card named " + meldCardName + " (as a MeldedWith card) when loading game state!");
|
||||
continue;
|
||||
}
|
||||
meldTarget = Card.fromPaperCard(pc, c.getOwner());
|
||||
c.setMeldedWith(meldTarget);
|
||||
} else if (info.startsWith("Meld")) {
|
||||
c.setState(CardStateName.Meld, true);
|
||||
c.setBackSide(true);
|
||||
|
||||
Reference in New Issue
Block a user