From f12697d0ef855c6d99b4103a46faa4060bbda5ec Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 19:35:33 +0000 Subject: [PATCH] convert Twitch and Twiddle to AF. --- res/cardsfolder/twiddle.txt | 3 ++- res/cardsfolder/twitch.txt | 4 ++- src/forge/CardFactory_Instants.java | 40 ----------------------------- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/res/cardsfolder/twiddle.txt b/res/cardsfolder/twiddle.txt index 58da9e5d114..efadf634b42 100644 --- a/res/cardsfolder/twiddle.txt +++ b/res/cardsfolder/twiddle.txt @@ -1,7 +1,8 @@ Name:Twiddle ManaCost:U Types:Instant -Text:You may tap or untap target artifact, creature, or land. +Text:no text +A:SP$TapOrUntap | Cost$ U | ValidTgts$ Artifact,Creature,Land | TgtPrompt$ Select target artifact, creature, or land | SpellDescription$ You may tap or untap target artifact, creature, or land. SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/twiddle.jpg diff --git a/res/cardsfolder/twitch.txt b/res/cardsfolder/twitch.txt index a9c29adeae8..778557ec7da 100644 --- a/res/cardsfolder/twitch.txt +++ b/res/cardsfolder/twitch.txt @@ -1,7 +1,9 @@ Name:Twitch ManaCost:2 U Types:Instant -Text:You may tap or untap target artifact, creature, or land. Draw a card. +Text:no text +A:SP$TapOrUntap | Cost$ U | ValidTgts$ Artifact,Creature,Land | TgtPrompt$ Select target artifact, creature, or land | SubAbility$ SVar=DBDraw | SpellDescription$ You may tap or untap target artifact, creature, or land. +SVar:DBDraw:DB$Draw | Defined$ You | NumCards$ 1 | SpellDescription$ Draw a card. SVar:RemAIDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/twitch.jpg diff --git a/src/forge/CardFactory_Instants.java b/src/forge/CardFactory_Instants.java index c789df56ff7..5898b9eb1b6 100644 --- a/src/forge/CardFactory_Instants.java +++ b/src/forge/CardFactory_Instants.java @@ -1324,46 +1324,6 @@ public class CardFactory_Instants { spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell)); }//*************** END ************ END ************************** - - //*****************************START******************************* - else if(cardName.equals("Twiddle") || cardName.equals("Twitch")) { - /* - * You may tap or untap target artifact, creature, or land. - */ - String cost = cardName.equals("Twiddle") ? "U" : "2 U"; - Ability_Cost abCost = new Ability_Cost(cost, cardName, false); - Target t = new Target(card, "Select target artifact, creature, or land", "Artifact,Creature,Land".split(",")); - final SpellAbility spell = new Spell(card, abCost, t) { - private static final long serialVersionUID = 8126471702898625866L; - - public boolean canPlayAI() { - return false; - } - public void chooseTargetAI() { - //setTargetCard(c); - }//chooseTargetAI() - public void resolve() { - Card target = getTargetCard(); - if(AllZone.GameAction.isCardInPlay(target) && CardFactoryUtil.canTarget(card, target)) { - if(card.getController().isHuman()) { - String[] tapOrUntap = new String[] {"Tap", "Untap"}; - Object z = GuiUtils.getChoice("Tap or Untap?", tapOrUntap); - boolean tap = (z.equals("Tap")) ? true : false; - - if(tap) target.tap(); - else target.untap(); - } - - if (cardName.equals("Twitch")) - getActivatingPlayer().drawCard(); - } - } - };//SpellAbility - - card.clearSpellAbility(); - card.addSpellAbility(spell); - }//****************END*******END*********************** - //*************** START *********** START ************************** else if(cardName.equals("Storm Seeker") || cardName.equals("Sudden Impact")) {