*Converted Near-Death Experience to script.

This commit is contained in:
Hellfish
2011-09-19 08:44:21 +00:00
parent c6f2407841
commit bdbdba2dbd
2 changed files with 3 additions and 33 deletions

View File

@@ -1,7 +1,9 @@
Name:Near-Death Experience Name:Near-Death Experience
ManaCost:2 W W W ManaCost:2 W W W
Types:Enchantment 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:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/near_death_experience.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/near_death_experience.jpg

View File

@@ -117,7 +117,6 @@ public class Upkeep implements java.io.Serializable {
//Win / Lose //Win / Lose
// Checks for can't win or can't lose happen in Player.altWinConditionMet() // Checks for can't win or can't lose happen in Player.altWinConditionMet()
upkeep_Near_Death_Experience();
upkeep_Test_of_Endurance(); upkeep_Test_of_Endurance();
upkeep_Helix_Pinnacle(); upkeep_Helix_Pinnacle();
upkeep_Barren_Glory(); upkeep_Barren_Glory();
@@ -2380,37 +2379,6 @@ public class Upkeep implements java.io.Serializable {
} // if } // if
} // upkeep_Helix_Pinnacle } // upkeep_Helix_Pinnacle
/**
* <p>upkeep_Near_Death_Experience.</p>
*/
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
/** /**
* <p>upkeep_Test_of_Endurance.</p> * <p>upkeep_Test_of_Endurance.</p>
*/ */