Adding Luck to critical damage

I want to make the critical damage dependent on the luk-stat of the attacker.
The formula I have in mind is simply "damage + (1 * luk / 200)" but it seems to take the luk of the one that takes the damage not the one who deals the critical hit. What can I do?


I used the scripts (under "Materials")
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# * Overwrite: Apply Critical
#--------------------------------------------------------------------------
def apply_critical(damage)
damage * (1 + luk * 0.005)
end
end


class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# * Overwrite: Apply Critical
#--------------------------------------------------------------------------
def apply_critical(damage)
damage * (1 + SceneManager.scene.subject.luk * 0.005)
end
end
You can (and I recommend you) to use the Extra Param Formulas script.
It literally allow you to use the luk to control the critical rate.

Original thread: https://forums.rpgmakerweb.com/threads/adding-luck-to-critical-damage.149929/