Custom DOT state that gets stronger with stacks?

I'm trying to make sort of a Bleed state that deals damage every turn, but it gets weaker with each turn counter it's lasting for.

Basically, enemy is applied with bleed that lasts 5 turns, so bleed does x*5 damage the first turn then ticks down it's counter, doing x*4 damage next turn and so on.

I tried doing this on my own, but knowing nothing about Javascript, I can't even get the damage going.

Code:
<Custom DoT Formula>

value = a.atk + 10*target.getStateCounter(11)

</Custom DoT Formula>

This just does 0 damage. What am I doing wrong?

I'm using Yanfly's Buffs & States Core, by the way.
it gets stronger with each turn
lasts 5 turns, so bleed does x*5 damage the first turn then ticks down it's counter, doing x*4 damage next turn and so on

That would be getting weaker with each turn, not stronger.
My bad, didn't pay attention; fixed
The getStateCounter function is for the "counter" feature added by Buffs & States Core; if you just want it based on the turns remaining you shouldn't need to use that. Maybe try this instead:
Code:
<Custom DoT Formula>
value = a.atk + 10 * target._stateTurns[11];
</Custom DoT Formula>
(Also, for posterity, a link to the relevant plugin: Extended Damage Over Time by Yanfly.)
Yes, that's exactly what I needed! I'm still learning all these functions so I can start doing this on my own, thanks for the help.
And yeah I forgot to mention that plugin too, whoops.

Original thread: https://forums.rpgmakerweb.com/threads/custom-dot-state-that-gets-stronger-with-stacks.94087/