if (conditionalItem != null) {
if (conditionalItem.get(manaType) > 0) {
if (!item.getDuration().equals(Duration.EndOfTurn) || game.getPhase().getType().equals(TurnPhase.END)) {
if (game.replaceEvent(new GameEvent(GameEvent.EventType.EMPTY_MANA_POOL, playerId, null, playerId))) {
int amount = conditionalItem.get(manaType);
conditionalItem.clear(manaType);
conditionalItem.add(ManaType.COLORLESS, amount);
} else {
total += conditionalItem.get(manaType);
conditionalItem.clear(manaType);
}