From 21f04fc25db945eaba3aa7ece02917be17f5d402 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 24 May 2013 12:49:54 +0000 Subject: [PATCH] - Added Gauntlet of Power. --- .gitattributes | 1 + res/cardsfolder/g/gauntlet_of_power.txt | 11 +++++++++++ .../forge/card/trigger/TriggerTapsForMana.java | 17 +++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 res/cardsfolder/g/gauntlet_of_power.txt diff --git a/.gitattributes b/.gitattributes index f317f510e2d..53343d738c2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4108,6 +4108,7 @@ res/cardsfolder/g/gather_the_townsfolk.txt -text res/cardsfolder/g/gatherer_of_graces.txt svneol=native#text/plain res/cardsfolder/g/gatstaf_shepherd_gatstaf_howler.txt -text res/cardsfolder/g/gauntlet_of_might.txt svneol=native#text/plain +res/cardsfolder/g/gauntlet_of_power.txt -text res/cardsfolder/g/gavony.txt -text res/cardsfolder/g/gavony_ironwright.txt -text res/cardsfolder/g/gavony_township.txt -text diff --git a/res/cardsfolder/g/gauntlet_of_power.txt b/res/cardsfolder/g/gauntlet_of_power.txt new file mode 100644 index 00000000000..05b03362c4e --- /dev/null +++ b/res/cardsfolder/g/gauntlet_of_power.txt @@ -0,0 +1,11 @@ +Name:Gauntlet of Power +ManaCost:5 +Types:Artifact +K:ETBReplacement:Other:ChooseColor +SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInComputerDeck | SpellDescription$ As CARDNAME enters the battlefield, choose a color. +S:Mode$ Continuous | Affected$ Creature.ChosenColor | AddPower$ 1 | AddToughness$ 1 | Description$ Creatures of the chosen color get +1/+1. +T:Mode$ TapsForMana | ValidCard$ Land.Basic | Produced$ ChosenColor | Execute$ TrigMana | TriggerZones$ Battlefield | Static$ True | TriggerDescription$ Whenever a basic land is tapped for mana of the chosen color, its controller adds one mana of that color to his or her mana pool (in addition to the mana the land produces). +SVar:TrigMana:AB$ Mana | Cost$ 0 | Produced$ Chosen | Amount$ 1 | Defined$ TriggeredPlayer +SVar:Picture:http://www.wizards.com/global/images/magic/general/gauntlet_of_power.jpg +Oracle:As Gauntlet of Power enters the battlefield, choose a color.\nCreatures of the chosen color get +1/+1.\nWhenever a basic land is tapped for mana of the chosen color, its controller adds one mana of that color to his or her mana pool . (in addition to the mana the land produces) +SetInfo:TSP Rare \ No newline at end of file diff --git a/src/main/java/forge/card/trigger/TriggerTapsForMana.java b/src/main/java/forge/card/trigger/TriggerTapsForMana.java index a12af20dde6..1e1a7998166 100644 --- a/src/main/java/forge/card/trigger/TriggerTapsForMana.java +++ b/src/main/java/forge/card/trigger/TriggerTapsForMana.java @@ -17,7 +17,10 @@ */ package forge.card.trigger; +import java.util.List; + import forge.Card; +import forge.card.MagicColor; import forge.card.spellability.SpellAbility; /** @@ -58,6 +61,20 @@ public class TriggerTapsForMana extends Trigger { } } + if (this.mapParams.containsKey("Produced")) { + Object prod = runParams2.get("Produced"); + if (prod == null || !(prod instanceof String)) { + return false; + } + String produced = (String) prod; + if ("ChosenColor".equals(mapParams.get("Produced"))) { + List colors = this.getHostCard().getChosenColor(); + if (colors.isEmpty() || !produced.contains(MagicColor.toShortString(colors.get(0)))) { + return false; + } + } + } + return true; }