Small rework for autochoosing color of mana to add (#11495)

fix #11494
This commit is contained in:
xenohedron 2023-12-01 00:49:42 -05:00 committed by GitHub
parent b4a58a339d
commit 35f4a898f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 7 deletions

View file

@ -24,7 +24,6 @@ import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.choices.Choice;
import mage.choices.ChoiceColor;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.FilterCard;
@ -1956,7 +1955,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
// choose the correct color to pay a spell
if (outcome == Outcome.PutManaInPool && choice instanceof ChoiceColor && currentUnpaidMana != null) {
if (outcome == Outcome.PutManaInPool && choice.isManaColorChoice() && currentUnpaidMana != null) {
if (currentUnpaidMana.containsColor(ColoredManaSymbol.W) && choice.getChoices().contains("White")) {
choice.setChoice("White");
return true;