Yup, simply a plugin with one function to handle the damage formula. You could create multiple different damage formula functions within the same plugin though if you wanted to.
The parameter "action" is used to reference the specific instance of the action the function is working on by having the function call pass the value "this" (I'm sure I posted an example earlier). What this does is opens up the use of Game_Action functions that already exist in the engine (you can find these by looking in rpg_objects.js). In the previous example we were using
to check if the action itself was physical or magical, in the damage formula function these looked like this
The parameter "action" is used to reference the specific instance of the action the function is working on by having the function call pass the value "this" (I'm sure I posted an example earlier). What this does is opens up the use of Game_Action functions that already exist in the engine (you can find these by looking in rpg_objects.js). In the previous example we were using
Code:
Game_Action.prototype.isPhysical()
Game_Action.prototype.isMagical()
to check if the action itself was physical or magical, in the damage formula function these looked like this
Code:
action.isPhysical()
action.isMagical()