From 43862a4b7b483eef7fc805f0ec1cc00fc2672932 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 8 Oct 2017 10:55:19 +0000 Subject: [PATCH] - Better check for Sunburst. --- .../main/java/forge/game/card/CardFactoryUtil.java | 11 +++++++---- forge-gui/res/cardsfolder/c/clearwater_goblet.txt | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 75532a7e975..5f10fd1ce35 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1401,14 +1401,17 @@ public class CardFactoryUtil { return doXMath(n, m, c); } if (sq[0].startsWith("UniqueManaColorsProduced")) { + boolean untappedOnly = sq[0].contains("ByUntappedSources"); int uniqueColors = 0; CardCollectionView otb = cc.getCardsIn(ZoneType.Battlefield); outer: for (byte color : MagicColor.WUBRG) { for (Card card : otb) { - for (SpellAbility ma : card.getManaAbilities()) { - if (ma.getManaPart().canProduce(MagicColor.toShortString(color))) { - uniqueColors++; - continue outer; + if (!card.isTapped() || !untappedOnly) { + for (SpellAbility ma : card.getManaAbilities()) { + if (ma.getManaPart().canProduce(MagicColor.toShortString(color))) { + uniqueColors++; + continue outer; + } } } } diff --git a/forge-gui/res/cardsfolder/c/clearwater_goblet.txt b/forge-gui/res/cardsfolder/c/clearwater_goblet.txt index 2110c3fd834..90d717349a3 100644 --- a/forge-gui/res/cardsfolder/c/clearwater_goblet.txt +++ b/forge-gui/res/cardsfolder/c/clearwater_goblet.txt @@ -6,6 +6,6 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | O SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X SVar:X:Count$CardCounters.CHARGE SVar:NeedsToPlayVar:Z GE2 -SVar:Z:Count$UniqueManaColorsProduced +SVar:Z:Count$UniqueManaColorsProduced.ByUntappedSources SVar:Picture:http://www.wizards.com/global/images/magic/general/clearwater_goblet.jpg Oracle:Sunburst (This enters the battlefield with a charge counter on it for each color of mana spent to cast it.)\nAt the beginning of your upkeep, you may gain life equal to the number of charge counters on Clearwater Goblet.