add Ceta Sanctuary (from Apocalypse)

This commit is contained in:
jendave
2011-08-07 01:52:04 +00:00
parent eb0feea172
commit 897c6da17e
3 changed files with 44 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -1217,6 +1217,7 @@ res/cardsfolder/cerulean_wisps.txt -text svneol=native#text/plain
res/cardsfolder/cerulean_wyvern.txt -text svneol=native#text/plain res/cardsfolder/cerulean_wyvern.txt -text svneol=native#text/plain
res/cardsfolder/cessation.txt -text svneol=native#text/plain res/cardsfolder/cessation.txt -text svneol=native#text/plain
res/cardsfolder/ceta_disciple.txt -text svneol=native#text/plain res/cardsfolder/ceta_disciple.txt -text svneol=native#text/plain
res/cardsfolder/ceta_sanctuary.txt -text svneol=native#text/plain
res/cardsfolder/chain_reaction.txt -text svneol=native#text/plain res/cardsfolder/chain_reaction.txt -text svneol=native#text/plain
res/cardsfolder/chainbreaker.txt svneol=native#text/plain res/cardsfolder/chainbreaker.txt svneol=native#text/plain
res/cardsfolder/chained_throatseeker.txt svneol=native#text/plain res/cardsfolder/chained_throatseeker.txt svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Ceta Sanctuary
ManaCost:2 U
Types:Enchantment
Text:At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://wizards.com/global/images/magic/general/ceta_sanctuary.jpg
End

View File

@@ -40,6 +40,7 @@ public class GameActionUtil {
upkeep_Carnophage(); upkeep_Carnophage();
upkeep_Sangrophage(); upkeep_Sangrophage();
upkeep_Dega_Sanctuary(); upkeep_Dega_Sanctuary();
upkeep_Ceta_Sanctuary();
upkeep_Tangle_Wire(); upkeep_Tangle_Wire();
upkeep_Dance_of_the_Dead(); upkeep_Dance_of_the_Dead();
upkeep_Mana_Crypt(); upkeep_Mana_Crypt();
@@ -3671,6 +3672,40 @@ public class GameActionUtil {
}//for }//for
}//upkeep_Dega_Sanctuary() }//upkeep_Dega_Sanctuary()
private static void upkeep_Ceta_Sanctuary() {
final Player player = AllZone.Phase.getPlayerTurn();
CardList list = AllZoneUtil.getPlayerCardsInPlay(player, "Ceta Sanctuary");
for(Card sanc:list) {
final Card source = sanc;
final Ability ability = new Ability(source, "0") {
public void resolve() {
int draw = 0;
CardList play = AllZoneUtil.getPlayerCardsInPlay(player);
CardList green = play.filter(AllZoneUtil.green);
CardList red = play.filter(AllZoneUtil.red);
if(green.size() > 0 && red.size() > 0) draw = 2;
else if(green.size() > 0 || red.size() > 0) draw = 1;
if(draw > 0) {
player.drawCards(draw);
player.discard(1, this, true);
}
}
};//Ability
StringBuilder sb = new StringBuilder();
sb.append(source).append(" - ");
sb.append("At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.");
ability.setStackDescription(sb.toString());
AllZone.Stack.addSimultaneousStackEntry(ability);
}//for
}//upkeep_Ceta_Sanctuary()
private static void upkeep_Power_Surge() { private static void upkeep_Power_Surge() {
/* /*
* At the beginning of each player's upkeep, Power Surge deals X * At the beginning of each player's upkeep, Power Surge deals X