class RPG::Class < RPG::BaseItem
#--------------------------------------------------------------------------
# ● VA初始化别名
#--------------------------------------------------------------------------
alias va_initialize initialize
#--------------------------------------------------------------------------
# ● VX初始化别名
#--------------------------------------------------------------------------
def vx_initialize
@id = 0
@name = ""
@position = 0
@weapon_set = []
@armor_set = []
@element_ranks = Table.new(1)
@state_ranks = Table.new(1)
@learnings = []
@skill_name_valid = false
@skill_name = ""
end
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
def initialize
va_initialize
vx_initialize
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
#--------VA-----------------
attr_accessor :exp_params
attr_accessor :params
attr_accessor :learnings
#-------------VX------------------------
attr_accessor :id
attr_accessor :name
attr_accessor :position
attr_accessor :weapon_set
attr_accessor :armor_set
attr_accessor :element_ranks
attr_accessor :state_ranks
#~ attr_accessor :learnings #因重复
attr_accessor :skill_name_valid
attr_accessor :skill_name
end