Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Discarding random cards?

A topic by shoppingcartforb created Jan 20, 2026 Views: 162 Replies: 2
Viewing posts 1 to 2

Hi gang,
Loving this plugin and what I'm able to do with it so far but I'm running into a small issue. I'd like a very simple "Discard a random card from you hand, draw 1 card" card. But I cannot seem to figure out how to make that happen.

Developer

Hey shoppingcartforb,

You can achieve this using the Action Pack 2 plugin (currently available via our Patreon) which lets you include the Random modifier to Card Actions.

To make "Discard a random card from you hand, draw 1 card" with Action Pack 2, you might do something like this:

<Card Actions>
Discard Random 1
Draw 1
</Card Actions>

If you don't wish to use Action Pack 2, then something like this would work as well:

<Card Actions>
Eval var skWin = SceneManager._scene._skillWindow; skWin.discardCard(Math.floor(Math.random() * (BattleManager.actor().handSize) + skWin._itemsBeforeCards))
Draw 1
</Card Actions>

Hope that helps. Let us know if you need assistance with anything else.

Thanks,

MythAtelier Team

That worked beautifully. You are a champ. 

What if I wanted an enemy to have an ability that caused the player to randomly discard on a successful attack?