Thanks for the question! You will need to know a bit of Scripting to achieve this. You will need to edit the Battle Start Actions and Turn Start Actions plugin parameters in IsiahCardGameCombat. Both of these plugin parameters take in a series of instructions that determines what Card Actions are taken at each of those times.
We can edit Battle Start Actions to be:
Shuffle Deck, Eval BattleManager.actor().drawCards(Math.floor(BattleManager.actor().agi * 0.1))
And edit Turn Start Actions to be:
Discard Until 0, Eval BattleManager.actor().drawCards(Math.floor(BattleManager.actor().agi * 0.1))
The Eval Card Action allows us to process a script call to determine how many cards we draw. Here's what each part of the Eval does:
BattleManager.actor() | This grabs the current Actor who is taking their turn. |
drawCards() | This is the function we call to tell the current Actor to draw Cards. |
Math.floor(BattleManager.actor().agi * 0.1) | This is the formula used to determine how many Cards are drawn. This divides the current Actor's Agility by 10 and then makes sure that value is floored to a whole number. |
You can supply your own formula in between those braces of the drawCards() function. Just make sure that resolves to a whole number as you can't draw a fractional number of Cards (it won't break anything but just make sure to be safe).
Let us know if you need help troubleshooting this solution for your game project. We would be happy to help :)