| 
 
| 赞 | 4 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 2 |  
| 经验 | 0 |  
| 最后登录 | 2025-10-14 |  
| 在线时间 | 420 小时 |  
 Lv1.梦旅人 
	梦石0 星屑208 在线时间420 小时注册时间2020-1-11帖子258 | 
| 
举例:
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  class RPG::Class < RPG::BaseItem
 def initialize
 super
 @exp_params = [30,20,30,30]
 @params = Table.new(8,100)
 (1..99).each do |i|
 @params[0,i] = 400+i*50
 @params[1,i] = 80+i*10
 (2..5).each {|j| @params[j,i] = 15+i*5/4 }
 (6..7).each {|j| @params[j,i] = 30+i*5/2 }
 end
 @learnings = []
 @features.push(RPG::BaseItem::Feature.new(23, 0, 1))
 @features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
 @features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
 @features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
 @features.push(RPG::BaseItem::Feature.new(41, 1))
 @features.push(RPG::BaseItem::Feature.new(51, 1))
 @features.push(RPG::BaseItem::Feature.new(52, 1))
 end
 def exp_for_level(level)
 lv = level.to_f
 basis = @exp_params[0].to_f
 extra = @exp_params[1].to_f
 acc_a = @exp_params[2].to_f
 acc_b = @exp_params[3].to_f
 return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
 (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
 end
 attr_accessor :exp_params
 attr_accessor :params
 attr_accessor :learnings
 end
 
 我想把红字这段注解掉(新建职业时,总是给你先设好的四样特性),有办法吗?求赐教…
  | 
 |