Atk Power seal/lock Skill

Alright, elaborate a bit, what can't you get right more precisely?

So here's what I did.

I created the state 'Seal atk'
Then I created the skill that would cast the state.

So now in all instances I have to make it so that if the target is under the state 'Seal atk' the atk+(increase) would = 0.
'Seal atk' State is empty but I refer to it in custom execution in the notetag of what is used to increase atk -- if it is active on a target then atk+=0

However, I tried this and the atk still went up.
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.
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.
So lost...
I give up.
I'll maybe come back to it when I get my other skills completed. I've spent so much time on this one skill.
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.
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.
Interesting. I feel like this is what I was doing. I will revisit it when I get back.
I stepped out to grab some lunch.

Original thread: https://forums.rpgmakerweb.com/threads/atk-power-seal-lock-skill.83489/