Advertisement
mrbubble

KGC_PassiveSkills + Yanfly New Battle Stats Patch

Aug 24th, 2011
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.85 KB | None | 0 0
  1. #==============================================================================
  2. # KGC_PassiveSkills + Yanfly New Battle Stats Patch (DEX, RES, DUR, and LUK)
  3. # v1.0 (August 24, 2011)
  4. # By Mr. Bubble
  5. #==============================================================================
  6. # Installation: Insert this patch into its own page below all the
  7. #               Yanfly Battle Stats scripts and KGC Passive Skills in
  8. #               your script editor.
  9. #------------------------------------------------------------------------------
  10. #   This patch adds New Battle Stats functionality to KGC Passive Skills.
  11. # Usage of these stats is generally no different than using default stats.
  12. #-----------------------------------------------------------------------------
  13. #  ++ Passive Skill New Battle Stats Parameter Tags ++
  14. #-----------------------------------------------------------------------------
  15. #   -----
  16. #  | Key |
  17. #   -----------------------------------------------------
  18. #  |   n | A value/number. Can be positive or negative.  |
  19. #  |   % | Changes n to a rate. Optional.                |
  20. #   -----------------------------------------------------
  21. #
  22. #  -------- ----------------------------------------------------------------
  23. #  Notetag | Description
  24. #  -------- ----------------------------------------------------------------
  25. #    DEX n | Increase/Decrease Dexterity
  26. #    RES n | Increase/Decrease Resistance
  27. #    DUR n | Increase/Decrease Durability
  28. #    LUK n | Increase/Decrease Luck
  29. #  -------- ----------------------------------------------------------------
  30. #
  31. #   Each stat tags can only be used if you have the appropriate Battle Stat
  32. # or Class Stat installed in your script editor. Using notetags for these
  33. # are no different than default stats.
  34. #
  35. #  Example:
  36. #
  37. #  <PASSIVE_SKILL>
  38. #   ATK +5
  39. #   DEX +10%
  40. #   RES +7
  41. #   DUR -33%
  42. #   LUK -3
  43. #  </PASSIVE_SKILL>
  44. #------------------------------------------------------------------------------
  45.  
  46. #==============================================================================
  47. #------------------------------------------------------------------------------
  48. #------- Do not edit below this point unless you know what you're doing -------
  49. #------------------------------------------------------------------------------
  50. #==============================================================================
  51.  
  52.  
  53. $imported = {} if $imported == nil
  54.  
  55. if $imported["PassiveSkill"]
  56.  
  57. module KGC
  58. module PassiveSkill
  59.   # DEX
  60.   if $imported["BattlerStatDEX"] || $imported["DEX Stat"]
  61.     PARAMS[:dex] = "DEX|dexterity"
  62.   end
  63.  
  64.   # RES
  65.   if $imported["BattlerStatRES"] || $imported["RES Stat"]
  66.     PARAMS[:res] = "RES|resistance"
  67.   end
  68.  
  69.   # DUR
  70.   if $imported["ClassStatDUR"]
  71.     PARAMS[:dur] = "DUR|durability"
  72.   end
  73.  
  74.   # LUK
  75.   if $imported["ClassStatLUK"]
  76.     PARAMS[:luk] = "LUK|luck"
  77.   end
  78.  
  79. end
  80. end
  81.  
  82. class Game_Actor < Game_Battler
  83.   #--------------------------------------------------------------------------
  84.   # alias: base_dex
  85.   #--------------------------------------------------------------------------
  86.   if $imported["BattlerStatDEX"] || $imported["DEX Stat"]
  87.     alias base_dex_KGC_PassiveSkill base_dex unless $@
  88.     def base_dex
  89.       n = base_dex_KGC_PassiveSkill + passive_params[:dex]
  90.       n = n * passive_params_rate[:dex] / 100
  91.       return n
  92.     end
  93.   end # if $imported["BattlerStatDEX"] || $imported["DEX Stat"]
  94.   #--------------------------------------------------------------------------
  95.   # alias: base_res
  96.   #--------------------------------------------------------------------------
  97.   if $imported["BattlerStatRES"] || $imported["RES Stat"]
  98.     alias base_res_KGC_PassiveSkill base_res unless $@
  99.     def base_res
  100.       n = base_res_KGC_PassiveSkill + passive_params[:res]
  101.       n = n * passive_params_rate[:res] / 100
  102.       return n
  103.     end
  104.   end #   if $imported["BattlerStatRES"] || $imported["RES Stat"]
  105.   #--------------------------------------------------------------------------
  106.   # alias: base_dur
  107.   #--------------------------------------------------------------------------
  108.   if $imported["ClassStatDUR"]
  109.     alias base_dur_KGC_PassiveSkill base_dur unless $@
  110.     def base_dur
  111.       n = base_dur_KGC_PassiveSkill + passive_params[:dur]
  112.       n = n * passive_params_rate[:dur] / 100
  113.       return n
  114.     end
  115.   end # if $imported["ClassStatDUR"]
  116.   #--------------------------------------------------------------------------
  117.   # alias: base_luk
  118.   #--------------------------------------------------------------------------
  119.   if $imported["ClassStatLUK"]
  120.     alias base_luk_KGC_PassiveSkill base_luk unless $@
  121.     def base_luk
  122.       n = base_luk_KGC_PassiveSkill + passive_params[:luk]
  123.       n = n * passive_params_rate[:luk] / 100
  124.       return n
  125.     end
  126.   end # $imported["ClassStatLUK"]
  127. end # class Game_Actor < Game_Battler
  128.  
  129. end # if $imported["PassiveSkill"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement