Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- # DRG Item Passive Stat
- # Version: 1.12
- # Author : LiTTleDRAgo
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- #==============================================================================
- # ** Game_Party
- #------------------------------------------------------------------------------
- # This class handles the party. It includes information on amount of gold
- # and items. Refer to "$game_party" for the instance of this class.
- #==============================================================================
- class Game_Party
- #--------------------------------------------------------------------------
- # * ITEM STAT
- #--------------------------------------------------------------------------
- ITEM_STAT = {
- :id => [ :hp, :sp, :str, :dex, :agi, :int, :atk, :pdef, :mdef, :eva],
- 1 => [ 0, 0, 0, 1, 1, 0, 0, 1, 0, 10],
- 2 => [ 0, 0, 0, 1, 1, 0, 0, 1, 0, 10],
- }
- #--------------------------------------------------------------------------
- # * ARMOR AND WEAPON
- #--------------------------------------------------------------------------
- WEAPON_STAT = {
- 1 => [ 30, 0, 0, 0, 0, 40, 53, 34, 30, 10],
- }
- ARMOR_STAT = {
- 1 => [ 300, 0, 0, 0, 0, 40, 53, 34, 30, 10],
- }
- #--------------------------------------------------------------------------
- # * END CONFIG
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- # * Item Stat Plus
- #--------------------------------------------------------------------------
- def item_stat_plus
- summ = Array.new(12,0)
- summ.each_index {|s|
- @items.each_pair {|x,y| summ[s]+=((ITEM_STAT[x]||[])[s]||0) *@items[x] }
- @weapons.each_pair{|x,y| summ[s]+=((WEAPON_STAT[x]||[])[s]||0)*@weapons[x]}
- @armors.each_pair {|x,y| summ[s]+=((ARMOR_STAT[x]||[])[s]||0) *@armors[x] }
- @actors.each{|actor| summ[s]+=((WEAPON_STAT[actor.weapon_id]||[])[s]||0)
- summ[s]+=((ARMOR_STAT[actor.armor1_id]||[])[s]||0)
- summ[s]+=((ARMOR_STAT[actor.armor2_id]||[])[s]||0)
- summ[s]+=((ARMOR_STAT[actor.armor3_id]||[])[s]||0)
- summ[s]+=((ARMOR_STAT[actor.armor4_id]||[])[s]||0)}}
- return summ
- end
- end
- #==============================================================================
- # ** Game_Actor
- #------------------------------------------------------------------------------
- # This class handles the actor. It's used within the Game_Actors class
- # ($game_actors) and refers to the Game_Party class ($game_party).
- #==============================================================================
- class Game_Actor
- #--------------------------------------------------------------------------
- # * Alias Method
- #--------------------------------------------------------------------------
- [:maxhp,:maxsp,:str,:dex,:agi,:int,:atk,:pdef,:mdef,:eva].each_with_index do |m,i|
- alias_method(:"drg190_#{m}", :"#{m}")unless method_defined?(:"drg190_#{m}")
- define_method(:"#{m}") do |*args|
- stat, ex = $game_party.item_stat_plus, [0,1].include?(i) ? 9999 : 999
- [[send(:"drg190_#{m}",*args) + stat[i],1].max, ex].min
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement