TheoAllen

Theo - Special Skill

Mar 15th, 2013
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.71 KB | None | 0 0
  1. # =============================================================================
  2. # ♫ ~ Special Skill by TheoAllen ~ ♫
  3. # Version  : 1.0
  4. # Contact  : www.rpgmakerid.com
  5. # Requires : N/A
  6. # =============================================================================
  7. # ♫ UPDATES :
  8. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  9. # 2013.03.15 - Started and finished script
  10. #
  11. # =============================================================================
  12. # ♫ DESCRIPTION :
  13. # This script can make your skill and item have abilities to ignore counter
  14. # attack, magic reflect, or even evasion.
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # ♫ INSTRUCTION :
  17. # Put this script below material but above main in script editor. Don't forget
  18. # to save.
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # ♫ HOW TO USE :
  21. # Type these notetags in skill or item note
  22.  
  23. # <anti counter>
  24. # Make skill or item can't be countered (physical)
  25.  
  26. # <anti reflect>
  27. # Make skill or item can't be reflected (magical)
  28.  
  29. # <always hit>
  30. # Make skill or item always hit (physical or magical)
  31.  
  32. # =============================================================================
  33. # ♫ TERMS OF USE :
  34. # - Credit me, TheoAllen. If you think it's necessary.
  35. # - You may use and edit this script both for commercial and non-commercial or
  36. #   even adult game as long as u don't claim it yours.
  37. # - I'll be glad if you give me a free copy of your game if you use this script
  38. #   in your commercial project.
  39. # =============================================================================
  40. $imported = {} if $imported.nil?
  41. $imported["Theo-SpecialSkill"] = true
  42. # =============================================================================
  43. # ♫ No custom configuration avalaible ~ ♫
  44. # =============================================================================
  45.  
  46. # =============================================================================
  47. # ♫ Do not edit unless you know what to do ~ ♫
  48. # =============================================================================
  49. # SCRIPT INFOS :
  50. # -------------------------------------
  51. # Rewriten method : N/A
  52. # -------------------------------------
  53. # Aliased method :
  54. # - Game_Battler
  55. #     def item_cnt
  56. #     def item_mrf
  57. #     def item_eva
  58. # -------------------------------------
  59. # New Classes : N/A
  60. # =============================================================================
  61. # ♫ RPG::UsableItem ~ ♫
  62. # =============================================================================
  63. class RPG::UsableItem < RPG::BaseItem
  64.  
  65.   def anti_counter?
  66.     return self.note.include?("<anti counter>")
  67.   end
  68.  
  69.   def anti_reflect?
  70.     return self.note.include?("<anti reflect>")
  71.   end
  72.  
  73.   def always_hit?
  74.     return self.note.include?("<always hit>")
  75.   end
  76.  
  77. end
  78. # =============================================================================
  79. # ♫ Game_Battler ~ ♫
  80. # =============================================================================
  81. class Game_Battler < Game_BattlerBase
  82.  
  83.   alias theolized_counter item_cnt
  84.   def item_cnt(user, item)
  85.     return 0 if item.anti_counter?
  86.     theolized_counter(user, item)
  87.   end
  88.  
  89.   alias theolized_reflect item_mrf
  90.   def item_mrf(user, item)
  91.     return 0 if item.anti_reflect?
  92.     theolized_reflect(user, item)
  93.   end
  94.  
  95.   alias theolized_eva item_eva
  96.   def item_eva(user, item)
  97.     return 0 if item.always_hit?
  98.     theolized_eva(user, item)
  99.   end
  100.  
  101. end
  102. # =============================================================================
  103. # ♫ End of Script ~ ♫
  104. # =============================================================================
Advertisement
Add Comment
Please, Sign In to add comment