Making an item that only has extra effects if status on target

Okay so, my goal here is to make an item that is a stock standard "Cure status" type, but with the added affect of preventing this very status from afflicting the player for up to 2 turns afterward.

However, I do not want the item to prevent this status for future turns IF it is not already afflicting the player / party member.

I imagine putting a condition in the damage formula is the way to do this, but I haven't had to deal with complex damage formulas yet so I was hoping to get an explanation of how this would work. However, if there's a better way to do this - I'm all ears.

Thanks!

EDIT: Also - I want the item to be usable on the menu screen, but not have the effect of preventing the status ailment for 2 turns if it's used outside of battle.
Bump?

Original thread: https://forums.rpgmakerweb.com/threads/making-an-item-that-only-has-extra-effects-if-status-on-target.85022/