Adding Luck to Critical Hit Damage

Hi Guys,
 
In order to make Luck Stata more usefull for my game, i want to include luck stat differences on critical damage. That is, how bigger the difference between your luck and enemy's luck, bigger the critical damage.
 
I've tried to modify critical damage base:
 
  def apply_critical(damage)
    damage * 3
  end
 
to something like
 

  def apply_critical(damage)
    (damage * 2) + (user.luck - luk)*2
  end

 
but havent worked.

Can someone help me?

Thank you a lot!
add this below materials

Code:
class Game_Battler < Game_BattlerBase    alias x1515161641 make_damage_value  def make_damage_value(user, item)    @user = user    x1515161641(user, item)  end      def apply_critical(damage)    damage * 3 + (@user.luk - self.luk) * 2  end    end
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

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