258259260261262263264265266267268
ConditionalMana c = item.getConditionalMana(); if (c.apply(ability, game, c.getManaProducerId())) { int count = c.count(filter); if (count > 0) { total += count; c.removeAll(filter); if (c.count() == 0) { it.remove(); } } }