Making an Absorb States ability

Hopefully, this is the correct forum. Apologies if it isn't.

So I'm trying to make a skill for a character when they can select a target, either enemy or ally, and steal their states if that state is on a predetermined list.

For example: A thug is stunned, poisoned, and hasted. On the list of states, I want the skill to be capable of stealing the poisoned and hasted states. So the user casts the skill and now the thug is just stunned, while the user is now poisoned and hasted.

I'm almost completely certain this can't be done in the base engine. I've been looking at Yanfly's target core and was wondering if there is an expanded list of calls you can make with the lunatic mode.

The way I'd like to do it would be a forEach call on a list of states the target has, then compare it to the list of stealable states. If it can be stolen, it's popped off the targets state list and added to the users.

Link to Plugin Here: http://yanfly.moe/2016/02/26/yep-74-target-core/
Maybe this can help:
Yep, Target Core adjusts who the skill hits; Yami's plugin looks good but otherwise I'd suggest Yanfly's Skill Core. In case it's helpful I found this Tips & Tricks article: http://yanfly.moe/2016/06/08/tips-tricks-plague-touch-guild-wars-rpg-maker-mv/
@caethyril That's exactly what I'm looking for!

Original thread: https://forums.rpgmakerweb.com/threads/making-an-absorb-states-ability.106335/