- Added goal type "Survive" to puzzle mode.

- Added two new puzzles from Rooger that are now scriptable.
This commit is contained in:
Agetian
2017-08-01 06:37:05 +00:00
parent 8fc41c4c45
commit 020b31cb6f
4 changed files with 59 additions and 5 deletions

2
.gitattributes vendored
View File

@@ -19431,8 +19431,10 @@ forge-gui/res/puzzle/PP06.pzl -text
forge-gui/res/puzzle/PP07.pzl -text
forge-gui/res/puzzle/PP08.pzl -text
forge-gui/res/puzzle/PP09.pzl -text
forge-gui/res/puzzle/PP10.pzl -text
forge-gui/res/puzzle/PP11.pzl -text
forge-gui/res/puzzle/PP12.pzl -text
forge-gui/res/puzzle/PP13.pzl -text
forge-gui/res/puzzle/PP15.pzl -text
forge-gui/res/puzzle/PP16.pzl -text
forge-gui/res/puzzle/PP17.pzl -text

View File

@@ -0,0 +1,20 @@
#Surviving until next turn is the winning condition
[metadata]
Name:Pauper Puzzles #10 - Running On Empty
URL:https://pauperpuzzles.wordpress.com/2017/01/26/10-running-on-empty/
Goal:Survive
Turns:2
Difficulty:Hard
Description:Survive until your next turn.
[state]
ActivePlayer=Human
ActivePhase=Main1
HumanLife=5
AILife=20
humanhand=Radiant Fountain;Simic Growth Chamber;Thought Scour
humanlibrary=Respite;Think Twice;Piracy Charm
humangraveyard=Fog;Deep Analysis;Pulse of Murasa
humanbattlefield=Tranquil Thicket;Simic Growth Chamber;Simic Growth Chamber;Simic Growth Chamber;Thornwood Falls;Thornwood Falls;Thornwood Falls;Thornwood Falls;Island;Island;Battlefield Scrounger
aihand=Goblin Bushwhacker;Lava Spike;Goblin War Strike;Searing Blaze;Needle Drop
ailibrary=Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain;Mountain
aibattlefield=Beetleback Chief;t:Goblin,P:1,T:1,Cost:no cost,Types:Creature-Goblin,Keywords:,Image:r_1_1_goblin_SOM;t:Goblin,P:1,T:1,Cost:no cost,Types:Creature-Goblin,Keywords:,Image:r_1_1_goblin_SOM;t:Goblin,P:1,T:1,Cost:no cost,Types:Creature-Goblin,Keywords:,Image:r_1_1_goblin_SOM;t:Goblin,P:1,T:1,Cost:no cost,Types:Creature-Goblin,Keywords:,Image:r_1_1_goblin_SOM;Mountain|Tapped;Mountain|Tapped;Mountain|Tapped;Mountain|Tapped;Mountain|Tapped;Mountain|Tapped

View File

@@ -0,0 +1,18 @@
[metadata]
Name:Pauper Puzzles #13 - A Tap Dance
URL:https://pauperpuzzles.wordpress.com/2017/02/11/13-a-tap-dance/
Goal:Survive
Turns:2
Description:Survive until your next turn.
Difficulty:Hard
[state]
ActivePlayer=Human
ActivePhase=Main1
HumanLife=1
AILife=20
humanhand=Azorius Chancery;Ghostly Flicker;Pestermite;Explore;Sundering Vitae
humanlibrary=Dream's Grip;Ghostly Flicker
humanbattlefield=Kabira Crossroads;Secluded Steppe;Island;Forest;Essence Warden|Id:12;Curse of Chains|Attaching:12;Pestermite;Quirion Ranger
aihand=Groundswell
aibattlefield=Shinen of Life's Roar;Nest Invader;Skarrgan Pit-Skulk;River Boa;Silhana Ledgewalker|Counters:P1P1=1;Tangle Golem;Elite Cat Warrior;Vault Skirge
ailibrary=Forest

View File

@@ -102,14 +102,28 @@ public class Puzzle extends GameState implements InventoryItem, Comparable {
goalCard.addType("Effect");
goalCard.setOracleText(getGoalDescription());
final String loseTrig = "Mode$ Phase | Phase$ Cleanup | TriggerZones$ Command | Static$ True | " +
// Default goal: win the game; lose on turn X
String trig = "Mode$ Phase | Phase$ Cleanup | TriggerZones$ Command | Static$ True | " +
"TurnCount$ " + turns + " | TriggerDescription$ At the beginning of your cleanup step, you lose the game.";
final String loseEff = "DB$ LosesGame | Defined$ You";
String eff = "DB$ LosesGame | Defined$ You";
final Trigger loseTrigger = TriggerHandler.parseTrigger(loseTrig, goalCard, true);
switch(goal.toLowerCase()) {
case "win":
// Handled as default
break;
case "survive":
trig = "Mode$ Phase | Phase$ Upkeep | TriggerZones$ Command | Static$ True | " +
"TurnCount$ " + (turns + 1) + " | TriggerDescription$ At the beginning of your upkeep step, you win the game.";
eff = "DB$ WinsGame | Defined$ You";
break;
default:
break;
}
loseTrigger.setOverridingAbility(AbilityFactory.getAbility(loseEff, goalCard));
goalCard.addTrigger(loseTrigger);
final Trigger trigger = TriggerHandler.parseTrigger(trig, goalCard, true);
trigger.setOverridingAbility(AbilityFactory.getAbility(eff, goalCard));
goalCard.addTrigger(trigger);
human.getZone(ZoneType.Command).add(goalCard);
}