A spell that has damage based off a variable?

In my game you can unlock "Dragon Stones" and I want your damage on a spell to increase as you collect them.

I use variables to keep track of how many Dragon Stones a player has.

If I wanted the spell to deal (a.atk*(Dragon Stone Variable)-b.def*(Dragon Stone Variable * 0.5))

How would I do that?
You can access variables with v[iD] inside of skill damage formulas. For what you're doing, it'd look like this:

(a.atk * v[ID]) - (b.def * v[ID] * 0.5)
The parentheses aren't even really necessary due to OoOp, but I tend towards using them just to clearly delineate between sections at a glance. Just replace ID with the number of the variable that contains the number of dragon stones, and you're good!
Thanks 😮

Original thread: https://forums.rpgmakerweb.com/threads/a-spell-that-has-damage-based-off-a-variable.40835/