You did not mention "Joker Poker Video Poker" at all.
I dont know if there is only 1 joker in poker, i suppose there is.
Just add the joker to a new animation. Now it needs its own chance calculation. Because it is not the same chance to occur as a regular card. I guess it is 1 on 53.
so ... after choosing the cards and if ... floor(random(0,54) = 0 then pick a random card and change its face to a joker.
Store the fact that there is a joker or not in a global variable. That will easy it up already some, later on.
Now the easy method would be a loop.
If there is a joker ..... loop all the 'checking' while iterating 'the card that has the face of the joker' to be every other card in the pack. Add the result for each check to a dictionary.
If there is a joker
__For all colors
___For all faces
______set joker card to card (color ... face)
______do the check
______store result in a dictionary
_do the check
_store result in a dictionary
Choose highest payout from dictionary holding the results. (i suppose you dont want to cheat on it)