How do I make Skills with different effects based on target (Friend or Foe)?

I want to create a skill that effect everyone but give hp dmg for foes and buff to ally.

But I have 2 problems: The skills only hit all foes or all allies not both;
And idk how I can make it give damage only to foe and not the friends.

Is this even possible or I need to change my plains ?
It is possible, but not by default.

In order to target both enemies and allies, you can try the Yanfly Target Core plugin to change the scope of the skill. There is a notetag to put onto the skill which will change the scope to everyone, you can find it in the instructions.

In order to have differing effects based on enemy vs. actor, use this as a template in the damage formula of the skill.
if (b.isEnemy()) {DamageFormula} else {b.addState(X)}
Where DamageFormula is the formula for how much damage it does and X is the state ID# of the buff you want to give to the allies.
It is possible, but not by default.

In order to target both enemies and allies, you can try the Yanfly Target Core plugin to change the scope of the skill. There is a notetag to put onto the skill which will change the scope to everyone, you can find it in the instructions.

In order to have differing effects based on enemy vs. actor, use this as a template in the damage formula of the skill.
if (b.isEnemy()) {DamageFormula} else {b.addState(X)}
Where DamageFormula is the formula for how much damage it does and X is the state ID# of the buff you want to give to the allies.

Thanks

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-skills-with-different-effects-based-on-target-friend-or-foe.89625/