Terms/Variables for Damage Formulas

Hey guys!


I just learned from Victor Sant, that something like a.hp_rate can be used in damage formulas, which makes life a lot easier! So I was, of course, wondering if there are more of these things. What did you stumble upon that may also be useful? This topic is not about the syntax of damage formulas, I would only like to collect these terms/variables. So basically things that can come after "a." and "b."
Well you can use any Game_Battler function that returns a value: basically, if it have a "return" followed by anything, the function can be used on formulas (although how it can be used may vary according to the value returned)


You just have to open look at the rpg_objects.js and look for the classes Game_BattlerBase, Game_Battler, Game_Enemy and Game_Actor and look for the functions that returns values. (you can also check plugins that add functions to that classes)


For example:


Game_BattlerBase.prototype.hpRate = function() {
    return this.hp / this.mhp;
};


this means that you can use a.hpRate() on damage formulas to get the rate of the hp.
write out


console.log(a);


open console [F8] and you'll see something like this

Spoiler
1T4f2pah.png

click on that Game_Actor to see all available variable.

Original thread: https://forums.rpgmakerweb.com/threads/terms-variables-for-damage-formulas.57663/