Call on number of states affecting target?

Hello! I'm trying to make a skill that does more damage with the more states are currently affecting a target.
I don't mean if the target is affected by a specific state, just want to call the number of states currently applied.

I've tried for example
a.mat * b.states.size

But this doesn't work.
Thanks!
Hello! I'm trying to make a skill that does more damage with the more states are currently affecting a target.
I don't mean if the target is affected by a specific state, just want to call the number of states currently applied.

I've tried for example
a.mat * b.states.size

But this doesn't work.
Thanks!
try "states().length" (instead of "states.size")
JavaScript:
$gameActors.actor(1).states().length;
// returns the Amount of States Affected on Actor ID 1

"$gameActors.actor(1)." can be replaced with any other valid Character.. (for example " $gameParty.leader(). " ect)
Also in some Cases with "a." or "b."..
(in most Cases "a. = user" & "b. = target" ... and i think this counts as Character in SkillDMGFormulas for Example.. also in other Yep Stuff)
try "states().length" (not size)
JavaScript:
$gameActors.actor(1).states().length;
// returns the Amount of States Affected on Actor ID 1

$gameActors.actor(1) can be replaced with any other valid Character.. (for example " $gameParty.leader() " ect)
Also in some Cases with "a." ..
(in most Cases "a. = user" & "b. = target" ... and i think this counts as Character in SkillDMGFormulas for Example.. also in other Yep Stuff)

b.states().length worked perfectly, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/call-on-number-of-states-affecting-target.129300/