more shifts in a state

Hello everyone,

I wanted to know if it's possible to create an ability that increases an enemy's current status by, for example, two turns. For example, if the enemy has a status that has two turns remaining, you can add two additional turns to it with an ability, regardless of that status. I use RPG Maker MZ and have the Visutella add-ons.
If I understand what you want, the VisuStella Skills and States Core should have what you need. The following set of notetags are the ones you're looking for.

Code:
<State id Turns: +x>
<State id Turns: -x>

<Set State id Turns: x>

<State name Turns: +x>
<State name Turns: -x>

<Set State name Turns: x>

- Used for: Skill, Item Notetags
- If the target is affected by state 'id' or state 'name', change the state
  turn duration for target.
- For 'id' variant, replace 'id' with the ID of the state to modify.
- For 'name' variant, replace 'name' with the name of the state to modify.
- Replace 'x' with the value you wish to increase, decrease, or set to.
- Insert multiples of this notetag to affect multiple states at once.

That info comes directly from the help file of Skills and States Core if you ever need to refer back to it. I'll also note that there may be a neater way to do it through some fancier Javascript, but that is unfortunately not my area of expertise. So you may want to hold out for some additional responses. Someone like @caethyril might have some ideas.
Yes, I've used those codes but it only increases the specific status you set, I want it to increase the duration of any negative status.
Hmmm, I think this works (skill notetag):

<JS Post-Apply>
let stateId = 0;
if (target.states().length > 0) {
for (let i = 0; i < target.states().length; i++) {
stateId = target.states()[i].id;
if (target.states()[i].meta["Negative State"]){
target.setStateTurns(stateId, target.stateTurns(stateId)+2);
}
}
}
</JS Post-Apply>

EDIT: You have to mark your negative states with the <Negative State> notetag.

Original thread: https://forums.rpgmakerweb.com/threads/more-shifts-in-a-state.177399/