mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48: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");
|
newText.append("|Flipped");
|
||||||
} else if (c.getCurrentStateName().equals(CardStateName.Meld)) {
|
} else if (c.getCurrentStateName().equals(CardStateName.Meld)) {
|
||||||
newText.append("|Meld");
|
newText.append("|Meld");
|
||||||
|
if (c.getMeldedWith() != null) {
|
||||||
|
newText.append("|MeldedWith:");
|
||||||
|
newText.append(c.getMeldedWith().getName());
|
||||||
|
}
|
||||||
} else if (c.getCurrentStateName().equals(CardStateName.Modal)) {
|
} else if (c.getCurrentStateName().equals(CardStateName.Modal)) {
|
||||||
newText.append("|Modal");
|
newText.append("|Modal");
|
||||||
}
|
}
|
||||||
@@ -1245,6 +1249,16 @@ public abstract class GameState {
|
|||||||
c.setBackSide(true);
|
c.setBackSide(true);
|
||||||
} else if (info.startsWith("Flipped")) {
|
} else if (info.startsWith("Flipped")) {
|
||||||
c.setState(CardStateName.Flipped, true);
|
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")) {
|
} else if (info.startsWith("Meld")) {
|
||||||
c.setState(CardStateName.Meld, true);
|
c.setState(CardStateName.Meld, true);
|
||||||
c.setBackSide(true);
|
c.setBackSide(true);
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# TODO: adding a Meld card doesn't work because MeldedWith is not set correctly.
|
|
||||||
[metadata]
|
[metadata]
|
||||||
Name:Possibility Storm - Phyrexia: All Will Be One #03
|
Name:Possibility Storm - Phyrexia: All Will Be One #03
|
||||||
URL:https://i1.wp.com/www.possibilitystorm.com/wp-content/uploads/2023/02/latest-1-scaled.jpg?ssl=1
|
URL:https://i1.wp.com/www.possibilitystorm.com/wp-content/uploads/2023/02/latest-1-scaled.jpg?ssl=1
|
||||||
Goal:Win
|
Goal:Win Before Opponent's Next Turn
|
||||||
Turns:9999
|
Turns:9999
|
||||||
Difficulty:Mythic
|
Difficulty:Mythic
|
||||||
Description:Start in your first main phase and before your opponent's next turn. Your opponent has no board, and you have no land! You have 20 cards remaining in your library. Assume any of them that you could draw are not relevant to the solution.
|
Description:Start in your first main phase and win before your opponent's next turn. Your opponent has no board, and you have no land! You have 20 cards remaining in your library. Assume any of them that you could draw are not relevant to the solution.
|
||||||
[state]
|
[state]
|
||||||
turn=1
|
turn=1
|
||||||
activeplayer=p0
|
activeplayer=p0
|
||||||
@@ -14,7 +13,7 @@ p0life=20
|
|||||||
p0landsplayed=0
|
p0landsplayed=0
|
||||||
p0landsplayedlastturn=0
|
p0landsplayedlastturn=0
|
||||||
p0hand=Cement Shoes;Prophetic Prism
|
p0hand=Cement Shoes;Prophetic Prism
|
||||||
p0battlefield=Kaito, Dancing Shadow|Counters:LOYALTY=3;Tezzeret, Betrayer of Flesh|Counters:LOYALTY=2;The Mightstone and Weakstone;Urza, Planeswalker|Meld|Counters:LOYALTY=7|Id:1;Levitating Statue;Ichormoon Gauntlet
|
p0battlefield=Kaito, Dancing Shadow|Counters:LOYALTY=3;Tezzeret, Betrayer of Flesh|Counters:LOYALTY=2;Urza, Planeswalker|Meld|MeldedWith:The Mightstone and Weakstone|Counters:LOYALTY=7|Id:1;Levitating Statue;Ichormoon Gauntlet
|
||||||
p0library=Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt
|
p0library=Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt
|
||||||
p1life=21
|
p1life=21
|
||||||
p1landsplayed=0
|
p1landsplayed=0
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
Name:Possibility Storm - All Will Be One #05
|
Name:Possibility Storm - Phyrexia: All Will Be One #05
|
||||||
URL:https://i0.wp.com/www.possibilitystorm.com/wp-content/uploads/2023/03/latest-1-scaled.jpg?ssl=1
|
URL:https://i0.wp.com/www.possibilitystorm.com/wp-content/uploads/2023/03/latest-1-scaled.jpg?ssl=1
|
||||||
Goal:Win
|
Goal:Win
|
||||||
Turns:1
|
Turns:1
|
||||||
|
|||||||
@@ -196,6 +196,11 @@ public class Puzzle extends GameState implements InventoryItem, Comparable<Puzzl
|
|||||||
String countOTB = "Count$Valid " + targets;
|
String countOTB = "Count$Valid " + targets;
|
||||||
clearSA.setSVar("PermCount", countOTB);
|
clearSA.setSVar("PermCount", countOTB);
|
||||||
break;
|
break;
|
||||||
|
case "win before opponent's next turn":
|
||||||
|
trig = "Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Opponent | TriggerZones$ Command | Static$ True | " +
|
||||||
|
" | TriggerDescription$ At the beginning of your opponent's next turn, you lose the game.";
|
||||||
|
eff = "DB$ LosesGame | Defined$ You";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user