Does Vassal support IF function?

Like IF the deck has 1 or less card, reshuffle discard pile back into deck

Say I have 10 decks of cards and I need to take 2 cards from each deck to make one new deck several times during the games. I made a button that does this but it only works when there are at least 2 cards in the deck. If there is 1 or less card left in some of the 10 decks, is there anyway vassal can reshuffle the discard pile back into deck after taking the 1 card and take another card to put into the new deck?