What does duration in turns mean?

this might be a stupid question but bear with me:


When I create a new state, lets call it panic. And set it to:


- Remove at battle end
- Auto Remove timing: Turn, Duration in turns: 4 ~ 8
- Remove on Damage 85%

I expect the panic state to be attached on the enemy for up to a minimum of 4 turns, with an 85% chance of being removed after attack or 100% at the end of battle (incase its applied to the player).

Given this I tested it out and I didnt attack the enemy when I applied panic state, I used potions on my self. After 2 turns (on the third turn) ( turn one apply panic, turn two there move, turn three my move)  panic was removed automatically from the enemy.


At this stage I am just entering my turn (turn three) and I didn't attack the enemy. So what gives? What does Duration in turns mean? The info box (when hovering) doesn't really make sense. Can some one enlighten me?
Your understanding is correct: the state would last at least 4 turns.


This is how the default battle system counts turns.


At the beginning of battle, it is turn 0.


You then select your input.


After you select your input and your battlers begin to perform their first actions, turn 1 begins


When all battlers finish their actions, turn 1 ends.


You then select your input.


After input selection, turn 2 begins.


And so on.


A single turn involves ALL battlers performing actions.


If you are not using the default battle system, that may be a different story.
 
I am using the default side view with yanflies scripts to change menu position and add some extra bits to it ... Would that affect it? its the yanfly battle engine core and AI as well as yanfly core 

Original thread: https://forums.rpgmakerweb.com/threads/what-does-duration-in-turns-mean.56278/