Custom Formula Help

I'm working on a game and am having some trouble with some skills and was wondering if anyone could help me figure out how to make them work.

Both of these skills are going to be given to a "Cavalier" class that specializes in fighting enemies late into the battle after everyone else is dead.

The first skill is called Avenge. I'd like it to give a few beneficial states and a few buffs if every other member of the party is dead. I know that the custom formula can be used to only do certain things if actors or enemies have certain states, but I don't personally know how to do this or if I can do it without a script.

The second is called Cavarly. I'd like it to do damage based on the turn number. I know that custom formula has a few usable values other than the ones shown when you mouse over the box in the skill menu, but I don't know what the turn number term is or if there even is one.

Any help would be greatly appreciated.
I too would like to know how to customize the damage formula. I'm not very good at math.
There is a topic specifically for questions on how to use the damage formula to do a lot of effects.


http://forums.rpgmakerweb.com/index.php?/topic/1143-how-to-make-the-most-of-custom-formulae-part-1/


Please read through that topic for the basics on how to use it.


And unfortunately, you need to know not only math but also the basics of coding to really use that.


Additionally, I think the "avenge" skill is too much for the damage formula alone - theoretically it could be done, but the space is limited.


For complex conditions with multiple results that might go to the limit, and you may have to add real scripting to get the desired effects.

Original thread: https://forums.rpgmakerweb.com/threads/custom-formula-help.54984/