Advanced Status Effects?

This may require a script, but I was planning a boss fight in which at the start, the boss uses a skill that inflicts the party with an aliament called:

Seeing Red, in which after, x amount of turns, it kills the entire party. However I am not sure how to do this? I can see how to make a aliament be removed

after enough turns, but not how to make it do damage just before it vanishes.

Also is it possible to make aliaments that stack? So say the boss slashes an player with a skill, this puts a poison on them with 1 stack, and if it reaches 5 stacks, maybe it 

kills the player or at the very least does massive damage and then goes away.

Are these possible without a script?
You can definitely do the first one with troop events. First, set the skill's conditions (in the enemy's action patterns) to only be activated when a switch is on. Then you set up your troop event like this:
oyXzwDO.png

cjx8fwV.png


Edit: Aha! I knew there was one--Neon Black has a script for stacking states, too.  🙂
Hm... Thank you very much. Makes me think I may need to get rid of my ATB. 
You could also just set it that once the battle goes to x turns, the entire party dies in the battle events. No states required for that. If you try it the first way, if someone is KO'd and revived, the state will be removed.

Original thread: https://forums.rpgmakerweb.com/threads/advanced-status-effects.36299/