public boolean apply(Game game, Ability source) {
ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
Player player = game.getPlayer(source.getControllerId());
if(player != null){
int countMax = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game);
ChoiceImpl choiceCount = new ChoiceImpl(true);
LinkedHashSet<String> set = new LinkedHashSet<>();
for(int i = 0; i <= countMax; i++)
{
set.add(Integer.toString(i));
}
choiceCount.setChoices(set);
choiceCount.setMessage("Choose number of mana");
player.choose(Outcome.PutManaInPool, choiceCount, game);
int count = Integer.parseInt(choiceCount.getChoice());
if (choice.getColor().isBlack()) {
player.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0), game, source);
return true;
} else if (choice.getColor().isBlue()) {
player.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0), game, source);