Advertisement
mrbubble

KGC_PassiveSkill + Zetu Alternate MP X Patch

Aug 24th, 2011
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.56 KB | None | 0 0
  1. #==============================================================================
  2. # KGC_PassiveSkill + Zetu Alternate MP X Patch
  3. # v1.0 (August 24, 2011)
  4. # By Mr. Bubble
  5. #==============================================================================
  6. # Installation: Insert this patch into its own page below AMPX and
  7. #               KGC Passive Skills in your script editor.
  8. #------------------------------------------------------------------------------
  9. #   This patch adds AMPX options to KGC Passive Skills. Usage of these stats
  10. # for passive skills is no different than using default stats.
  11. #-----------------------------------------------------------------------------
  12. #  ++ Passive Skill AMPX Parameter Tags ++
  13. #-----------------------------------------------------------------------------
  14. #   -----
  15. #  | Key |
  16. #   -----------------------------------------------------
  17. #  |   n | A value/number. Can be positive or negative.  |
  18. #  |   % | Changes n to a rate. Optional.                |
  19. #   -----------------------------------------------------
  20. #
  21. #  ----------- -------------------------------------------------------------
  22. #  Notetag    | Description
  23. #  ----------- -------------------------------------------------------------
  24. #      MANA n | Increase/Decrease Maximum Mana
  25. #      RAGE n | Increase/Decrease Maximum Rage
  26. #    ENERGY n | Increase/Decrease Maximum Energy
  27. #     FOCUS n | Increase/Decrease Maximum Focus
  28. #  ----------- -------------------------------------------------------------
  29. #
  30. #  The notetags listed here for AMPX are for the *default* resources provided
  31. #  in that script. The notetag for KGC Passive Skill is determined by the
  32. #  Vocab for the resource defined in the SPEC hash. For example, if you
  33. #  have a resource defined as this:
  34. #
  35. #      :energy => ["Energy", "E", 14,  6, 14],
  36. #
  37. #  Then the notetag you want to use for KGC Passive Skill is ENERGY n
  38. #  where n is a value or rate. This will work for any custom resource
  39. #  you define in AMPX.
  40. #
  41. #  Using notetags for these is no different from default stats.
  42. #
  43. #  Example:
  44. #
  45. #  <PASSIVE_SKILL>
  46. #   ATK +5
  47. #   MANA +40%
  48. #   RAGE -7
  49. #   ENERGY +10
  50. #   FOCUS +30%
  51. #  </PASSIVE_SKILL>
  52. #------------------------------------------------------------------------------
  53.  
  54. #==============================================================================
  55. #------------------------------------------------------------------------------
  56. #------- Do not edit below this point unless you know what you're doing -------
  57. #------------------------------------------------------------------------------
  58. #==============================================================================
  59.  
  60. $imported = {} if $imported == nil
  61. $zsys = {} if $zsys.nil?
  62.  
  63. if $imported["PassiveSkill"]
  64.  
  65. module KGC
  66. module PassiveSkill
  67.  
  68.   # Creates a regexp for each custom AMPX resource using the resource Vocab
  69.   if $zsys[:ampx]
  70.     Z11::SPEC.each_key { |key|
  71.       PARAMS[key] = /#{Z11::SPEC[key][0]}/i
  72.     }
  73.   end
  74.  
  75. end # module PassiveSkill
  76. end # module KGC
  77.  
  78.  
  79. class Game_Actor < Game_Battler
  80. if $zsys[:ampx]
  81.   #--------------------------------------------------------------------------
  82.   # alias: maxampx
  83.   #--------------------------------------------------------------------------
  84.   alias maxampx_KGC_PassiveSkill maxampx unless $@
  85.   def maxampx(resource = Z11::DEF_RES)
  86.     n = maxampx_KGC_PassiveSkill(resource) + passive_params[resource]
  87.     n = n * passive_params_rate[resource] / 100
  88.     return n
  89.   end
  90. end # if $zsys[:ampx]
  91. end # class Game_Actor < Game_Battler
  92.  
  93. end # if $imported["PassiveSkill"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement