Skill that inflict more damage when allies are dead

Hi Everyone,

I would like to make a skill that increase the damage depending on how many allies are dead in the party.
I am realy not good at formules and i tried to look if there is a possibility to count how many allies are dead, but i didn't found.

Is there a formule or a way with Yanfly sequences to make my skill possible ?

Thanks in advance
With javascript knowledge, using Lunatic code for Yanfly, you could probably check if an actor ID is affected by death state, if yes then add to a variable; and then use the variable in a damage formula. I think it's definitely possible, I'm just not proficient with javascript… so I can't really help there, sorry.

Maybe in a damage formula you could check if an actor has death by:

$gameActor.actors()[actorIndex].isDeathStateAffected();
For a skill that deals 100 damage, plus 50 per dead member:

Code:
100 + 50 * $gameParty.deadMembers().length
For a skill that deals 100 damage, plus 50 per dead member:

Code:
100 + 50 * $gameParty.deadMembers().length

Thank you so Much @Aesica, it work like a charm, it will be realy great for my necromancer that can sacrifice his allies then deal great damage with this skill 🙂

Thanks for both answering that fast,
Have a great day !

Original thread: https://forums.rpgmakerweb.com/threads/skill-that-inflict-more-damage-when-allies-are-dead.120515/