@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
ChoiceColor choice = new ChoiceColor(false);
if (controller.choose(outcome, choice, game)) {
if (choice.getColor() == null) {
return false; // it happenes, don't know how
}
Mana createdMana = null;
if (choice.getColor().isBlack()) {
createdMana = Mana.BlackMana(amount);
} else if (choice.getColor().isBlue()) {
createdMana = Mana.BlueMana(amount);
} else if (choice.getColor().isRed()) {
createdMana = Mana.RedMana(amount);
} else if (choice.getColor().isGreen()) {
createdMana = Mana.GreenMana(amount);
} else if (choice.getColor().isWhite()) {
createdMana = Mana.WhiteMana(amount);
}
if (createdMana != null) {
controller.getManaPool().addMana(createdMana, game, source);
}