From 8c6baf3df943f269b9a950f358771cd1c0afe1ba Mon Sep 17 00:00:00 2001 From: Hellfish Date: Mon, 19 Sep 2011 09:02:25 +0000 Subject: [PATCH] *Converted Felidar Sovereign and Test of Endurance to script. --- res/cardsfolder/f/felidar_sovereign.txt | 4 +- res/cardsfolder/t/test_of_endurance.txt | 4 +- src/main/java/forge/Upkeep.java | 62 ------------------------- 3 files changed, 6 insertions(+), 64 deletions(-) diff --git a/res/cardsfolder/f/felidar_sovereign.txt b/res/cardsfolder/f/felidar_sovereign.txt index e45dfd7a640..a1978d63c03 100644 --- a/res/cardsfolder/f/felidar_sovereign.txt +++ b/res/cardsfolder/f/felidar_sovereign.txt @@ -1,10 +1,12 @@ Name:Felidar Sovereign ManaCost:4 W W Types:Creature Cat Beast -Text:At the beginning of your upkeep, if you have 40 or more life, you win the game. +Text:no text PT:4/6 K:Vigilance K:Lifelink +T:Mode$Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | LifeTotal$ You | LifeAmount$ GE40 | Execute$ TrigWin | TriggerDescription$ At the beginning of your upkeep, if you have 40 or more life, you win the game. +SVar:TrigWin:AB$WinsGame | Cost$ 0 | Defined$ You SVar:Rarity:Mythic SVar:Picture:http://www.wizards.com/global/images/magic/general/felidar_sovereign.jpg SetInfo:ZEN|Mythic|http://magiccards.info/scans/en/zen/12.jpg diff --git a/res/cardsfolder/t/test_of_endurance.txt b/res/cardsfolder/t/test_of_endurance.txt index 9da26ed52b2..67079860233 100644 --- a/res/cardsfolder/t/test_of_endurance.txt +++ b/res/cardsfolder/t/test_of_endurance.txt @@ -1,7 +1,9 @@ Name:Test of Endurance ManaCost:2 W W Types:Enchantment -Text:At the beginning of your upkeep, if you have 50 or more life, you win the game. +Text:no text +T:Mode$Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | LifeTotal$ You | LifeAmount$ GE50 | Execute$ TrigWin | TriggerDescription$ At the beginning of your upkeep, if you have 50 or more life, you win the game. +SVar:TrigWin:AB$WinsGame | Cost$ 0 | Defined$ You SVar:RemRandomDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/test_of_endurance.jpg diff --git a/src/main/java/forge/Upkeep.java b/src/main/java/forge/Upkeep.java index 8af2af4ca0b..7d39951d37f 100644 --- a/src/main/java/forge/Upkeep.java +++ b/src/main/java/forge/Upkeep.java @@ -117,10 +117,8 @@ public class Upkeep implements java.io.Serializable { //Win / Lose // Checks for can't win or can't lose happen in Player.altWinConditionMet() - upkeep_Test_of_Endurance(); upkeep_Helix_Pinnacle(); upkeep_Barren_Glory(); - upkeep_Felidar_Sovereign(); upkeep_Karma(); upkeep_Oath_of_Druids(); @@ -2320,34 +2318,6 @@ public class Upkeep implements java.io.Serializable { } // for } // upkeep_Power_Surge() - /** - *

upkeep_Felidar_Sovereign.

- */ - private static void upkeep_Felidar_Sovereign() { - final Player player = AllZone.getPhase().getPlayerTurn(); - - CardList list = player.getCardsIn(Zone.Battlefield, "Felidar Sovereign"); - - if (0 < list.size() && player.getLife() >= 40) { - final Card source = list.get(0); - Ability ability = new Ability(source, "0") { - @Override - public void resolve() { - if (player.getLife() >= 40) { - player.altWinBySpellEffect(source.getName()); - } - } - }; // Ability - - StringBuilder sb = new StringBuilder(); - sb.append("Felidar Sovereign - ").append(player).append(" wins the game"); - ability.setStackDescription(sb.toString()); - - AllZone.getStack().addSimultaneousStackEntry(ability); - - } // if - } // upkeep_Felidar_Sovereign - /** *

upkeep_Helix_Pinnacle.

*/ @@ -2379,38 +2349,6 @@ public class Upkeep implements java.io.Serializable { } // if } // upkeep_Helix_Pinnacle - /** - *

upkeep_Test_of_Endurance.

- */ - private static void upkeep_Test_of_Endurance() { - /* - * At the beginning of your upkeep, if you have 50 or more life, you win the game. - */ - final Player player = AllZone.getPhase().getPlayerTurn(); - - CardList list = player.getCardsIn(Zone.Battlefield, "Test of Endurance"); - - if (0 < list.size() && player.getLife() >= 50) { - final Card source = list.get(0); - Ability ability = new Ability(source, "0") { - @Override - public void resolve() { - if (player.getLife() >= 50) { - player.altWinBySpellEffect(source.getName()); - } - } - }; // Ability - - StringBuilder sb = new StringBuilder(); - sb.append(list.get(0)).append(" - ").append(player).append(" wins the game"); - ability.setStackDescription(sb.toString()); - - AllZone.getStack().addSimultaneousStackEntry(ability); - - } // if - } // upkeep_Test_of_Endurance - - /** *

upkeep_Barren_Glory.

*/