Merge branch 'manaEffect' into 'master'

ExpressPay different ComboMana if possible

See merge request core-developers/forge!3893
This commit is contained in:
Michael Kamensky
2021-02-20 04:22:03 +00:00
4 changed files with 24 additions and 14 deletions

View File

@@ -72,14 +72,16 @@ public class ManaEffect extends SpellAbilityEffect {
choice = colorsProduced[differentChoice ? nMana : 0];
} else {
byte chosenColor = p.getController().chooseColor(Localizer.getInstance().getMessage("lblSelectManaProduce"), sa,
differentChoice ? fullOptions : colorOptions);
differentChoice && (colorsNeeded == null || colorsNeeded.length <= nMana) ? fullOptions : colorOptions);
if (chosenColor == 0)
throw new RuntimeException("ManaEffect::resolve() /*combo mana*/ - " + p + " color mana choice is empty for " + card.getName());
fullOptions = ColorSet.fromMask(fullOptions.getMyColor() - chosenColor);
if (differentChoice) {
fullOptions = ColorSet.fromMask(fullOptions.getColor() - chosenColor);
}
choice = MagicColor.toShortString(chosenColor);
}
if (nMana > 0) {
choiceString.append(" ");
}