From 8ff5320140c19e9e75aae4fc3a165f858af2f9ae Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 23:02:30 +0000 Subject: [PATCH] convert Great Whale and Cloud of Faeries to triggers --- res/cardsfolder/cloud_of_faeries.txt | 4 +- res/cardsfolder/great_whale.txt | 4 +- .../cardFactory/CardFactory_Creatures.java | 126 ------------------ 3 files changed, 6 insertions(+), 128 deletions(-) diff --git a/res/cardsfolder/cloud_of_faeries.txt b/res/cardsfolder/cloud_of_faeries.txt index aa10c95046f..9623655602e 100644 --- a/res/cardsfolder/cloud_of_faeries.txt +++ b/res/cardsfolder/cloud_of_faeries.txt @@ -1,10 +1,12 @@ Name:Cloud of Faeries ManaCost:1 U Types:Creature Faerie -Text:When CARDNAME enters the battlefield, untap up to two lands. +Text:no text PT:1/1 K:Flying K:Cycling:2 +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigUntap | TriggerDescription$ When CARDNAME enters the battlefield, untap up to two lands. +SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapUpTo$ True | UntapType$ Land | Amount$ 2 SVar:Rarity:Common SVar:Picture:http://resources.wizards.com/magic/cards/gu/en-us/card11588.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/29.jpg diff --git a/res/cardsfolder/great_whale.txt b/res/cardsfolder/great_whale.txt index cd8878e5f81..73414b64219 100644 --- a/res/cardsfolder/great_whale.txt +++ b/res/cardsfolder/great_whale.txt @@ -1,8 +1,10 @@ Name:Great Whale ManaCost:5 U U Types:Creature Whale -Text:When CARDNAME enters the battlefield, untap up to seven lands. +Text:no text PT:5/5 +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigUntap | TriggerDescription$ When CARDNAME enters the battlefield, untap up to seven lands. +SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapUpTo$ True | UntapType$ Land | Amount$ 7 SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/great_whale.jpg SetInfo:USG|Rare|http://magiccards.info/scans/en/us/77.jpg diff --git a/src/forge/card/cardFactory/CardFactory_Creatures.java b/src/forge/card/cardFactory/CardFactory_Creatures.java index d86bbc381dc..678487f371e 100644 --- a/src/forge/card/cardFactory/CardFactory_Creatures.java +++ b/src/forge/card/cardFactory/CardFactory_Creatures.java @@ -1133,69 +1133,6 @@ public class CardFactory_Creatures { }//*************** END ************ END ************************** - //*************** START *********** START ************************** - else if(cardName.equals("Great Whale")) { - final Input untap = new Input() { - private static final long serialVersionUID = -2167059018040912025L; - - int stop = 7; - int count = 0; - - @Override - public void showMessage() { - AllZone.Display.showMessage("Select a land to untap"); - ButtonUtil.enableOnlyCancel(); - } - - @Override - public void selectButtonCancel() { - stop(); - } - - @Override - public void selectCard(Card card, PlayerZone zone) { - if(card.isLand() && zone.is(Constant.Zone.Battlefield)) { - card.untap(); - count++; - if(count == stop) stop(); - } - }//selectCard() - }; - - final SpellAbility ability = new Ability(card, "0") { - @Override - public void resolve() { - if(card.getController().equals(AllZone.HumanPlayer)) AllZone.InputControl.setInput(untap); - else { - CardList list = new CardList(AllZone.Computer_Battlefield.getCards()); - list = list.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.isLand() && c.isTapped(); - } - }); - for(int i = 0; i < 7 && i < list.size(); i++) { - list.get(i).untap(); - } - }//else - }//resolve() - }; - - Command intoPlay = new Command() { - private static final long serialVersionUID = 7222997838266323277L; - - public void execute() { - StringBuilder sb = new StringBuilder(); - sb.append(card.getController()).append(" untaps up to 7 lands."); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.addSimultaneousStackEntry(ability); - - } - }; - card.addComesIntoPlayCommand(intoPlay); - }//*************** END ************ END *************************** - - //*************** START *********** START ************************** else if(cardName.equals("Palinchron")) { final Input untap = new Input() { @@ -1278,69 +1215,6 @@ public class CardFactory_Creatures { a1.setDescription("2 U U: Return Palinchron to its owner's hand."); }//*************** END ************ END *************************** - - //*************** START *********** START ************************** - else if(cardName.equals("Cloud of Faeries")) { - final Input untap = new Input() { - private static final long serialVersionUID = -2167059918040912025L; - - int stop = 2; - int count = 0; - - @Override - public void showMessage() { - AllZone.Display.showMessage("Select a land to untap"); - ButtonUtil.enableOnlyCancel(); - } - - @Override - public void selectButtonCancel() { - stop(); - } - - @Override - public void selectCard(Card card, PlayerZone zone) { - if(card.isLand() && zone.is(Constant.Zone.Battlefield)) { - card.untap(); - count++; - if(count == stop) stop(); - } - }//selectCard() - }; - - final SpellAbility ability = new Ability(card, "0") { - @Override - public void resolve() { - if(card.getController().equals(AllZone.HumanPlayer)) AllZone.InputControl.setInput(untap); - else { - CardList list = new CardList(AllZone.Computer_Battlefield.getCards()); - list = list.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.isLand() && c.isTapped(); - } - }); - for(int i = 0; i < 2 && i < list.size(); i++) { - list.get(i).untap(); - } - }//else - }//resolve() - };//SpellAbility - - Command intoPlay = new Command() { - private static final long serialVersionUID = 7222997838166323277L; - - public void execute() { - StringBuilder sb = new StringBuilder(); - sb.append(card.getController()).append(" untaps up to 2 lands."); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.addSimultaneousStackEntry(ability); - - } - }; - card.addComesIntoPlayCommand(intoPlay); - }//*************** END ************ END *************************** - //*************** START *********** START ************************** else if(cardName.equals("Whirlpool Rider")) {