Skills usable only on one character

The game I'm working on has a partnership theme, with pairs divided into magical and physical roles.

One of the characters has an ability to heal their partner. This works only on their partner and can't be used to heal themselves or anyone else.

Currently I'm implementing this by assigning the healing power a special element which everyone other than the partner is 100% resistant to, but I'm hoping for a more elegant solution.

Specifically, I'd like something that prevents the power from being used on a target at all rather than allowing you to target someone and heal them for 0 damage. Ideally, it would generate a message that [x] doesn't work on [Y].

Or, even better, if the power simply doesn't give the option to target anyone else (preventing the user from wasting a turn by accident), much in the same way a self-only power doesn't give the option to target anyone but the user.

Any idea how I can do this?

Would this work?
That looks like it'll probably do the job. I'll download it and see what I can do.
Definitely look into Yanfly's Selection Control. I use it for something similar--an ability one character can use to heal anyone in the party but himself.

You could probably use something like this with it:

<Custom Select Condition>
if (target.actorId() === 1) condition = true;
else condition = false;
</Custom Select Condition>

With 1 being whatever the "partner" actor's ID is. (not tested, no guarantees)
Sweet, I hope it will work out for ya. Let me know how it goes.
Moved to: JS Plugin Requests
Definitely look into Yanfly's Selection Control. I use it for something similar--an ability one character can use to heal anyone in the party but himself.

You could probably use something like this with it:

<Custom Select Condition>
if (target.actorId() === 1) condition = true;
else condition = false;
</Custom Select Condition>

With 1 being whatever the "partner" actor's ID is. (not tested, no guarantees)

So, I tried this out (with yanfly's selection control and targeting core in place) and ran into a bug.

1577583803343.png


It's entirely possible I didn't implement this correctly. Since the actor in question is actor 1, I left the code as-is and just copy-pasted it into the skill's notes section.
I have found a workaround, although I'd still like something a little more elegant.

Basically, I assigned the character a special state and then set the skill to only target characters with that state. Seemed to test fine. Not perfect, but I think I can make it work so long as I remember to apply the state when needed
So yeah, I was a bit careless. Oops!

Try this instead (I forgot the check to make sure the target is an actor, since enemies don't have the actorId() function)

Code:
<Custom Select Condition>
if (target.isActor() && !target.isDead() && target.actorId() == 1) condition = true;
else condition = false;
</Custom Select Condition>

Edit: Added isDead check. You may want that.
Thanks! I'll give that a shot.
If that works let me know! I'm interested to see the solution
Just tested it tonight, worked great.

Original thread: https://forums.rpgmakerweb.com/threads/skills-usable-only-on-one-character.116669/