diff --git a/.gitattributes b/.gitattributes index c348607d712..54a1edd1d66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1160,6 +1160,7 @@ res/cardsfolder/dawnray_archer.txt -text svneol=native#text/plain res/cardsfolder/dawnstrider.txt -text svneol=native#text/plain res/cardsfolder/day_of_destiny.txt -text svneol=native#text/plain res/cardsfolder/day_of_judgment.txt -text svneol=native#text/plain +res/cardsfolder/day_of_the_dragons.txt -text svneol=native#text/plain res/cardsfolder/daze.txt -text svneol=native#text/plain res/cardsfolder/deadapult.txt -text svneol=native#text/plain res/cardsfolder/deadfall.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/day_of_the_dragons.txt b/res/cardsfolder/day_of_the_dragons.txt new file mode 100644 index 00000000000..96e4f195eeb --- /dev/null +++ b/res/cardsfolder/day_of_the_dragons.txt @@ -0,0 +1,7 @@ +Name:Day of the Dragons +ManaCost:4 U U U +Types:Enchantment +Text:When CARDNAME enters the battlefield, exile all creatures you control. Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield.\r\nWhen CARDNAME leaves the battlefield, sacrifice all Dragons you control. Then return the exiled cards to the battlefield under your control. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/day_of_the_dragons.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index c736ea6e6ca..27c5e58d776 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -8154,6 +8154,74 @@ public class CardFactory implements NewConstants { card.addSpellAbility(ability); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Day of the Dragons")) { + final CardList exiled = new CardList(); + final SpellAbility exileAll = new Ability(card, "0") { + @Override + public void resolve() { + CardList myCreatures = AllZoneUtil.getCreaturesInPlay(card.getController()); + for(Card c:myCreatures) { + exiled.add(c); + AllZone.GameAction.exile(c); + } + for(int i = 0; i < exiled.size(); i++) { + CardFactoryUtil.makeToken("Dragon", "R 5 5 Dragon", card.getController(), + "R", new String[] {"Creature", "Dragon"}, 5, 5, + new String[] {"Flying"}); + } + } + }; + + Command intoPlay = new Command() { + private static final long serialVersionUID = 7181675096954076868L; + + public void execute() { + + StringBuilder sb = new StringBuilder(); + sb.append(cardName).append(" - "); + sb.append("exile all creatures you control. "); + sb.append("Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield."); + exileAll.setStackDescription(sb.toString()); + + AllZone.Stack.add(exileAll); + } + }; + + final SpellAbility returnAll = new Ability(card, "0") { + @Override + public void resolve() { + CardList dragons = AllZoneUtil.getPlayerTypeInPlay(card.getController(), "Dragon"); + for(Card c:dragons) { + AllZone.GameAction.sacrifice(c); + } + for(Card c:exiled) { + AllZone.GameAction.moveToPlay(c); + } + exiled.clear(); + } + }; + + Command leavesPlay = new Command() { + private static final long serialVersionUID = -5553218901524553718L; + + public void execute() { + + StringBuilder sb = new StringBuilder(); + sb.append(cardName).append(" - "); + sb.append("sacrifice all Dragons you control. "); + sb.append("Then return the exiled cards to the battlefield under your control."); + returnAll.setStackDescription(sb.toString()); + + AllZone.Stack.add(returnAll); + } + }; + + card.addComesIntoPlayCommand(intoPlay); + card.addLeavesPlayCommand(leavesPlay); + }//*************** END ************ END ************************** + return postFactoryKeywords(card); }//getCard2