From e7b3cb66e05f6101118e7f56f8e2387e0c797e11 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 23 Dec 2015 15:23:13 +0100 Subject: [PATCH] * Colorless Mana - Added logic to be able to pay colorless mana (not generic mana). --- .../mage/abilities/costs/mana/ManaCostsImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index b3c987cf3a..579c0b4bd9 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -224,7 +224,17 @@ public class ManaCostsImpl extends ArrayList implements M // if auto payment is inactive and no mana type was clicked manually - do nothing return; } - + // attempt to pay colorless costs (not generic) mana costs first + if (pool.getColorless() > 0) { + for (ManaCost cost : this) { + if (!cost.isPaid() && cost instanceof ColorlessManaCost) { + cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } + } + } + } //attempt to pay colored costs first for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof ColoredManaCost) {