There are notetags to run code when a state gets applied. There are examples given that adjust things with counters, but the same tags could be used to modify the duration of the state.
Then you would use the default way MV works and enter a duration of 2 turns. 1 for the turn the state gets applied in and 1 for the end of the next turn.
The problem with what you're asking for is you would make the turn counters meaningless to the player because they wouldn't know whether 1 means 1 or 2 or...whatever. If the numbers don't mean a consistent thing, they're pointless.
I know I guess my dilemma needs some context.
I have 3 states, these 3 states prevent that you become healed from healing items. Each of them them should only last 1 turn.
- State 1
- State 2
- State 3
- State 1 can be applied manually directly
- State 2 can be applied manually directly
- State 3 can be applied manually directly
- When State 1 ends, well the state is gone and the enemy or actor is stateless
- When State 2 ends, State 1 becomes automatically applied, after this -> see "State 1" rules
- When State 3 ends, State 2 becomes automatically applied, after this -> see "State 2" rules
So my dilemma here is, when I apply a state manually - 1 turn bascially is already gone for nothing if I don't see it to "2" turns.
So for State 1 there is no problem with that. But the problem occurs when State 2 or 3 are switching to the lower number, because then the turn "starts" at a different point, because the switch happend not thorugh an action but through the vanishing of the last state
And so State 2 & 3 who are also set to 2 turns (cause they be applied also manually) will take 1 turn for the first state, but 2 full rounds for the following states.
If you now ask, why I don't just use 3 different states with different durations when they all do the same anyway, well some unique visual effects are tied to them it would break completely with my streamlined process. D:
The only solutions that comes to my mind is creating different states for ticks and for the first state you manually aplly to an enemy. So the applied one switches to the "tick" ones, but that would be a hassle, cause no I have to check for twice as much states. xd