#属性防御
if @armor.guard_element_set.empty?!=true #属性。为属性 ID 的数组
element_set={1=>"火",2=>"冰",3=>"光",4=>"暗"}
text="属性防御:"
for i in [email protected]_element_set.size
text+=element_set[@armor.guard_element_set]+" "
end
x=0
y+=1
self.contents.font.color = normal_color
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
#状态防御
if @armor.guard_state_set.empty?!=true #附加状态。为状态 ID 的数组
text="状态防御:"
x=0
y+=1
self.contents.font.color = normal_color
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
y-=1
x+=text.size*5
for i in [email protected]_state_set.size
y+=1
text=$data_states[@armor.guard_state_set].name
self.contents.font.color = normal_color
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
end
y+=1 #空行
if @armor.str_plus!=0 #力量
x=0
y+=1
text=$data_system.words.str+" + "[email protected]_plus.to_s
self.contents.font.color = Color.new(255, 255, 168)#颜色脚本
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
if @armor.dex_plus!=0#体质
x=0
y+=1
text=$data_system.words.dex+" + "[email protected]_plus.to_s
self.contents.font.color = Color.new(255, 255, 168)#颜色脚本
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
if @armor.agi_plus!=0#敏捷
x=0
y+=1
text=$data_system.words.agi+" + "[email protected]_plus.to_s
self.contents.font.color = Color.new(255, 255, 168)#颜色脚本
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
if @armor.int_plus!=0 #智力
x=0
y+=1
text=$data_system.words.int+" + "[email protected]_plus.to_s
self.contents.font.color = Color.new(255, 255, 168)#颜色脚本
self.contents.font.size=14
self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
end
end
end
#--------------------------------------------------------------------------
# ● 技能帮助窗口
#--------------------------------------------------------------------------
def set_skill_text(skill)
@skill=skill [email protected]
x=0
y=0
height=1 #依要显示的内容确定高
#由描叙确定高
height+=description.size/3/10
if description.size%10!=0
height+=1
end
height+=4 #空行,效果范围,消费SP,命中率
if @skill.power!=0 #威力,威力为0,则可能为状态魔法
height+=1
end
if @skill.element_set.empty?!=true #属性。为属性 ID 的数组
height+=1
end
if @skill.plus_state_set.empty?!=true #附加状态。为状态 ID 的数组 [email protected]_state_set.size
end
if @skill.minus_state_set.empty?!=true #解除状态。为状态 ID 的数组 [email protected]_state_set.size
end
self.height=height*15+40+15
self.contents = Bitmap.new(self.width - 32,self.height - 32)
self.contents.clear
#描绘名字 [email protected]
self.contents.font.color =text_color(6)
self.contents.font.size=18
self.contents.font.color = Color.new(255, 255, 128)
if text!=nil
self.visible = true
self.contents.draw_text(0,0, @skill.name.size*7, 20, text, 0)
else
self.visible = false
end
x=0
y+=1
text=description
#描绘描叙
while ((text = description.slice!(/./m)) != nil)
self.contents.font.color = normal_color
self.contents.font.size=14
self.contents.draw_text(x*15, y*15+5, 14, 14, text, 0)
x+=1
if x==10#每行10个字
x=0
y+=1
end
end
#由特技属性确定高
#效果范围