diff --git a/Mage.Sets/src/mage/cards/b/BringToLight.java b/Mage.Sets/src/mage/cards/b/BringToLight.java index d3d91d2389..60809c48b0 100644 --- a/Mage.Sets/src/mage/cards/b/BringToLight.java +++ b/Mage.Sets/src/mage/cards/b/BringToLight.java @@ -1,5 +1,6 @@ package mage.cards.b; +import java.util.UUID; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; @@ -19,8 +20,6 @@ import mage.players.Player; import mage.target.common.TargetCardInLibrary; import org.apache.log4j.Logger; -import java.util.UUID; - /** * @author LevelX2 */ @@ -68,7 +67,8 @@ class BringToLightEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int numberColors = ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, this); - FilterCard filter = new FilterCard(); + FilterCard filter = new FilterCard("a creature, instant, or sorcery card with converted mana " + + "cost less than or equal to " + numberColors); filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.INSTANT.getPredicate(), CardType.SORCERY.getPredicate())); filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, numberColors + 1)); diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index dc9e6dfda9..334c698eed 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -1,5 +1,7 @@ package mage.players; +import java.io.Serializable; +import java.util.*; import mage.ConditionalMana; import mage.Mana; import mage.abilities.Ability; @@ -15,9 +17,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.events.ManaEvent; import mage.game.stack.Spell; -import java.io.Serializable; -import java.util.*; - /** * @author BetaSteward_at_googlemail.com */ @@ -83,7 +82,8 @@ public class ManaPool implements Serializable { * @param ability * @param filter * @param game - * @param costToPay complete costs to pay (needed to check conditional mana) + * @param costToPay complete costs to pay (needed to check conditional + * mana) * @param usedManaToPay the information about what mana was paid * @return */ @@ -144,7 +144,7 @@ public class ManaPool implements Serializable { GameEvent event = new GameEvent(GameEvent.EventType.MANA_PAID, ability.getId(), mana.getSourceId(), ability.getControllerId(), 0, mana.getFlag()); event.setData(mana.getOriginalId().toString()); game.fireEvent(event); - usedManaToPay.increase(mana.getFirstAvailable()); + usedManaToPay.increase(usableManaType); mana.remove(usableManaType); if (mana.count() == 0) { // so no items with count 0 stay in list manaItems.remove(mana); @@ -301,7 +301,7 @@ public class ManaPool implements Serializable { if (mana instanceof ConditionalMana) { ManaPoolItem item = new ManaPoolItem((ConditionalMana) mana, source.getSourceObject(game), ((ConditionalMana) mana).getManaProducerOriginalId() != null - ? ((ConditionalMana) mana).getManaProducerOriginalId() : source.getOriginalId()); + ? ((ConditionalMana) mana).getManaProducerOriginalId() : source.getOriginalId()); if (emptyOnTurnsEnd) { item.setDuration(Duration.EndOfTurn); }