Provide an individual function to augment auto-reshuffle?

Game development with Board Game Arena Studio
Post Reply
User avatar
Robo65
Posts: 105
Joined: 26 June 2019, 13:35

Provide an individual function to augment auto-reshuffle?

Post by Robo65 »

Hello,

there are card cames where you always need a card on the discard pile, because players need to play a fitting card (maumau, or 8 américain). In that game, the topmost card needs to stay on the discard pile when reshuffling.

Is there some featore in the Deck module that already does this? Because, if not, I need my own reshuffle-implementation (which would be something like this: store the id of the top card on discard pile, move all cards from discard to deck and move the stored id back. Then shuffle). And I'd like to register this implementation as "auto-reshuffle-callback" in the Deck object, so that picking just works automatically.

Is anything like this possible?
User avatar
tchobello
Posts: 694
Joined: 18 March 2012, 13:19

Re: Provide an individual function to augment auto-reshuffle?

Post by tchobello »

Hello

Does something like
-$topDiscard = ... getCardOnTop('discard')
-Shuffle('discard')
-playCard ($topDiscard)

do the trick ?
Post Reply

Return to “Developers”