Damage that occurs once a state expires

Sorry if this is already out there, or if it has already been asked for, but I am really at a loss of what else I could search for to find what I am looking for.
I'd like a script that allows me to auto cast a spell on the target with a status effect after the status effect has expired. So, lets say, Character A casts a spell on Enemy B, the spell cast leaves a status effect on Enemy B, the status effect persists for 2 turns, then at the end of turn 2, a Fire spell is cast on Enemy B without Character A having to do anything more. Thank you for your time and I hope I have been clear enough.
Yanfly has a tips and tricks video on how to do something similar to this with his Buff & States core and Battle Engine core.


http://yanfly.moe/2016/06/25/tips-tricks-doom-bravely-default-rpg-maker-mv/


Using the <Custom Leave Effect> notetag you could simply add an animation plus the damage required. It wouldn't be exactly what you're describing, but at least lead you on the right path.
Yanfly has a tips and tricks video on how to do something similar to this with his Buff & States core and Battle Engine core.


http://yanfly.moe/2016/06/25/tips-tricks-doom-bravely-default-rpg-maker-mv/


Using the <Custom Leave Effect> notetag you could simply add an animation plus the damage required. It wouldn't be exactly what you're describing, but at least lead you on the right path.



Ah, damn it, I thought I looked through all the Tips and Tricks. I think I can do it using this. Not sure though. Thank you for the help.

Original thread: https://forums.rpgmakerweb.com/threads/damage-that-occurs-once-a-state-expires.68333/