How to make a skill work specifically to a character and a caster?

1st of all, Sorry for my English, It's not my native language. I'll try to make it clear as best as I could.

I would like to have a special skill that very specific only if a character are on the parties, and the skill are only work for him.

the skill are using 10 TP to sacrifice 10% of the caster current HP, and to add status[12], recover 5% HP, 10% MP of character Id[9].

This skill can only be cast by main character, and only can be benefit by character[9]...

To make it more clear, just imagine something like a vampire and his slave, the vampire will suck his slave's blood, and the slave are own by him, so he sacrifice only for him.

I hope I make it clear...

Any idea how do I make this happen?

Any help will be much appreciated !

Thank you!
Have only the main actor learn that skill, then no one else can use it.
As for targeting, use if and JavaScript coding in the damaged formula, or have the skill call a common event where you take care of more complex conditions and effects.
I think you can make this work by calling a common event. The common event can check to see if the correct character is in the party and if so, reduce the HP of said character and increase the HP of the caster or whatever you need this skill to do. RPG Maker allows you manually adjust most of the actors numbers through eventing so it shouldn't be too difficult to create this skill.
Thank you guys so much! I'm using common event and Yanfly's base troop events to fulfill what I want ! I hope someday I know how to use JavaScript though, they sure look neat ! Again, Thank a bunch! 😀

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-skill-work-specifically-to-a-character-and-a-caster.87128/