Vampiric Sacrifice Skill?

Idk if that's the right name for this skill, but I'll try to describe what I'm after as best as possible.

One of the characters in the game that I'm working on is an edgy looking vampire with a lot of really good friends. One of the skills I was considering giving him is the ability to drain one of his allies, and in return receive a stat boost+elemental bonus relating to the class of the person being drained. I might end up changing the exact boosts that he gets later on, but for right now I'm more concerned with exactly how I would implement that kind of skill to begin with. I thought I had it down, but it applies the buffs to the person being drained rather than the vampire. What I've got right now can be seen here: https://i.gyazo.com/c9ac7333e34da72683c24e652ec4274e.png (still fiddling with the formula a little. Figuring out the calculations on these things isn't my strong point at all oops).

Is this sort of skill even possible, and if so do you have any tips on how I could make it work? I guess it sounds kind of silly in hindsight (there's like,,, a hundred better ways to get a stat boost) but I need it for story purposes. If this isn't clear enough I can try to elaborate as well~
Check Yanfly's tips and tricks, one of them is a vampiric sacrifice. It heals hp instead of boosting attributes, but transforming it to attributes won't be hard.

Original thread: https://forums.rpgmakerweb.com/threads/vampiric-sacrifice-skill.81214/