def reshuffle(group = me.piles['Discard Pile']): # This function reshuffles the player's discard pile into their deck. mute() Deck = me.Deck # Just to save us some repetition for card in group: card.moveTo(Deck) # Move the player's cards from the discard to their deck one-by-one. random = rnd(100, 10000) # Bug 105 workaround. This delays the next action until all animation is done. # see https://octgn.16bugs.com/projects/3602/bugs/102681 Deck.shuffle() # Then use the built-in shuffle action notify("{} reshuffled their {} into their Deck.".format(me, group.name)) # And inform everyone.