diff --git a/res/cardsfolder/a/austere_command.txt b/res/cardsfolder/a/austere_command.txt index 56a0cb1bb9b..664c155fabd 100644 --- a/res/cardsfolder/a/austere_command.txt +++ b/res/cardsfolder/a/austere_command.txt @@ -1,7 +1,12 @@ Name:Austere Command ManaCost:4 W W Types:Sorcery -Text:Choose two - Destroy all artifacts; or destroy all enchantments; or destroy all creatures with converted mana cost 3 or less; or destroy all creatures with converted mana cost 4 or greater. +Text:no text +A:SP$ Charm | Cost$ 4 W W | Choices$ DestroyArtifacts,DestroyEnchs,DestroyLE3,DestroyGE4 | CharmNum$ 2 | SpellDescription$ Choose two - Destroy all artifacts; or destroy all enchantments; or destroy all creatures with converted mana cost 3 or less; or destroy all creatures with converted mana cost 4 or greater. +SVar:DestroyArtifacts:DB$ DestroyAll | ValidCards$ Artifact | SpellDescription$ Destroy all artifacts. +SVar:DestroyEnchs:DB$ DestroyAll | ValidCards$ Enchantment | SpellDescription$ Destroy all enchantments. +SVar:DestroyLE3:DB$ DestroyAll | ValidCards$ Creature.cmcLE3 | SpellDescription$ Destroy all creatures with converted mana cost 3 or less. +SVar:DestroyGE4:DB$ DestroyAll | ValidCards$ Creature.cmcGE4 | SpellDescription$ Destroy all creatures with converted mana cost 4 or greater. SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/austere_command.jpg diff --git a/src/main/java/forge/card/cardFactory/CardFactory_Sorceries.java b/src/main/java/forge/card/cardFactory/CardFactory_Sorceries.java index 23ff0b5e7c6..61b511734bc 100644 --- a/src/main/java/forge/card/cardFactory/CardFactory_Sorceries.java +++ b/src/main/java/forge/card/cardFactory/CardFactory_Sorceries.java @@ -12,7 +12,6 @@ import forge.Constant.Zone; import javax.swing.*; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.Map.Entry; import java.util.Vector; @@ -2397,127 +2396,6 @@ public class CardFactory_Sorceries { }//*************** END ************ END ************************** - //*************** START *********** START ************************** - else if (cardName.equals("Austere Command")) { - final ArrayList userChoice = new ArrayList(); - - final String[] cardChoices = { - "Destroy all artifacts", - "Destroy all enchantments", - "Destroy all creatures with converted mana cost 3 or less", - "Destroy all creatures with converted mana cost 4 or more" - }; - - final SpellAbility spell = new Spell(card) { - private static final long serialVersionUID = -8501457363981482513L; - - @Override - public void resolve() { - - //"Destroy all artifacts", - if (userChoice.contains(cardChoices[0])) { - CardList cards = AllZoneUtil.getCardsIn(Zone.Battlefield).filter(CardListFilter.artifacts); - for (Card c : cards) AllZone.getGameAction().destroy(c); - } - - //"Destroy all enchantments", - if (userChoice.contains(cardChoices[1])) { - CardList cards = AllZoneUtil.getCardsIn(Zone.Battlefield).filter(CardListFilter.enchantments); - for (Card c : cards) AllZone.getGameAction().destroy(c); - } - - //"Destroy all creatures with converted mana cost 3 or less", - if (userChoice.contains(cardChoices[2])) { - CardList cards = AllZoneUtil.getCreaturesInPlay(); - cards = cards.filter(new CardListFilter() { - public boolean addCard(Card c) { - return CardUtil.getConvertedManaCost(c) <= 3; - } - }); - for (Card c : cards) AllZone.getGameAction().destroy(c); - } - - //"Destroy all creatures with converted mana cost 4 or more"}; - if (userChoice.contains(cardChoices[3])) { - CardList cards = AllZoneUtil.getCreaturesInPlay(); - cards = cards.filter(new CardListFilter() { - public boolean addCard(Card c) { - return CardUtil.getConvertedManaCost(c) >= 4; - } - }); - for (Card c : cards) AllZone.getGameAction().destroy(c); - } - }//resolve() - - @Override - public boolean canPlayAI() { - return false; - } - };//SpellAbility - - final Command setStackDescription = new Command() { - private static final long serialVersionUID = -635710110379729475L; - - public void execute() { - ArrayList a = new ArrayList(); - if (userChoice.contains(cardChoices[0])) a.add("destroy all artifacts"); - if (userChoice.contains(cardChoices[1])) a.add("destroy all enchantments"); - if (userChoice.contains(cardChoices[2])) a.add("destroy all creatures with CMC <= 3"); - if (userChoice.contains(cardChoices[3])) a.add("destroy all creatures with CMC >= 4"); - - String s = a.get(0) + ", " + a.get(1); - spell.setStackDescription(card.getName() + " - " + s); - } - };//Command - - Input chooseTwoInput = new Input() { - private static final long serialVersionUID = 2352497236500922820L; - - @Override - public void showMessage() { - if (card.isCopiedSpell()) { - setStackDescription.execute(); - stopSetNext(new Input_PayManaCost(spell)); - } else { - //reset variables - userChoice.clear(); - - ArrayList display = new ArrayList(Arrays.asList(cardChoices)); - - ArrayList a = chooseTwo(display); - //everything stops here if user cancelled - if (a == null) { - stop(); - return; - } - - userChoice.addAll(a); - - setStackDescription.execute(); - stopSetNext(new Input_PayManaCost(spell)); - } - }//showMessage() - - ArrayList chooseTwo(ArrayList choices) { - ArrayList out = new ArrayList(); - Object o = GuiUtils.getChoiceOptional("Choose Two", choices.toArray()); - if (o == null) return null; - - out.add((String) o); - choices.remove(out.get(0)); - o = GuiUtils.getChoiceOptional("Choose Two", choices.toArray()); - if (o == null) return null; - - out.add((String) o); - - return out; - }//chooseTwo() - };//Input chooseTwoInput - card.addSpellAbility(spell); - spell.setBeforePayMana(chooseTwoInput); - }//*************** END ************ END ************************** - - //*************** START *********** START ************************** else if (cardName.equals("Praetor's Counsel")) { final SpellAbility spell = new Spell(card) {