Advertisement
LiTTleDRAgo

[RGSS2] DRG Item Passive Stat VX

Mar 13th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.61 KB | None | 0 0
  1. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  2. # DRG Item Passive Stat VX
  3. # Version: 1.00
  4. # Author : LiTTleDRAgo
  5. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  6. #==============================================================================
  7. # ** Game_Party
  8. #------------------------------------------------------------------------------
  9. #  This class handles the party. It includes information on amount of gold
  10. #  and items. Refer to "$game_party" for the instance of this class.
  11. #==============================================================================
  12.  
  13. class Game_Party
  14.   #--------------------------------------------------------------------------
  15.   # * ITEM STAT
  16.   #--------------------------------------------------------------------------
  17.   ITEM_STAT = {
  18.   # 0 => [:hp, :sp, :str, :dex, :agi, :int, :atk, :pdef, :mdef, :eva],
  19.   1 =>  [   0,   0,   0,   1,   1,    0,   0,   1,   0,  10],
  20.   2 =>  [   0,   0,   0,   1,   1,    0,   0,   1,   0,  10],
  21.   }
  22.   #--------------------------------------------------------------------------
  23.   # * ARMOR AND WEAPON
  24.   #--------------------------------------------------------------------------
  25.   WEAPON_STAT = {
  26.   1 =>  [  30,   0,   0,   0,   0,   40,  53,  34,  30,  10],
  27.   }
  28.   ARMOR_STAT = {
  29.   1 =>  [ 300,   0,   0,   0,   0,   40,  53,  34,  30,  10],
  30.   }
  31.   #--------------------------------------------------------------------------
  32.   # * END CONFIG
  33.   #--------------------------------------------------------------------------
  34.  
  35.   #--------------------------------------------------------------------------
  36.   # * Item Stat Plus
  37.   #--------------------------------------------------------------------------
  38.   def item_stat_plus
  39.     summ = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  40.     party = defined?(Window_ActorCommand) ? @members : @actors
  41.     summ.each_index {|s|
  42.     @items.each_pair{|x,y| summ[s]+=((ITEM_STAT[x]||[])[s]||0)*@items[x]}
  43.     @weapons.each_pair{|x,y| summ[s]+=((WEAPON_STAT[x]||[])[s]||0)*@weapons[x]}
  44.     @armors.each_pair{|x,y| summ[s]+=((ARMOR_STAT[x]||[])[s]||0)*@armors[x]}
  45.     party.each{|actor| summ[s]+=((WEAPON_STAT[actor.weapon_id]||[])[s]||0)
  46.                          summ[s]+=((ARMOR_STAT[actor.armor1_id]||[])[s]||0)
  47.                          summ[s]+=((ARMOR_STAT[actor.armor2_id]||[])[s]||0)
  48.                          summ[s]+=((ARMOR_STAT[actor.armor3_id]||[])[s]||0)
  49.                          summ[s]+=((ARMOR_STAT[actor.armor4_id]||[])[s]||0)}}
  50.     return summ
  51.   end  
  52. end
  53. #==============================================================================
  54. # ** Game_Actor
  55. #------------------------------------------------------------------------------
  56. #  This class handles the actor. It's used within the Game_Actors class
  57. #  ($game_actors) and refers to the Game_Party class ($game_party).
  58. #==============================================================================
  59. class Game_Actor
  60.   #--------------------------------------------------------------------------
  61.   # * Alias Method
  62.   #--------------------------------------------------------------------------
  63.   unless method_defined? (:drg190_maxhp)
  64.     alias_method :drg190_maxhp, :maxhp
  65.     alias_method :drg190_maxsp, :maxsp if method_defined? (:maxsp)
  66.     alias_method :drg190_maxmp, :maxmp if method_defined? (:maxmp)
  67.     alias_method :drg190_str,   :str  
  68.     alias_method :drg190_dex,   :dex
  69.     alias_method :drg190_agi,   :agi
  70.     alias_method :drg190_int,   :int
  71.     alias_method :drg190_atk,   :atk
  72.     alias_method :drg190_pdef,  :pdef
  73.     alias_method :drg190_mdef,  :mdef
  74.     alias_method :drg190_eva,   :eva
  75.   end
  76.   #--------------------------------------------------------------------------
  77.   # * Get Basic Stat
  78.   #--------------------------------------------------------------------------
  79.   def maxhp(*args) drg190_maxhp(*args)+$game_party.item_stat_plus[0] end
  80.   def maxsp(*args) drg190_maxsp(*args)+$game_party.item_stat_plus[1] end
  81.   def maxmp(*args) drg190_maxmp(*args)+$game_party.item_stat_plus[1] end
  82.   def str(*args)   drg190_str(*args)  +$game_party.item_stat_plus[2] end
  83.   def dex(*args)   drg190_dex(*args)  +$game_party.item_stat_plus[3] end
  84.   def agi(*args)   drg190_agi(*args)  +$game_party.item_stat_plus[4] end
  85.   def int(*args)   drg190_int(*args)  +$game_party.item_stat_plus[5] end
  86.   def atk(*args)   drg190_atk(*args)  +$game_party.item_stat_plus[6] end
  87.   def pdef(*args)  drg190_pdef(*args) +$game_party.item_stat_plus[7] end
  88.   def mdef(*args)  drg190_mdef(*args) +$game_party.item_stat_plus[8] end
  89.   def eva(*args)   drg190_eva(*args)  +$game_party.item_stat_plus[9] end
  90. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement