Yeah... Because I made a mistake with the custom execution.
I'll repeat what I said earlier though.
If you want the attack buff to be temporary and not a permanent stat boost, it will be better to move it inside a state as well and make the buffing skill cast a state too, with resolving the atk buff inside the buff atk state through Buffs and states core.
And if you want to make the buff permanent, then you will have to change user.isStateAffected to subject.isStateAffected. Because you want to check if your target is affected by the state, not the user.
Actually, I'm gonna stick with it. I have to learn how to do this stuff....
I'll provide a solution, so that I don't torture you.
Seal skill:
add State (for example 30)
Atk buff skill:
<Custom Execution>
if (subject.isStateAffected(30)) {
atk += 0
}else {
atk += x
}
this works for when you want the atk state increase to be permanent. Meaning it will never expire, and never be cleaned.
If you want to add attack boost temporarily, there are two cases.
Case 1. When you apply the attack boost as a buff
Seal skill is always the same
Atk buff skill:
<Custom Execution>
if (subject.isStateAffected(30)) {
nothing happens
}else {
subject.addBuff(0)
} (I am not sure to be honest how is adding buff through javascript
Or you can add it through state. Adding attack boost through a state has the advantage over buffs that while buff has one fixed percentage it boosts the attack with, the state is completely under your control. This will require buffs and stats core though.
Seal skill is always the same
Atk buff skill applies state 31.
State 31 will hold this information.
<Custom apply effect>
if (user.isStateAffected (30)) {
clear state 31
}else {
user.atk += x
}
Then if you want to apply state influence on equipments, this would go on your equips.
<Custom Parameters>
if (user.isStateAffected(30)) {
atk = 0
}else {
atk = x
}
I am not closing the notetags, since I am only illustrating how the code looks.