From 7ca430ad6992e06ad62a3e8fe517d22a29b95bd3 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 09:21:47 +0000 Subject: [PATCH] - Added the Flashback code to the end of the spMakeToken keyword. - Converted Call of the Herd to keyword. --- res/cardsfolder/call_of_the_herd.txt | 4 +++- src/forge/CardFactory.java | 15 +++++++++++++++ src/forge/CardFactory_Sorceries.java | 26 -------------------------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/res/cardsfolder/call_of_the_herd.txt b/res/cardsfolder/call_of_the_herd.txt index f12ea193580..b406e17bab9 100644 --- a/res/cardsfolder/call_of_the_herd.txt +++ b/res/cardsfolder/call_of_the_herd.txt @@ -1,7 +1,9 @@ Name:Call of the Herd ManaCost:2 G Types:Sorcery -Text:no text +Text:Put a 3/3 green Elephant creature token onto the battlefield. +K:spMakeToken<>1<>Elephant<>G 3 3 Elephant<>Controller<>G<>Creature;Elephant<>3<>3<>None +SVar:Flashback:3 G/0 SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/call_of_the_herd.jpg End diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index e55ac374ba4..0eac8c9477e 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -5702,6 +5702,21 @@ public class CardFactory implements NewConstants { }; card.clearSpellAbility(); card.addSpellAbility(spell); + + StringBuilder sb = new StringBuilder(); + sb.append(cardName).append(" - ").append(card.getSpellText()); + spell.setStackDescription(sb.toString()); + + String fb = card.getSVar("Flashback"); + if (!fb.equals("")) { + String fbCost[] = fb.split("/"); + + // fbCost[0] = Flashback mana cost + // fbCost[1] = Flashback life cost + + card.setFlashback(true); + card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, fbCost[0], fbCost[1])); + } }//end MakeToken if(hasKeyword(card, "abMakeToken") != -1) { diff --git a/src/forge/CardFactory_Sorceries.java b/src/forge/CardFactory_Sorceries.java index 6022d1db989..60d64d96a2d 100644 --- a/src/forge/CardFactory_Sorceries.java +++ b/src/forge/CardFactory_Sorceries.java @@ -2997,32 +2997,6 @@ public class CardFactory_Sorceries { }//*************** END ************ END ************************** - - //*************** START *********** START ************************** - else if(cardName.equals("Call of the Herd")) { - SpellAbility spell = new Spell(card) { - private static final long serialVersionUID = 1959302998030377554L; - - @Override - public void resolve() { - CardFactoryUtil.makeToken("Elephant", "G 3 3 Elephant", card, "G", new String[] { - "Creature", "Elephant"}, 3, 3, new String[] {""}); - }//resolve() - }; - - spell.setDescription("Put a 3/3 green Elephant creature token into play."); - spell.setStackDescription(card.getController() - + " puts a 3/3 green Elephant creature token into play."); - - card.setFlashback(true); - card.clearSpellAbility(); - card.addSpellAbility(spell); - card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, "3 G", "0")); - - }//*************** END ************ END ************************** - - - //*************** START *********** START ************************** else if(cardName.equals("Chatter of the Squirrel")) { SpellAbility spell = new Spell(card) {