       useRandomly = !RandUtil.getRandomInt(0, 3)
       return hasAlchemyCard or useRandomly
 
+   replaceSetIdInCardId = (cardId, setId) ->
+       return setId + '_' + cardId.split('_')[1]
+
 
    window.Randomizer = {
       createKingdom: createKingdom

            useShelters: shouldUseSpecialtyCardFromSet(DARK_AGES_SET_ID, setsToUse)
         }
      }

   adjustKingdomForAlchemyCards = (kingdom, cardsToUse, requiredCardIds, excludeCardIds) ->      
      alchemyCards = kingdom.cards.filter(filterByIncludedSetIds([ALCHEMY_SET_ID]))

      cardsToUse = cardsToUse.filter(filterByExcludedTypes(excludeTypes))
      cardsToUse = cardsToUse.filter(filterByAllowedTypes(allowedTypes))
      cardsToUse = cardsToUse.filter(filterByAllowedCost(allowedCosts))
      cardsToUse = removeDuplicateCards(cardsToUse)

      eventsToUse = flattenSetsForProperty(setsToUse, 'events')
      eventsToUse = eventsToUse.filter(filterByExcludedIds(includeEventIds))
