1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-13 01:01:11 -09:00

fixed Mana Web not taking colorless mana into account

This commit is contained in:
Evan Kranzler 2017-09-27 21:19:04 -04:00
parent dbb185c47a
commit 9797f4d23b
2 changed files with 10 additions and 3 deletions
Mage.Sets/src/mage/cards/m
Mage/src/main/java/mage

View file

@ -155,7 +155,7 @@ class ManaWebeffect extends OneShotEffect {
}
}
if (mana.containsAny(opponentLandMana)) {
if (mana.containsAny(opponentLandMana, true)) {
tappedLands = opponentPermanent.tap(game) || tappedLands;
}
}

View file

@ -846,15 +846,20 @@ public class Mana implements Comparable<Mana>, Serializable, Copyable<Mana> {
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<Mana>, Serializable, Copyable<Mana> {
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;