Items that has different effects on certain characters

I basically want to make an item that fully restores the HP of character a, but only heal few hp for anybody else.

more or less like "favorite food" item that is mentioned in this thread:
https://forums.rpgmakerweb.com/index.php?threads/how-to-make-the-most-of-custom-formulae-part-1.1143

which mentions the formula:
Code:
if b.id == 1; 500; else; 100; end;

So in that formula, if the item is used on character with id 1, then that character will be healed for 500 HP, while the item will only heal 100 HP to everybody else.

But the tips in that thread is for VX Ace only, and when I tried it on MV it causes error, so I'd appreciate it if someone can help me translate the formula for MV.
Thank you very much 🙂
Code:
b.actorId() === 1 ? 500 : 100
If it is a skill used by an enemy on it's ally use
Code:
b.enemyId() === 1 ? 500 : 100
only if max HP is 500 or less. If you want to fully restore HP and max HP could be more than 500, use this:

Code:
b.actorId() === 1 ? b.mhp : 100

The above also assumes it's an item/skill that only your party members can use (not an enemy skill) and the target is an ally.
@BurningOrca & @Shaz Thank you so much. It worked really well ☺️
For future reference when it comes to damage formulas, here is Glass' Post on MV:
https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

Good luck in your future endeavors ^_^
@NinjaKittyProductions Thank you so much. This will definitely help 🙂

Original thread: https://forums.rpgmakerweb.com/threads/items-that-has-different-effects-on-certain-characters.113279/