Advertisement
Guest User

[RGSS] PrinceEndymion88's Barehand Statistic Script (Edited)

a guest
Mar 12th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.67 KB | None | 0 0
  1. ##Attack without Weapon and personal ATK/PDEF/MDEF/EVA statistics
  2. ##Created by PrinceEndymion88
  3. ##http://sailormoonanotherstory2.altervista.org
  4. ##version 0.1
  5. ##Thanks to ValentinoAvon for his base script
  6.  
  7. # {ID_HERO => ID ANIMATION}
  8. # Instruction:
  9. # First of all copy the script above Main
  10. # This define the animation displayed when an hero have no weapon assigned.
  11. # For example, if you want to assign the animation 386 at hero 1 you have to
  12. # insert 1=>386
  13. # You have to use comma to separe every personal animation.
  14. # For example ANIMATION_NO_WEAPON = {1=>386, 2=>300, 3=>150}
  15. ANIMATION_NO_WEAPON = {1=>10}
  16.  
  17. # Here you can define the default animation for the heroes which have no
  18. # animation assigned.
  19. ANIMATION_NO_WEAPON_DEFAULT = 11
  20.  
  21. # Here you have to insert the multiplier for your personal. Statistics.
  22. # ATK, PDEF, MDEF and EVA will be calculated with the following formula:
  23. # ATK  = HERO_LEVEL * MULTIPLIER_ATK
  24. #        (for example if your hero level is 25 and your MULTIPLIER_ATK is 2,
  25. #         at level 25 your hero will have a base attack = 50)
  26. # PDEF = HERO_LEVEL * MULTIPLIER_PDEF
  27. #        (for example if your hero level is 25 and your MULTIPLIER_PDEF is 3,
  28. #         at level 25 your hero will have a base physical defence = 75)
  29. # MDEF = HERO_LEVEL * MULTIPLIER_MDEF
  30. #        (for example if your hero level is 25 and your MULTIPLIER_MDEF is 2,
  31. #         at level 25 your hero will have a base magical defence = 50)
  32. # EVA  = HERO_LEVEL * MULTIPLIER_EVA
  33. #        (for example if your hero level is 25 and your MULTIPLIER_EVA is 4,
  34. #         at level 25 your hero will have a base evasion = 100)
  35. # Naturally if you equip your hero with weapons or armor you have to sum base
  36. # statistics + additional statistics
  37. MULTIPLIER_ATK  = {1=>2}
  38. MULTIPLIER_PDEF = {1=>3}
  39. MULTIPLIER_MDEF = {1=>2}
  40. MULTIPLIER_EVA  = {1=>4}
  41.  
  42. class Game_Actor < Game_Battler
  43.   #--------------------------------------------------------------------------
  44.   # * Define Attack Power with and without weapon
  45.   #--------------------------------------------------------------------------
  46.   alias personal_base_atk base_atk
  47.   def base_atk
  48.     personal_base_atk + (@level * (MULTIPLIER_ATK[@actor_id] || 0))
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # * Define Physical Defense with and without weapon/armor
  52.   #--------------------------------------------------------------------------
  53.   alias personal_base_pdef base_pdef
  54.   def base_pdef
  55.     personal_base_pdef + (@level * (MULTIPLIER_PDEF[@actor_id] || 0))
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # * Define Magic Defense with and without weapon/armor
  59.   #--------------------------------------------------------------------------
  60.   alias personal_base_mdef base_mdef
  61.   def base_mdef
  62.     personal_base_mdef + (@level * (MULTIPLIER_MDEF[@actor_id] || 0))
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # * Define Evasion Correction with and without armor
  66.   #--------------------------------------------------------------------------
  67.   alias personal_base_eva base_eva
  68.   def base_eva
  69.     personal_base_eva + (@level * (MULTIPLIER_EVA[@actor_id] || 0))
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # * Define Animation ID with and without weapon
  73.   #--------------------------------------------------------------------------
  74.   alias personal_animation2_id animation2_id
  75.   def animation2_id
  76.     weapon = $data_weapons[@weapon_id]
  77.     return personal_animation2_id if weapon != nil
  78.     return ANIMATION_NO_WEAPON[@actor_id] || ANIMATION_NO_WEAPON_DEFAULT    
  79.   end
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement