From 9797f4d23bd2ce12e11e8363db794350bb222a88 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 27 Sep 2017 21:19:04 -0400 Subject: [PATCH] fixed Mana Web not taking colorless mana into account --- Mage.Sets/src/mage/cards/m/ManaWeb.java | 4 ++-- Mage/src/main/java/mage/Mana.java | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/ManaWeb.java b/Mage.Sets/src/mage/cards/m/ManaWeb.java index af4cc8d209..094c86bbba 100644 --- a/Mage.Sets/src/mage/cards/m/ManaWeb.java +++ b/Mage.Sets/src/mage/cards/m/ManaWeb.java @@ -52,7 +52,7 @@ import mage.target.targetpointer.FixedTarget; public class ManaWeb extends CardImpl { public ManaWeb(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a land an opponent controls is tapped for mana, tap all lands that player controls that could produce any type of mana that land could produce. this.addAbility(new ManaWebTriggeredAbility()); @@ -155,7 +155,7 @@ class ManaWebeffect extends OneShotEffect { } } - if (mana.containsAny(opponentLandMana)) { + if (mana.containsAny(opponentLandMana, true)) { tappedLands = opponentPermanent.tap(game) || tappedLands; } } diff --git a/Mage/src/main/java/mage/Mana.java b/Mage/src/main/java/mage/Mana.java index 3eae16609c..9c8e54dd50 100644 --- a/Mage/src/main/java/mage/Mana.java +++ b/Mage/src/main/java/mage/Mana.java @@ -846,15 +846,20 @@ public class Mana implements Comparable, Serializable, Copyable { return false; } + public boolean containsAny(final Mana mana) { + return containsAny(mana, false); + } + /** * Returns if this objects mana contains any coloured mana the same as the * passed in {@link Mana}'s mana. * * @param mana the mana to check for + * @param includeColorless also check for colorless * @return true if this contains any of the same type of coloured mana that * this has */ - public boolean containsAny(final Mana mana) { + public boolean containsAny(final Mana mana, boolean includeColorless) { if (mana.black > 0 && this.black > 0) { return true; } else if (mana.blue > 0 && this.blue > 0) { @@ -865,6 +870,8 @@ public class Mana implements Comparable, Serializable, Copyable { return true; } else if (mana.green > 0 && this.green > 0) { return true; + } else if (mana.colorless > 0 && this.colorless > 0 && includeColorless) { + return true; } return false;