bgillisp

Difficutly Setting

Aug 21st, 2014
6
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module BGdifficulty_setting
  2.  
  3. #Difficulty variable.
  4. Difficulty_variable = 3
  5.  
  6. #Defines for the variables
  7. Very_Easy = 1
  8. Easy = 2
  9. Normal = 3
  10. Hard = 4
  11. Very_Hard = 5
  12.  
  13. #modifiers to gold, EXP and JP per difficulty
  14. Very_Easy_Gold = 2
  15. Very_Easy_EXP = 2
  16. Very_Easy_JP = 2
  17.  
  18. Easy_Gold = 1.5
  19. Easy_EXP = 1.5
  20. Easy_JP = 1.5
  21.  
  22. Hard_Gold = 0.75
  23. Hard_EXP = 0.75
  24. Hard_JP = 0.75
  25.  
  26. Very_Hard_Gold = 0.5
  27. Very_Hard_EXP = 0.5
  28. Very_Hard_JP = 0.5
  29. end
  30.  
  31. class Game_Enemy < Game_Battler
  32.  
  33. #--------------------------------------------------------------------------
  34. # * Overwrite method: exp
  35. #--------------------------------------------------------------------------
  36. def exp
  37.  
  38. case $game_variables[BGdifficulty_setting::Difficulty_variable]
  39. when BGdifficulty_setting::Very_Easy
  40. return (enemy.exp * BGdifficulty_setting::Very_Easy_EXP).to_i
  41. when BGdifficulty_setting::Easy
  42. return (enemy.exp * BGdifficulty_setting::Easy_EXP).to_i
  43. when BGdifficulty_setting::Hard
  44. return (enemy.exp * BGdifficulty_setting::Hard_EXP).to_i
  45. when BGdifficulty_setting::Very_Hard
  46. return (enemy.exp * BGdifficulty_setting::Very_Hard_EXP).to_i
  47. end
  48.  
  49. #Original line will be reached if normal difficulty, or variable not set.
  50. return enemy.exp
  51. end #End def exp
  52.  
  53. #--------------------------------------------------------------------------
  54. # * Overwrite method: gold
  55. #--------------------------------------------------------------------------
  56. def gold
  57.  
  58. case $game_variables[BGdifficulty_setting::Difficulty_variable]
  59. when BGdifficulty_setting::Very_Easy
  60. return (enemy.gold * BGdifficulty_setting::Very_Easy_Gold).to_i
  61. when BGdifficulty_setting::Easy
  62. return (enemy.gold * BGdifficulty_setting::Easy_Gold).to_i
  63. when BGdifficulty_setting::Hard
  64. return (enemy.gold * BGdifficulty_setting::Hard_Gold).to_i
  65. when BGdifficulty_setting::Very_Hard
  66. return (enemy.gold * BGdifficulty_setting::Very_Hard_Gold).to_i
  67. end
  68.  
  69. #Original line reached if normal difficulty, or variable not set
  70. return enemy.gold
  71. end #End def gold
  72.  
  73. #--------------------------------------------------------------------------
  74. # * Overwrite method: jp
  75. #--------------------------------------------------------------------------
  76.  
  77. def jp
  78.  
  79. case $game_variables[BGdifficulty_setting::Difficulty_variable]
  80. when BGdifficulty_setting::Very_Easy
  81. return (enemy.jp_gain * BGdifficulty_setting::Very_Easy_JP).to_i
  82. when BGdifficulty_setting::Easy
  83. return (enemy.jp_gain * BGdifficulty_setting::Easy_JP).to_i
  84. when BGdifficulty_setting::Hard
  85. return (enemy.jp_gain * BGdifficulty_setting::Hard_JP).to_i
  86. when BGdifficulty_setting::Very_Hard
  87. return (enemy.jp_gain * BGdifficulty_setting::Very_Hard_JP).to_i
  88. end
  89.  
  90. return enemy.jp_gain
  91. end
  92.  
  93. end #End class Game_Enemy
RAW Paste Data