本帖最后由 yang1zhi 于 2016-6-14 19:50 编辑
刚才有点小问题,现在解决了
class Game_Battler def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, 999999].min for i in @states n *= $data_states[i].maxsp_rate / 100.0 n += ZHUANGTAI::ZTSP[i] if ZHUANGTAI::ZTSP.include?(i) end n = [[Integer(n), 0].max, 999999].min return n end end module ZHUANGTAI #前面是状态ID,后面是加的SP值 ZTSP = {1=>30,2=>30} end
class Game_Battler
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, 999999].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
n += ZHUANGTAI::ZTSP[i] if ZHUANGTAI::ZTSP.include?(i)
end
n = [[Integer(n), 0].max, 999999].min
return n
end
end
module ZHUANGTAI
#前面是状态ID,后面是加的SP值
ZTSP = {1=>30,2=>30}
end
|