* Colorless Mana - Added logic to be able to pay colorless mana (not generic mana).

This commit is contained in:
LevelX2 2015-12-23 15:23:13 +01:00
parent aaa4857e43
commit e7b3cb66e0

View file

@ -224,7 +224,17 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> 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) {