# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
if self.id == 1
n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, 999999].min
else
n = [[base_maxhp+@maxhp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxhp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxhp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# ● 获取 MaxSP
#--------------------------------------------------------------------------
def maxsp
if self.id == 1
n = [[base_maxsp+cx_plus(2)+ @maxsp_plus, 1].max, 999999].min
else
n = [[base_maxsp + @maxsp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxsp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxsp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end 作者: chaorenzhiwang 时间: 2016-1-27 22:48:32
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
if self.id == 1
n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, 999999].min
else
n = [[base_maxhp+@maxhp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxhp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxhp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# ● 获取 MaxSP
#--------------------------------------------------------------------------
def maxsp
if self.id == 1
n = [[base_maxsp+cx_plus(2)+ @maxsp_plus, 1].max, 999999].min
else
n = [[base_maxsp + @maxsp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxsp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxsp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end