#--------------------------------------------------------------------------
# ◎ 添加职业射程范围
#--------------------------------------------------------------------------
# 射程
def range
range = 0
for i in 0...(RANGE_ELEMENT.size - 2)
if @element_ranks[RANGE_ELEMENT] <= 2
range += 2 ** i
end
end
if @element_ranks[RANGE_ELEMENT[5]] <= 2
range = -range
end
if @element_ranks[RANGE_ELEMENT[6]] <= 2
range *= 0.1
end
return range
end
# 射程类型
def range_kind
for i in 0...RANGE_KIND_ELEMENT.size
if @element_ranks[RANGE_KIND_ELEMENT] <= 2
case i
when 0
return '十字'
when 1
return '方形'
end
end
end
return '菱形'
end
# 射程障碍遮挡
def range_block?
if @element_ranks[RANGE_BLOCK_ELEMENT] <= 2
return true
else
return false
end
end
#--------------------------------------------------------------------------
# ◎ 添加职业作用范围
#--------------------------------------------------------------------------
# 范围
def aoe
aoe = 0
for i in 0...(AOE_ELEMENT.size - 2)
if @element_ranks[AOE_ELEMENT] == 2
aoe += 2 ** i
end
end
if @element_ranks[AOE_ELEMENT[5]] <= 2
aoe = -aoe
end
if @element_ranks[AOE_ELEMENT[6]] <= 2
aoe *= 0.1
end
return aoe
end
# 范围类型
def aoe_kind
for i in 0...AOE_KIND_ELEMENT.size
if @element_ranks[AOE_KIND_ELEMENT] <= 2
case i
when 0
return '直线'
when 1
return '横线'
when 2
return '十字'
when 3
return '1:2扇形'
when 4
return '1:1扇形'
when 5
return '2:1扇形'
when 6
return '方形'
end
end
end
return '菱形'
end
# 范围障碍遮挡
def aoe_block?
if @element_ranks[AOE_BLOCK_ELEMENT] <= 2
return true
else
return false
end
end
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |