Damage Formula: Recognise Friend From Foe?

Is there a Damage Formula condition to determine the formula to be used if the target is an enemy or a party member?
https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

b.isActor() ? formulaA : formulaB;
translates to
if target is actor use formulaA otherwise use formulaB

b.isEnemy() works the same way but it checking if target is enemy instead of actor
Based on the above formula that @Tiamat-86 gave you, you could also put the following before the question mark: (a.isActor() === b.isActor()) which will evaluate to true or false based on whether the user and target are allies of each other.

Tiamat's formula will work if you're trying to determine whether they are a character or an enemy as RPG Maker sees it; but use this one instead of you're trying to determine whether the user would consider the target to be a friend or a foe.
Based on the above formula that @Tiamat-86 gave you, you could also put the following before the question mark: (a.isActor() === b.isActor()) which will evaluate to true or false based on whether the user and target are allies of each other.

Tiamat's formula will work if you're trying to determine whether they are a character or an enemy as RPG Maker sees it; but use this one instead of you're trying to determine whether the user would consider the target to be a friend or a foe.

Thank you both for the responses, and for the friend or foe clarification - it's exactly what I was looking for ^^
doesn't the item itself have a field for selecting friend or foe?
and, single/multiple target?
and, including or excluding the user?

those are all properties of the item object, which, skills are.
doesn't the item itself have a field for selecting friend or foe?
and, single/multiple target?
and, including or excluding the user?

those are all properties of the item object, which, skills are.

Oh, those options are present, but if, say, you want a single spell that heals a targeted ally but deals holy damage to an enemy, then you don't have the option to do so without the help of plugins. I have a plugin that allows me to switch the targeting scope from an enemy to an ally and vice versa, but I needed the damage formula portion to be able to achieve the damage/heal portion.
then you don't have the option to do so without the help of plugins

you can return the significant value from the damage formula, defined by skill type and landing condition, and the after effect through a common event.
😳
you can return the significant value from the damage formula, defined by skill type and landing condition, and the after effect through a common event.
😳

... which would be an inferior and messy way to do it when the OP has received an easy and manageable solution 🙂.

Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-recognise-friend-from-foe.96403/