MV Using YanflyBuffsStatesCore's StateCounter feature...

I'm having difficulty getting a skill to function the way that I would like it to...

Skill A - Applies a stacking state with a statecounter max of 3 stacks.

Skill B - Does damage and ONLY removes the state if the statecounter is at 3 stacks, in which case it deals additional damage.

I managed to get Skill A to apply the state and for the statecounter to max out at 3 stacks... but I cannot figure out how to make Skill B to function how I want it to... (Just tried to make it function before adding the extra damage part)

Thanks in advance... I'm lost!
Try another "=" in your after eval's if statement.

-EDIT- @FrozenFacade
So to follow up, a single = is called an assignment operator.

You're telling the system that whatever is referenced on the left side of the "=", is equal to whatever is on the right side of the "=".

So if you say:
var x = 3;
And then log x to the console:
console.log(x);

You will get "3" because the variable x was assigned the value of the integer 3.

If you want to compare two values, you'd need to use the "Equality Operator" which is ==.

Also note the Strict Equality Operator,
"===" which can only compare values of the same data type. While the equality operator can compare values of different data types.

Take the following for example:
var x = 3; <- Data type: Integer
var y = '3'; <- Data type: String

x == y returns true
I believe the system converts x to a string: '3' so it returns true because '3' does in fact equal '3'

But

x === y returns false.
Simply because 3 does not strictly equal '3'
Thanks! I appreciate the lesson even if some of it is a bit beyond my current understanding... I also realized I had the closing { facing the wrong direction. I only have one other skill currently using JS so I compared how it was formatted and found that error.

It is now functioning correctly, I just need to add the extra damage and visual/audio effects.

Original thread: https://forums.rpgmakerweb.com/threads/using-yanflybuffsstatescores-statecounter-feature.151063/