加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 miantouchi 于 2020-11-12 18:51 编辑
默认数据库不可以自定义EXP曲线,我希望自己能够每个角色,每个等级自定义设置经验值,
于是我像下面这样操作的话,每个人都是一样的了
#-------------------------------------------------------------------------- # ● 计算 EXP #-------------------------------------------------------------------------- def make_exp_list actor = $data_actors[@actor_id] @exp_list[1] = 0 pow_i = 2.4 + actor.exp_inflation / 100.0 for i in 2..100 if i > actor.final_level @exp_list[i] = 0 else n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i) @exp_list[i] = @exp_list[i-1] + Integer(n) end end @exp_list[1] =30 @exp_list[2] =40 @exp_list[3] =50 end
#--------------------------------------------------------------------------
# ● 计算 EXP
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
for i in 2..100
if i > actor.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
end
@exp_list[1] =30
@exp_list[2] =40
@exp_list[3] =50
end
|