#--------------------------------------------------------------------------
# ● 获取物理防御
#--------------------------------------------------------------------------
def pdef
if @actor_id > 9
n = base_pdef
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
else
n = base_pdef + (base_dex/10) + @dex_plus.to_i
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
end
end
def pdef
case @actor_id
when 6..99
n = base_pdef
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
when 1..5
n = base_pdef + (base_dex/10) + @dex_plus.to_i
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
end
end
def pdef
case @actor_id
when 2..8
n = base_pdef# + (base_dex/10) + @dex_plus.to_i
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
when 1
n = base_pdef + (base_dex/10) + @dex_plus.to_i
for i in @states
n *= $data_states.pdef_rate / 100.0
end
return Integer(n)
end
end作者: 八云紫 时间: 2008-9-27 20:12
$data_states.pdef_rate 为 nil 。