From 41a76502f914af95503ede22f608326541b52013 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 10:42:04 +0000 Subject: [PATCH] add Banshee (from The Dark). NOTE: There is a bit of a glitch before paying the X mana. You are prompted to pay a blank mana cost. Clicking on a mana-producer gets past this with no side-effects. Then, you can pay the X as expected, and the ability works as expected. --- .gitattributes | 1 + res/cardsfolder/banshee.txt | 9 ++++++ src/forge/CardFactory_Creatures.java | 42 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 res/cardsfolder/banshee.txt diff --git a/.gitattributes b/.gitattributes index 7523add5996..73fe78a2b41 100644 --- a/.gitattributes +++ b/.gitattributes @@ -360,6 +360,7 @@ res/cardsfolder/balshan_collaborator.txt -text svneol=native#text/plain res/cardsfolder/balshan_griffin.txt -text svneol=native#text/plain res/cardsfolder/baneslayer_angel.txt -text svneol=native#text/plain res/cardsfolder/banishing_knack.txt -text svneol=native#text/plain +res/cardsfolder/banshee.txt -text svneol=native#text/plain res/cardsfolder/bant_battlemage.txt -text svneol=native#text/plain res/cardsfolder/bant_panorama.txt -text svneol=native#text/plain res/cardsfolder/bant_sureblade.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/banshee.txt b/res/cardsfolder/banshee.txt new file mode 100644 index 00000000000..ac503e238d5 --- /dev/null +++ b/res/cardsfolder/banshee.txt @@ -0,0 +1,9 @@ +Name:Banshee +ManaCost:2 B B +Types:Creature Spirit +Text:no text +PT:0/1 +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/banshee.jpg +End diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 62a73825bfc..2b470c965b7 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -20747,6 +20747,48 @@ public class CardFactory_Creatures { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Banshee")) { + /* + * X, Tap: Banshee deals half X damage, rounded down, to target creature or + * player, and half X damage, rounded up, to you. + */ + + //Ability_Cost abCost = new Ability_Cost("X 0 T", cardName, true); + //Target tgt = new Target("TgtCP"); + + final Ability_Tap ability = new Ability_Tap(card, "X 0") { + //final Ability_Activated ability = new Ability_Activated(card, abCost, tgt) { + private static final long serialVersionUID = 2755743211116192949L; + + @Override + public void resolve() { + int x = card.getXManaCostPaid(); + if(getTargetPlayer() == null) { + getTargetCard().addDamage((int)Math.floor(x/2), card); + } + else { + getTargetPlayer().addDamage((int)Math.floor(x/2), card); + } + card.getController().addDamage((int)Math.ceil(x/2), card); + card.setXManaCostPaid(0); + }//resolve() + + @Override + public boolean canPlayAI() { + return false; + } + + };//SpellAbility + + ability.setIsXCost(true); + ability.setXManaCost("1"); + ability.setDescription("X, tap: "+"Banshee deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you."); + ability.setStackDescription(card.getName()+" - Banshee deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you."); + card.addSpellAbility(ability); + ability.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(ability, true, false)); + }//*************** END ************ END ************************** if(hasKeyword(card, "Level up") != -1 && hasKeyword(card, "maxLevel") != -1) {