more paths require manapool

This commit is contained in:
Maxmtg
2014-02-08 11:33:17 +00:00
parent 1ec656f2ed
commit c5a791f361
4 changed files with 22 additions and 26 deletions

View File

@@ -107,10 +107,10 @@ public abstract class InputPayMana extends InputSyncronizedBase {
byte colorNeeded = 0;
for (final byte color : MagicColor.WUBRG) {
if (manaCost.isAnyPartPayableWith(color)) { colorCanUse |= color; }
if (manaCost.needsColor(color)) { colorNeeded |= color; }
if (manaCost.isAnyPartPayableWith(color, player.getManaPool())) { colorCanUse |= color; }
if (manaCost.needsColor(color, player.getManaPool())) { colorNeeded |= color; }
}
boolean canUseColorless = manaCost.isAnyPartPayableWith((byte)0);
boolean canUseColorless = manaCost.isAnyPartPayableWith((byte)0, player.getManaPool());
List<SpellAbility> abilities = new ArrayList<SpellAbility>();
// you can't remove unneeded abilities inside a for (am:abilities) loop :(

View File

@@ -52,7 +52,7 @@ public final class InputSelectCardsForConvoke extends InputSelectManyBase<Card>
byte chosenColor = player.getController().chooseColorAllowColorless("Convoke " + card.toString() + " for which color?", card, CardUtil.getColors(card));
if (remainingCost.getColorlessManaAmount() > 0 && (chosenColor == 0 || !remainingCost.needsColor(chosenColor))) {
if (remainingCost.getColorlessManaAmount() > 0 && (chosenColor == 0 || !remainingCost.needsColor(chosenColor, player.getManaPool()))) {
registerConvoked(card, ManaCostShard.COLORLESS, chosenColor);
} else {
for (ManaCostShard shard : remainingCost.getDistinctShards()) {