From cbed7adb97fd06195320f12083fb9469644446d5 Mon Sep 17 00:00:00 2001 From: moomarc Date: Wed, 15 Feb 2012 09:31:59 +0000 Subject: [PATCH] Added support for Count$ManaPool:Any Added Glissa Sunseeker --- .gitattributes | 1 + res/cardsfolder/g/glissa_sunseeker.txt | 16 ++++++++++++++++ .../forge/card/cardfactory/CardFactoryUtil.java | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 res/cardsfolder/g/glissa_sunseeker.txt diff --git a/.gitattributes b/.gitattributes index 696da8abe01..c050590bcba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3476,6 +3476,7 @@ res/cardsfolder/g/glint_eye_nephilim.txt svneol=native#text/plain res/cardsfolder/g/glint_hawk.txt -text res/cardsfolder/g/glint_hawk_idol.txt svneol=native#text/plain res/cardsfolder/g/glintwing_invoker.txt svneol=native#text/plain +res/cardsfolder/g/glissa_sunseeker.txt -text res/cardsfolder/g/glissa_the_traitor.txt svneol=native#text/plain res/cardsfolder/g/glissas_courier.txt svneol=native#text/plain res/cardsfolder/g/glissas_scorn.txt svneol=native#text/plain diff --git a/res/cardsfolder/g/glissa_sunseeker.txt b/res/cardsfolder/g/glissa_sunseeker.txt new file mode 100644 index 00000000000..8bd9f5e7003 --- /dev/null +++ b/res/cardsfolder/g/glissa_sunseeker.txt @@ -0,0 +1,16 @@ +Name:Glissa Sunseeker +ManaCost:2 G G +Types:Legendary Creature Elf +Text:no text +PT:3/2 +K:First Strike +A:AB$ Destroy | Cost$ T | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | ConditionCheckSVar$ Y | ConditionSVarCompare$ EQX | SpellDescription$ Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool. +SVar:X:Count$ManaPool:All +SVar:Y:Targeted$CardManaCost +#AI doesn't have a mana pool +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/glissa_sunseeker.jpg +SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/120.jpg +Oracle:First strike\n{T}: Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool. +End \ No newline at end of file diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index 3c2d7c1315e..6cd41ef9a5d 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -2720,7 +2720,16 @@ public class CardFactoryUtil { // Manapool if (l[0].contains("ManaPool")) { final String color = l[0].split(":")[1]; + if (color.equals("All")) { + return (AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.WHITE) + + AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.BLUE) + + AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.BLACK) + + AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.RED) + + AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.GREEN) + + AllZone.getHumanPlayer().getManaPool().getAmountOfColor(Constant.Color.COLORLESS)); + } else { return AllZone.getHumanPlayer().getManaPool().getAmountOfColor(color); + } } // count valid cards on the battlefield