*Converted Barren Glory to script.

*Reverted properties file.
This commit is contained in:
Hellfish
2011-09-19 11:05:52 +00:00
parent ec763829dc
commit 1359fb1278
3 changed files with 6 additions and 50 deletions

View File

@@ -1,7 +1,9 @@
Name:Barren Glory
ManaCost:4 W W
Types:Enchantment
Text:At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, you win the game.
Text:no text
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Other | PresentZone$ Battlefield | PresentPlayer$ You | PresentCompare$ EQ0 | IsPresent2$ Card | PresentZone2$ Hand | PresentPlayer2$ You | PresentCompare2$ EQ0 | Execute$ TrigWin | TriggerDescription$ At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, 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/barren_glory.jpg

View File

@@ -58,8 +58,8 @@ draft--properties=draft/draft.properties
lang--transparent-properties=lang/lang.properties
image/base--file=D:/Games/forge/pics
image/token--file=D:/Games/forge/pics/tokens
image/icon--file=D:/Games/forge/pics/icons
image/base--file=pics
image/token--file=pics/tokens
image/icon--file=pics/icons
symbols/small--file=images/symbols-13
sound/base--file=sound

View File

@@ -114,10 +114,6 @@ public class Upkeep implements java.io.Serializable {
// upkeep_Dragon_Broodmother(); //put this before bitterblossom and mycoloth, so that they will resolve FIRST
//Win / Lose
// Checks for can't win or can't lose happen in Player.altWinConditionMet()
upkeep_Barren_Glory();
upkeep_Karma();
upkeep_Oath_of_Druids();
@@ -2317,48 +2313,6 @@ public class Upkeep implements java.io.Serializable {
} // for
} // upkeep_Power_Surge()
/**
* <p>upkeep_Barren_Glory.</p>
*/
private static void upkeep_Barren_Glory() {
final Player player = AllZone.getPhase().getPlayerTurn();
PlayerZone handZone = player.getZone(Constant.Zone.Hand);
CardList list = player.getCardsIn(Zone.Battlefield);
CardList playList = player.getCardsIn(Zone.Battlefield);
playList = playList.filter(new CardListFilter() {
public boolean addCard(final Card c) {
return !c.getName().equals("Mana Pool");
}
});
list = list.getName("Barren Glory");
if (playList.size() == 1 && list.size() == 1 && handZone.size() == 0) {
final Card source = list.get(0);
Ability ability = new Ability(source, "0") {
@Override
public void resolve() {
CardList handList = player.getCardsIn(Constant.Zone.Hand);
CardList playList = player.getCardsIn(Constant.Zone.Battlefield);
playList = playList.getValidCards("Permanents".split(","), source.getController(), source);
playList.remove(source);
if (playList.size() == 0 && handList.size() == 0) {
player.altWinBySpellEffect(source.getName());
}
}
}; // Ability
StringBuilder sb = new StringBuilder();
sb.append("Barren Glory - ").append(player).append(" wins the game");
ability.setStackDescription(sb.toString());
AllZone.getStack().addSimultaneousStackEntry(ability);
} // if
} // upkeep_Barren_Glory
/**
* <p>upkeep_Shapeshifter.</p>
*/