加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我给角色设置了个体值努力值。
可是我角色加入选初始化,那么角色的个体值就会重复刷两次,这样当前HP和MXHP,SP,就对不上
class Game_Battler attr_accessor :nl_zh attr_accessor :nl_maxhp attr_accessor :nl_maxsp attr_accessor :nl_str attr_accessor :nl_dex attr_accessor :nl_agi attr_accessor :nl_int attr_accessor :gtz_maxhp attr_accessor :gtz_maxsp attr_accessor :gtz_str attr_accessor :gtz_dex attr_accessor :gtz_agi attr_accessor :gtz_int alias initialize2016412 initialize def initialize initialize2016412 #初始努力值 @nl_zh = 600 @nl_maxhp = 0 @nl_maxsp = 0 @nl_str = 0 @nl_dex = 0 @nl_agi = 0 @nl_int = 0 #个体值 @gtz_maxhp = rand(31) @gtz_maxsp = rand(31) @gtz_str = rand(31) @gtz_dex = rand(31) @gtz_agi = rand(31) @gtz_int = rand(31) end end class Game_Actor < Game_Battler attr_accessor :nl_zh attr_accessor :nl_maxhp attr_accessor :nl_maxsp attr_accessor :nl_str attr_accessor :nl_dex attr_accessor :nl_agi attr_accessor :nl_int attr_accessor :gtz_maxhp attr_accessor :gtz_maxsp attr_accessor :gtz_str attr_accessor :gtz_dex attr_accessor :gtz_agi attr_accessor :gtz_int alias setup2016412 setup def setup(actor_id) setup2016412(actor_id) #初始努力值 @nl_zh = 600 @nl_maxhp = 0 @nl_maxsp = 0 @nl_str = 0 @nl_dex = 0 @nl_agi = 0 @nl_int = 0 #个体值 @gtz_maxhp = rand(31) @gtz_maxsp = rand(31) @gtz_str = rand(31) @gtz_dex = rand(31) @gtz_agi = rand(31) @gtz_int = rand(31) end end
class Game_Battler
attr_accessor :nl_zh
attr_accessor :nl_maxhp
attr_accessor :nl_maxsp
attr_accessor :nl_str
attr_accessor :nl_dex
attr_accessor :nl_agi
attr_accessor :nl_int
attr_accessor :gtz_maxhp
attr_accessor :gtz_maxsp
attr_accessor :gtz_str
attr_accessor :gtz_dex
attr_accessor :gtz_agi
attr_accessor :gtz_int
alias initialize2016412 initialize
def initialize
initialize2016412
#初始努力值
@nl_zh = 600
@nl_maxhp = 0
@nl_maxsp = 0
@nl_str = 0
@nl_dex = 0
@nl_agi = 0
@nl_int = 0
#个体值
@gtz_maxhp = rand(31)
@gtz_maxsp = rand(31)
@gtz_str = rand(31)
@gtz_dex = rand(31)
@gtz_agi = rand(31)
@gtz_int = rand(31)
end
end
class Game_Actor < Game_Battler
attr_accessor :nl_zh
attr_accessor :nl_maxhp
attr_accessor :nl_maxsp
attr_accessor :nl_str
attr_accessor :nl_dex
attr_accessor :nl_agi
attr_accessor :nl_int
attr_accessor :gtz_maxhp
attr_accessor :gtz_maxsp
attr_accessor :gtz_str
attr_accessor :gtz_dex
attr_accessor :gtz_agi
attr_accessor :gtz_int
alias setup2016412 setup
def setup(actor_id)
setup2016412(actor_id)
#初始努力值
@nl_zh = 600
@nl_maxhp = 0
@nl_maxsp = 0
@nl_str = 0
@nl_dex = 0
@nl_agi = 0
@nl_int = 0
#个体值
@gtz_maxhp = rand(31)
@gtz_maxsp = rand(31)
@gtz_str = rand(31)
@gtz_dex = rand(31)
@gtz_agi = rand(31)
@gtz_int = rand(31)
end
end
|