From 2ccb64efa3efd5e63d82d2e14f656abea5945fe4 Mon Sep 17 00:00:00 2001 From: swordshine Date: Wed, 17 Apr 2013 13:09:41 +0000 Subject: [PATCH] - Added Whipgrass Entangler (the last one for Legions set) --- .gitattributes | 1 + res/cardsfolder/w/whipgrass_entangler.txt | 12 ++++++++++++ .../staticability/StaticAbilityCantAttackBlock.java | 4 ++++ 3 files changed, 17 insertions(+) create mode 100644 res/cardsfolder/w/whipgrass_entangler.txt diff --git a/.gitattributes b/.gitattributes index df3295e498d..2bcd427163b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12150,6 +12150,7 @@ res/cardsfolder/w/whip_spine_drake.txt svneol=native#text/plain res/cardsfolder/w/whip_vine.txt svneol=native#text/plain res/cardsfolder/w/whipcorder.txt svneol=native#text/plain res/cardsfolder/w/whipflare.txt svneol=native#text/plain +res/cardsfolder/w/whipgrass_entangler.txt -text res/cardsfolder/w/whipkeeper.txt -text res/cardsfolder/w/whiplash_trap.txt svneol=native#text/plain res/cardsfolder/w/whipstitched_zombie.txt svneol=native#text/plain diff --git a/res/cardsfolder/w/whipgrass_entangler.txt b/res/cardsfolder/w/whipgrass_entangler.txt new file mode 100644 index 00000000000..bb648356dfb --- /dev/null +++ b/res/cardsfolder/w/whipgrass_entangler.txt @@ -0,0 +1,12 @@ +Name:Whipgrass Entangler +ManaCost:2 W +Types:Creature Human Cleric +PT:1/3 +A:AB$ Animate | Cost$ 1 W | ValidTgts$ Creature | staticAbilities$ WhipgrassCantAttack,WhipgrassCantBlock | sVars$ WhipgrassClericNum | SpellDescription$ Until end of turn, target creature gains "This creature can't attack or block unless its controller pays 1 for each Cleric on the battlefield." +SVar:WhipgrassCantAttack:Mode$ CantAttackUnless | ValidCard$ Card.Self | Cost$ WhipgrassClericNum | References$ WhipgrassClericNum | Description$ CARDNAME can't attack or block unless you pay 1 for each Cleric on the battlefield. +SVar:WhipgrassCantBlock:Mode$ CantBlockUnless | ValidCard$ Card.Self | Cost$ WhipgrassClericNum | References$ WhipgrassClericNum +SVar:WhipgrassClericNum:Count$Valid Cleric +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/whipgrass_entangler.jpg +Oracle:{1}{W}: Until end of turn, target creature gains "This creature can't attack or block unless its controller pays {1} for each Cleric on the battlefield." +SetInfo:LGN Common \ No newline at end of file diff --git a/src/main/java/forge/card/staticability/StaticAbilityCantAttackBlock.java b/src/main/java/forge/card/staticability/StaticAbilityCantAttackBlock.java index 13608b0a353..23fa6de1fda 100644 --- a/src/main/java/forge/card/staticability/StaticAbilityCantAttackBlock.java +++ b/src/main/java/forge/card/staticability/StaticAbilityCantAttackBlock.java @@ -82,6 +82,8 @@ public class StaticAbilityCantAttackBlock { costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar("X"))); } else if ("Y".equals(costString)) { costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar("Y"))); + } else if (params.containsKey("References")) { + costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar(params.get("References")))); } final Cost cost = new Cost(costString, true); @@ -116,6 +118,8 @@ public class StaticAbilityCantAttackBlock { costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar("X"))); } else if ("Y".equals(costString)) { costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar("Y"))); + } else if (params.containsKey("References")) { + costString = Integer.toString(CardFactoryUtil.xCount(hostCard, hostCard.getSVar(params.get("References")))); } final Cost cost = new Cost(costString, true);