mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Some more fixes for Puzzle mode
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -19004,7 +19004,9 @@ forge-gui/res/music/menus/Evil[!!-~]March.mp3 -text
|
||||
forge-gui/res/music/menus/Heroic[!!-~]Age.mp3 -text
|
||||
forge-gui/res/music/menus/Lord[!!-~]of[!!-~]the[!!-~]Land.mp3 -text
|
||||
forge-gui/res/music/menus/The[!!-~]Pyre.mp3 -text
|
||||
forge-gui/res/puzzle/PM3[!!-~]-[!!-~]Critical[!!-~]to[!!-~]Win.pzl -text
|
||||
forge-gui/res/puzzle/PS1.pzl -text
|
||||
forge-gui/res/puzzle/PS2.pzl -text
|
||||
forge-gui/res/quest/bazaar/ape_pet_l1.txt -text
|
||||
forge-gui/res/quest/bazaar/ape_pet_l2.txt -text
|
||||
forge-gui/res/quest/bazaar/ape_pet_l3.txt -text
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.google.common.collect.Lists;
|
||||
import forge.card.CardStateName;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.effects.DetachedCardEffect;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
@@ -51,6 +52,8 @@ public abstract class GameState {
|
||||
private final Map<Integer, Card> idToCard = new HashMap<>();
|
||||
private final Map<Card, Integer> cardToAttachId = new HashMap<>();
|
||||
|
||||
private final Map<String, String> abilityString = new HashMap<>();
|
||||
|
||||
private String tChangePlayer = "NONE";
|
||||
private String tChangePhase = "NONE";
|
||||
|
||||
@@ -286,6 +289,10 @@ public abstract class GameState {
|
||||
aiCardTexts.put(ZoneType.Command, categoryValue);
|
||||
}
|
||||
|
||||
else if (categoryName.startsWith("ability")) {
|
||||
abilityString.put(categoryName.substring("ability".length()), categoryValue);
|
||||
}
|
||||
|
||||
else {
|
||||
System.out.println("Unknown key: " + categoryName);
|
||||
}
|
||||
@@ -452,6 +459,9 @@ public abstract class GameState {
|
||||
} else if (info.startsWith("Attaching:")) {
|
||||
int id = Integer.parseInt(info.substring(info.indexOf(':') + 1));
|
||||
cardToAttachId.put(c, id);
|
||||
} else if (info.startsWith("Ability:")) {
|
||||
String abString = info.substring(info.indexOf(':') + 1).toLowerCase();
|
||||
c.addSpellAbility(AbilityFactory.getAbility(abilityString.get(abString), c));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
18
forge-gui/res/puzzle/PM3 - Critical to Win.pzl
Normal file
18
forge-gui/res/puzzle/PM3 - Critical to Win.pzl
Normal file
@@ -0,0 +1,18 @@
|
||||
[metadata]
|
||||
Name:Puzzling Magic #3 - Critical to Win
|
||||
URL:http://www.gatheringmagic.com/puzzling-magic-3-%E2%80%93-critical-to-win/
|
||||
Goal:Win
|
||||
Turns:1
|
||||
Difficulty:Medium
|
||||
[state]
|
||||
ActivePlayer=Human
|
||||
ActivePhase=Main1
|
||||
HumanLife=7
|
||||
AILife=5
|
||||
HumanPlay=Blind Zealot; Mortis Dogs|Id:2; Shrine of Boundless Growth|Counters:CHARGE=7|Id:3; Strider Harness|Attaching:2; Viridian Harvest|Attaching:3; Plains; Forest; Swamp; Swamp
|
||||
HumanHand=Gut Shot; Karn Liberated; Noxious Revival; Phyrexian Metamorph
|
||||
AIPlay=Alpha Tyrranax; Caustic Hound|Id:1; Batterskull|Attaching:1; Fangren Marauder|Tapped; Soul Conduit; Forest; Forest; Forest; Mountain; Mountain; Mountain
|
||||
# Ramp difficulty by changing
|
||||
# A) Noxious Revival => Surgical Extraction
|
||||
# B) Blind Zealot => Pro Artifacts, Apostle's Blessing => Your graveyard
|
||||
# C) Blind Zealout => -1/-1 Counter
|
||||
@@ -3,6 +3,7 @@ Name:Possibility Storm #1
|
||||
URL:https://i.redd.it/wws1h03gy7ky.png
|
||||
Goal:Win
|
||||
Turns:1
|
||||
Difficulty:Easy
|
||||
[state]
|
||||
ActivePlayer=Human
|
||||
ActivePhase=Main1
|
||||
|
||||
17
forge-gui/res/puzzle/PS2.pzl
Normal file
17
forge-gui/res/puzzle/PS2.pzl
Normal file
@@ -0,0 +1,17 @@
|
||||
[metadata]
|
||||
Name:Possibility Storm #2
|
||||
URL:https://i.redd.it/e7t8ck386lly.png
|
||||
Goal:Win
|
||||
Turns:1
|
||||
Difficulty:Medium
|
||||
[state]
|
||||
ActivePlayer=Human
|
||||
ActivePhase=Main1
|
||||
HumanLife=20
|
||||
humancounters=ENERGY=3
|
||||
AILife=15
|
||||
humanhand=Savage Alliance;Hungry Flames;Confiscation Coup;Tezzeret's Touch;Yahenni's Expertise
|
||||
humanbattlefield=Island;Swamp;Swamp;Mountain;Electrostatic Pummeler;Tezzeret the Schemer|Counters:LOYALTY=7;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal
|
||||
aihand=Island;Bound by Moonsilver;Plains;Plains;Emissary of the Sleepless;Nearheath Chaplain;Plains
|
||||
aibattlefield=Kessig Dire Swine;Brood Monitor;Consulate Skygate;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3
|
||||
AbilityPetal=AB$ Mana | Cost$ T Sac<1/CARDNAME> | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
|
||||
@@ -20,6 +20,7 @@ public class Puzzle extends GameState implements InventoryItem {
|
||||
String name;
|
||||
String goal;
|
||||
String url;
|
||||
String difficulty;
|
||||
int turns;
|
||||
|
||||
public Puzzle(Map<String, List<String>> puzzleLines) {
|
||||
@@ -39,6 +40,8 @@ public class Puzzle extends GameState implements InventoryItem {
|
||||
this.url = split[1];
|
||||
} else if ("Turns".equalsIgnoreCase(split[0])) {
|
||||
this.turns = Integer.parseInt(split[1]);
|
||||
} else if ("Difficulty".equalsIgnoreCase(split[0])) {
|
||||
this.difficulty = split[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user