mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added support for "Destroy Permanents"/"Kill Creatures" goal in puzzle mode.
- Added puzzle PC_042815 implemented by Xitax.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -19427,6 +19427,7 @@ forge-gui/res/music/menus/The[!!-~]Pyre.mp3 -text
|
||||
forge-gui/res/puzzle/PC_033115.pzl -text
|
||||
forge-gui/res/puzzle/PC_040715.pzl -text
|
||||
forge-gui/res/puzzle/PC_041415.pzl -text
|
||||
forge-gui/res/puzzle/PC_042815.pzl -text
|
||||
forge-gui/res/puzzle/PC_050515.pzl -text
|
||||
forge-gui/res/puzzle/PC_051215.pzl -text
|
||||
forge-gui/res/puzzle/PC_051915.pzl -text
|
||||
|
||||
22
forge-gui/res/puzzle/PC_042815.pzl
Normal file
22
forge-gui/res/puzzle/PC_042815.pzl
Normal file
@@ -0,0 +1,22 @@
|
||||
[metadata]
|
||||
Name:Perplexing Chimera (GatheringMagic.com) 042815 - Dracophobia
|
||||
URL:http://www.gatheringmagic.com/seanuy-042815-perplexing-chimera-5-dracophobia/
|
||||
Goal:Kill Opposing Creatures
|
||||
Targets:Creature.Dragon+OppCtrl
|
||||
Turns:1
|
||||
Difficulty:Hard
|
||||
Description:Destroy all opponent's Dragons. Windstorm is on top of your library.
|
||||
[state]
|
||||
ActivePlayer=human
|
||||
ActivePhase=Main1
|
||||
HumanLife=5
|
||||
AILife=17
|
||||
humanhand=Sidisi's Faithful|Set:DTK; Sudden Reclamation|Set:FRF; Trap Essence|Set:KTK; Mystic of the Hidden Way|Set:KTK
|
||||
humangraveyard=Servant of the Scale|Set:DTK; Naturalize|Set:DTK; Savage Punch|Set:KTK; Sultai Skullkeeper|Set:FRF; Bathe in Dragonfire|Set:FRF; Write into Being|Set:FRF
|
||||
humanlibrary=Windstorm|Set:KTK
|
||||
humanbattlefield=Island|Set:DTK; Island|Set:DTK; Island|Set:DTK; Mountain|Set:DTK; Mountain|Set:DTK; Forest|Set:DTK; Forest|Set:DTK; Rugged Highlands|Set:FRF; Whisperer of the Wilds|Set:FRF; Heir of the Wilds|Set:KTK; Roar of Challenge|Set:KTK|FaceDown; Den Protector|Set:DTK|FaceDown; Herdchaser Dragon|Set:DTK; Briber's Purse|Set:KTK
|
||||
aibattlefield=t:Dragon,P:4,T:4,Cost:no cost,Types:Creature-Dragon,Keywords:Flying,Image:r_4_4_dragon_dtk|Id:420; t:Dragon,P:4,T:4,Cost:no cost,Types:Creature-Dragon,Keywords:Flying,Image:r_4_4_dragon_dtk|Id:421; t:Dragon,P:4,T:4,Cost:no cost,Types:Creature-Dragon,Keywords:Flying,Image:r_4_4_dragon_dtk|Id:422; t:Dragon,P:4,T:4,Cost:no cost,Types:Creature-Dragon,Keywords:Flying,Image:r_4_4_dragon_dtk|Id:423; Sultai Runemark|Attaching:424|Set:FRF; Herdchaser Dragon|Set:DTK|Counters:P1P1=1|Id:424; Plains|Set:DTK|Tapped; Island|Set:DTK|Tapped; Swamp|Set:DTK|Tapped; Mountain|Set:DTK|Tapped; Mountain|Set:DTK|Tapped; Forest|Set:DTK|Tapped; Forest|Set:DTK|Tapped; Scoured Barrens|Set:KTK|Tapped; Swiftwater Cliffs|Set:FRF|Tapped; Thornwood Falls|Set:FRF|Tapped
|
||||
aihand=
|
||||
aigraveyard=
|
||||
ailibrary=
|
||||
aiexile=
|
||||
@@ -21,6 +21,7 @@ public class Puzzle extends GameState implements InventoryItem, Comparable {
|
||||
String url;
|
||||
String difficulty;
|
||||
String description;
|
||||
String targets;
|
||||
int turns;
|
||||
|
||||
public Puzzle(Map<String, List<String>> puzzleLines) {
|
||||
@@ -44,6 +45,8 @@ public class Puzzle extends GameState implements InventoryItem, Comparable {
|
||||
this.difficulty = split[1];
|
||||
} else if ("Description".equalsIgnoreCase(split[0])) {
|
||||
this.description = split[1];
|
||||
} else if ("Targets".equalsIgnoreCase(split[0])) {
|
||||
this.targets = split[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +119,21 @@ public class Puzzle extends GameState implements InventoryItem, Comparable {
|
||||
"TurnCount$ " + (turns + 1) + " | TriggerDescription$ At the beginning of your upkeep step, you win the game.";
|
||||
eff = "DB$ WinsGame | Defined$ You";
|
||||
break;
|
||||
case "destroy specified permanents":
|
||||
case "destroy specified creatures":
|
||||
case "kill opposing creatures":
|
||||
if (targets == null) {
|
||||
targets = "Creature.OppCtrl"; // by default, kill all opponent's creatures
|
||||
}
|
||||
String trigKill = "Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCards$ Creature.OppCtrl | " +
|
||||
"Static$ True | TriggerDescription$ When the last creature opponent controls dies, you win the game.";
|
||||
String effKill = "DB$ WinsGame | Defined$ You | ConditionCheckSVar$ CreatureCount | ConditionSVarCompare$ EQ0";
|
||||
final Trigger triggerKill = TriggerHandler.parseTrigger(trigKill, goalCard, true);
|
||||
triggerKill.setOverridingAbility(AbilityFactory.getAbility(effKill, goalCard));
|
||||
goalCard.addTrigger(triggerKill);
|
||||
|
||||
String countVar = "Count$Valid " + targets;
|
||||
goalCard.setSVar("CreatureCount", countVar);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user