From bdbdba2dbde1b7d2e684830b4787971feead3514 Mon Sep 17 00:00:00 2001 From: Hellfish Date: Mon, 19 Sep 2011 08:44:21 +0000 Subject: [PATCH] *Converted Near-Death Experience to script. --- res/cardsfolder/n/near_death_experience.txt | 4 ++- src/main/java/forge/Upkeep.java | 32 --------------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/res/cardsfolder/n/near_death_experience.txt b/res/cardsfolder/n/near_death_experience.txt index 5427f336d41..25855022329 100644 --- a/res/cardsfolder/n/near_death_experience.txt +++ b/res/cardsfolder/n/near_death_experience.txt @@ -1,7 +1,9 @@ Name:Near-Death Experience ManaCost:2 W W W Types:Enchantment -Text:At the beginning of your upkeep, if you have exactly 1 life, you win the game. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | LifeTotal$ You | LifeAmount$ EQ1 | TriggerZones$ Battlefield | Execute$ TrigWin | TriggerDescription$ At the beginning of your upkeep, if you have exactly 1 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/near_death_experience.jpg diff --git a/src/main/java/forge/Upkeep.java b/src/main/java/forge/Upkeep.java index 37d59e1f891..8af2af4ca0b 100644 --- a/src/main/java/forge/Upkeep.java +++ b/src/main/java/forge/Upkeep.java @@ -117,7 +117,6 @@ public class Upkeep implements java.io.Serializable { //Win / Lose // Checks for can't win or can't lose happen in Player.altWinConditionMet() - upkeep_Near_Death_Experience(); upkeep_Test_of_Endurance(); upkeep_Helix_Pinnacle(); upkeep_Barren_Glory(); @@ -2380,37 +2379,6 @@ public class Upkeep implements java.io.Serializable { } // if } // upkeep_Helix_Pinnacle - /** - *

upkeep_Near_Death_Experience.

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

upkeep_Test_of_Endurance.

*/