Bga-cards: pass a per-call fromStock to placeCard()

Game development with Board Game Arena Studio
Post Reply
User avatar
Olivier000
Posts: 1
Joined: 07 November 2020, 19:00

Bga-cards: pass a per-call fromStock to placeCard()

Post by Olivier000 »

Hi,

I’m using bga-cards and I’ve defined an autoPlace function on all my stocks, so I’d like to use CardManager.placeCard() to move cards.

My problem: the source of a card isn’t always known from the card itself (e.g. a hidden deck or another player’s hand), so I need to pass a fromStock to get a proper animation. AutoPlaceSettings.addSettings can hold a fromStock, but it’s statically defined in CardManagerSettings, so I can’t change it per call.

Would it be possible to:
- add an optional parameter to placeCard (e.g. placeCard(card, addSettings?)) that is merged with the autoPlace addSettings, or
- expose a function such as getPlaceCardTargetStock(card) that returns the destination stock, so I can call addCard(card, { fromStock }) myself, or at least make the stock list accessible?

Thanks!
Post Reply

Return to “Developers”