本帖最后由 howhow1314 于 2016-6-4 11:06 编辑
class Game_Actor def change_exp(exp, show) @exp[@class_id] = [exp, 0].max end def change_level(level, show) last_level = @level last_skills = skills (level - @level).times {|i| level_up if !max_level?} display_level_up(skills - last_skills) if show && @level > last_level end def py_level_up(show = true) last_level = @level last_skills = skills temp = next_level_exp - current_level_exp if @exp[@class_id] >= temp && !max_level? @exp[@class_id] -= temp level_up end display_level_up(skills - last_skills) if show && @level > last_level end end
class Game_Actor
def change_exp(exp, show)
@exp[@class_id] = [exp, 0].max
end
def change_level(level, show)
last_level = @level
last_skills = skills
(level - @level).times {|i| level_up if !max_level?}
display_level_up(skills - last_skills) if show && @level > last_level
end
def py_level_up(show = true)
last_level = @level
last_skills = skills
temp = next_level_exp - current_level_exp
if @exp[@class_id] >= temp && !max_level?
@exp[@class_id] -= temp
level_up
end
display_level_up(skills - last_skills) if show && @level > last_level
end
end
用事件指令增加等級的話經驗不會變動, 用py_level_up升級=消耗經驗+升級 |