赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 78 |
经验 | 15725 |
最后登录 | 2024-11-21 |
在线时间 | 1343 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7802
- 在线时间
- 1343 小时
- 注册时间
- 2015-8-15
- 帖子
- 752
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
a=$custom_battle_next_fighter_team
b=$custom_battle_next_fighter_enermy
c=$custom_battle_next_map_id
$scene.start_efs_nonslg(a,b,c)
在事件中
attacker = $scene.start_efs_nonslg
[a].clone
text = @attacker.get_battle_effective.to_s
self.contents.draw_text(10, 335,
self.width, 12, "战斗力: "+text, 0)
def initialize(attacker,defender) @attacker = attacker @defender = defender draw_info self.opacity = 0 self.active = true end def origin_x return 0 end def origin_y return 0 end def draw_info #定义绘图信息 self.contents.font.size = 12 self.contents.font.color = efs_text_color(1) self.contents.draw_text(160, 350-12*2, self.width - 40, 12, "总兵力a:", 0) self.contents.draw_text(160, 350-12*1, self.width - 40, 12, "士气:", 0) self.contents.font.color = efs_text_color(0) self.contents.draw_text(160, 350, self.width - 40, 12, "轻步兵:", 0) self.contents.draw_text(160, 350+12*1, self.width - 40, 12, "重步兵:", 0) self.contents.draw_text(160, 350+12*2, self.width - 40, 12, "轻骑兵:", 0) self.contents.draw_text(160, 350+12*3, self.width - 40, 12, "重骑兵:", 0) self.contents.draw_text(160, 350+12*4, self.width - 40, 12, "远程步兵:", 0) self.contents.draw_text(160, 350+12*5, self.width - 40, 12, "远程骑兵:", 0) self.contents.draw_text(160, 350+12*6, self.width - 40, 12, "精英士兵:", 0) self.contents.draw_text(160, 350+12*7, self.width - 40, 12, "特殊兵种:", 0) #------------------------------------------------------------------------------------ self.contents.font.color = efs_text_color(1) self.contents.draw_text(480, 350-12*2, self.width - 40, 12, "总兵力b:", 0) self.contents.draw_text(480, 350-12*1, self.width - 40, 12, "士气:", 0) self.contents.font.color = efs_text_color(0) self.contents.draw_text(480, 350, self.width - 40, 12, "轻步兵:", 0) self.contents.draw_text(480, 350+12*1, self.width - 40, 12, "重步兵:", 0) self.contents.draw_text(480, 350+12*2, self.width - 40, 12, "轻骑兵:", 0) self.contents.draw_text(480, 350+12*3, self.width - 40, 12, "重骑兵:", 0) self.contents.draw_text(480, 350+12*4, self.width - 40, 12, "远程步兵:", 0) self.contents.draw_text(480, 350+12*5, self.width - 40, 12, "远程骑兵:", 0) self.contents.draw_text(480, 350+12*6, self.width - 40, 12, "精英士兵:", 0) self.contents.draw_text(480, 350+12*7, self.width - 40, 12, "特殊兵种:", 0) #活着的=@攻击者.获取num所有类型(true) alives = @attacker.get_num_all_type(true) #攻击者总数s=@攻击者.获取num所有类型 totals = @attacker.get_num_all_type #自己目录字体。color=文本颜色(0) self.contents.font.color = text_color(0) the_width = 250#宽度=250 #text=@攻击者。活下去。对s+“/”+@攻击者。基本成员_大小.to_s text = @attacker.get_alive_num.to_s+"/"+@attacker.base_member_size.to_s #大小=自身。目录文本大小(文本)。宽度 the_size = self.contents.text_size(text).width #自己目录绘制文本(160350-12*2,宽度-大小,12,文本,1) self.contents.draw_text(160, 350-12*2, the_width - the_size, 12, text, 1) #text=@攻击者。鼓舞士气。to_s text = @attacker.get_morale.to_s #大小=自身。目录文本大小(文本)。宽度 the_size = self.contents.text_size(text).width #自己目录绘制文本(160350-12*2,宽度-大小,12,文本,1) self.contents.draw_text(160, 350-12*1, the_width - the_size, 12, text, 1) #文本=总计[1]==0?“无“:活着的[1].to_s+”/“+总计[1].to_s text = totals[1] == 0 ? "无" : alives[1].to_s+"/"+totals[1].to_s #大小=自身。目录文本大小(文本)。宽度 the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350-0, the_width - the_size, 12, text, 1) text = totals[2] == 0 ? "无" : alives[2].to_s+"/"+totals[2].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*1, the_width - the_size, 12, text, 1) text = totals[3] == 0 ? "无" : alives[3].to_s+"/"+totals[3].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*2, the_width - the_size, 12, text, 1) text = totals[4] == 0 ? "无" : alives[4].to_s+"/"+totals[4].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*3, the_width - the_size, 12, text, 1) text = totals[5] == 0 ? "无" : alives[5].to_s+"/"+totals[5].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*4, the_width - the_size, 12, text, 1) text = totals[6] == 0 ? "无" : alives[6].to_s+"/"+totals[6].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*5, the_width - the_size, 12, text, 1) text = totals[7] == 0 ? "无" : alives[7].to_s+"/"+totals[7].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*6, the_width - the_size, 12, text, 1) text = totals[8] == 0 ? "无" : alives[8].to_s+"/"+totals[8].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(160, 350+12*7, the_width - the_size, 12, text, 1) #活着的=@攻击者.获取num所有类型(true) alives = @defender.get_num_all_type(true) #攻击者总数s=@攻击者.获取num所有类型 totals = @defender.get_num_all_type #自己目录字体。color=文本颜色(0) self.contents.font.color = text_color(0) the_width = 250#宽度=250 ##text=@防御者。活下去。对s+“/”+@防守者。基本成员_大小.to_s text = @defender.get_alive_num.to_s+"/"+@defender.base_member_size.to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350-12*2, the_width - the_size, 12, text, 1) text = @defender.get_morale.to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350-12*1, the_width - the_size, 12, text, 1) text = totals[1] == 0 ? "无" : alives[1].to_s+"/"+totals[1].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350-0, the_width - the_size, 12, text, 1) text = totals[2] == 0 ? "无" : alives[2].to_s+"/"+totals[2].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*1, the_width - the_size, 12, text, 1) text = totals[3] == 0 ? "无" : alives[3].to_s+"/"+totals[3].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*2, the_width - the_size, 12, text, 1) text = totals[4] == 0 ? "无" : alives[4].to_s+"/"+totals[4].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*3, the_width - the_size, 12, text, 1) text = totals[5] == 0 ? "无" : alives[5].to_s+"/"+totals[5].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*4, the_width - the_size, 12, text, 1) text = totals[6] == 0 ? "无" : alives[6].to_s+"/"+totals[6].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*5, the_width - the_size, 12, text, 1) text = totals[7] == 0 ? "无" : alives[7].to_s+"/"+totals[7].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*6, the_width - the_size, 12, text, 1) text = totals[8] == 0 ? "无" : alives[8].to_s+"/"+totals[8].to_s the_size = self.contents.text_size(text).width self.contents.draw_text(480, 350+12*7, the_width - the_size, 12, text, 1) #=============================================================== #self.contents.draw_text(119, 118, self.width - 40, 12, "当前效果对部队属性的影响总合(%)", 0) self.contents.font.size = 10 self.contents.font.color = efs_text_color(0) i = 0 dis = 49 x = 10 y = 350 + 12 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "甲胄", 0) i+=1 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "生存", 0) i+=1 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "暴击", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "杀伤", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "远程", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "反骑", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射速", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射程", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "盾甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "速度", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "士气", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "破甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "穿甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "反步", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "精确", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "弹药", 0) i = 0 dis = 49 x = 10 + 320 y = 350 + 12 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "甲胄", 0) i+=1 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "生存", 0) i+=1 self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "暴击", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "杀伤", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "远程", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "反骑", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射速", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射程", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "盾甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "速度", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "士气", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "破甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "穿甲", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "反步", 0) i = 0 self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "精确", 0) i+=1 self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "弹药", 0) #常量状态=@攻击者。获取常量状态 const_states = @attacker.get_const_states # 结果=常量状态数据。获取要显示的数据(常量状态) result = Const_State_data.get_data_for_display(const_states) red = text_color(2) green = text_color(3) white = text_color(0) self.contents.font.size = 10 x = 10 + 25 y = 350 + 12 dis = 49 for i in 0...3 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * i, y + 15*0, self.width, 10, result[i].to_s, 0) end for i in 3...6 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-3), y + 15*2, self.width, 10, result[i].to_s, 0) end for i in 6...8 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-6), y + 15*4, self.width, 10, result[i].to_s, 0) end for i in 8...11 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-8), y + 15*1, self.width, 10, result[i].to_s, 0) end for i in 11...14 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-11), y + 15*3, self.width, 10, result[i].to_s, 0) end for i in 14...16 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-14), y + 15*5, self.width, 10, result[i].to_s, 0) end ##常量状态=@防守者。获取常量状态 const_states = @defender.get_const_states # 结果=常量状态数据。获取要显示的数据(常量状态) result = Const_State_data.get_data_for_display(const_states) x = 10 + 25 + 320 y = 350 + 12 dis = 49 for i in 0...3 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * i, y + 15*0, self.width, 10, result[i].to_s, 0) end for i in 3...6 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-3), y + 15*2, self.width, 10, result[i].to_s, 0) end for i in 6...8 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-6), y + 15*4, self.width, 10, result[i].to_s, 0) end for i in 8...11 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-8), y + 15*1, self.width, 10, result[i].to_s, 0) end for i in 11...14 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-11), y + 15*3, self.width, 10, result[i].to_s, 0) end for i in 14...16 self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green self.contents.draw_text(x + dis * (i-14), y + 15*5, self.width, 10, result[i].to_s, 0) end #============================================================== #绘制走秀演员图形(@攻击者。事件角色,10,308,50) draw_walk_actor_graphic(@attacker.event.character_name, 10,308,50) draw_walk_actor_graphic(@defender.event.character_name,603,308,50) self.contents.font.size = 12 self.contents.font.color = efs_text_color(1) self.contents.draw_text(10, 335-12, self.width, 12, @attacker.the_name, 0) self.contents.draw_text(330, 335-12, self.width, 12, @defender.the_name, 0) #@攻击者。发挥战斗力。到s text = @attacker.get_battle_effective.to_s self.contents.draw_text(10, 335, self.width, 12, "战斗力: "+text, 0) text = @defender.get_battle_effective.to_s self.contents.draw_text(330, 335, self.width, 12, "战斗力: "+text, 0) self.contents.font.size = 10 self.contents.font.color = efs_text_color(0) self.contents.draw_text(10, y - 15, self.width, 10, "当前状态对影响百分比:", 0) self.contents.draw_text(330, y - 15, self.width, 10, "当前状态对影响百分比:", 0) end #-------------------------------------------------------------------------- # ● 一些方法的重载 #-------------------------------------------------------------------------- def dispose @base.dispose super end def y=(y) super(y) @base.y=y end def visible=(visible) super(visible) @base.visible = visible end def contents_opacity=(opacity) super(opacity) @base.opacity = opacity end end
def initialize(attacker,defender)
@attacker = attacker
@defender = defender
draw_info
self.opacity = 0
self.active = true
end
def origin_x
return 0
end
def origin_y
return 0
end
def draw_info #定义绘图信息
self.contents.font.size = 12
self.contents.font.color = efs_text_color(1)
self.contents.draw_text(160, 350-12*2, self.width - 40, 12, "总兵力a:", 0)
self.contents.draw_text(160, 350-12*1, self.width - 40, 12, "士气:", 0)
self.contents.font.color = efs_text_color(0)
self.contents.draw_text(160, 350, self.width - 40, 12, "轻步兵:", 0)
self.contents.draw_text(160, 350+12*1, self.width - 40, 12, "重步兵:", 0)
self.contents.draw_text(160, 350+12*2, self.width - 40, 12, "轻骑兵:", 0)
self.contents.draw_text(160, 350+12*3, self.width - 40, 12, "重骑兵:", 0)
self.contents.draw_text(160, 350+12*4, self.width - 40, 12, "远程步兵:", 0)
self.contents.draw_text(160, 350+12*5, self.width - 40, 12, "远程骑兵:", 0)
self.contents.draw_text(160, 350+12*6, self.width - 40, 12, "精英士兵:", 0)
self.contents.draw_text(160, 350+12*7, self.width - 40, 12, "特殊兵种:", 0)
#------------------------------------------------------------------------------------
self.contents.font.color = efs_text_color(1)
self.contents.draw_text(480, 350-12*2, self.width - 40, 12, "总兵力b:", 0)
self.contents.draw_text(480, 350-12*1, self.width - 40, 12, "士气:", 0)
self.contents.font.color = efs_text_color(0)
self.contents.draw_text(480, 350, self.width - 40, 12, "轻步兵:", 0)
self.contents.draw_text(480, 350+12*1, self.width - 40, 12, "重步兵:", 0)
self.contents.draw_text(480, 350+12*2, self.width - 40, 12, "轻骑兵:", 0)
self.contents.draw_text(480, 350+12*3, self.width - 40, 12, "重骑兵:", 0)
self.contents.draw_text(480, 350+12*4, self.width - 40, 12, "远程步兵:", 0)
self.contents.draw_text(480, 350+12*5, self.width - 40, 12, "远程骑兵:", 0)
self.contents.draw_text(480, 350+12*6, self.width - 40, 12, "精英士兵:", 0)
self.contents.draw_text(480, 350+12*7, self.width - 40, 12, "特殊兵种:", 0)
#活着的=@攻击者.获取num所有类型(true)
alives = @attacker.get_num_all_type(true)
#攻击者总数s=@攻击者.获取num所有类型
totals = @attacker.get_num_all_type
#自己目录字体。color=文本颜色(0)
self.contents.font.color = text_color(0)
the_width = 250#宽度=250
#text=@攻击者。活下去。对s+“/”+@攻击者。基本成员_大小.to_s
text = @attacker.get_alive_num.to_s+"/"+@attacker.base_member_size.to_s
#大小=自身。目录文本大小(文本)。宽度
the_size = self.contents.text_size(text).width
#自己目录绘制文本(160350-12*2,宽度-大小,12,文本,1)
self.contents.draw_text(160, 350-12*2, the_width - the_size, 12, text, 1)
#text=@攻击者。鼓舞士气。to_s
text = @attacker.get_morale.to_s
#大小=自身。目录文本大小(文本)。宽度
the_size = self.contents.text_size(text).width
#自己目录绘制文本(160350-12*2,宽度-大小,12,文本,1)
self.contents.draw_text(160, 350-12*1, the_width - the_size, 12, text, 1)
#文本=总计[1]==0?“无“:活着的[1].to_s+”/“+总计[1].to_s
text = totals[1] == 0 ? "无" : alives[1].to_s+"/"+totals[1].to_s
#大小=自身。目录文本大小(文本)。宽度
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350-0, the_width - the_size, 12, text, 1)
text = totals[2] == 0 ? "无" : alives[2].to_s+"/"+totals[2].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*1, the_width - the_size, 12, text, 1)
text = totals[3] == 0 ? "无" : alives[3].to_s+"/"+totals[3].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*2, the_width - the_size, 12, text, 1)
text = totals[4] == 0 ? "无" : alives[4].to_s+"/"+totals[4].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*3, the_width - the_size, 12, text, 1)
text = totals[5] == 0 ? "无" : alives[5].to_s+"/"+totals[5].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*4, the_width - the_size, 12, text, 1)
text = totals[6] == 0 ? "无" : alives[6].to_s+"/"+totals[6].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*5, the_width - the_size, 12, text, 1)
text = totals[7] == 0 ? "无" : alives[7].to_s+"/"+totals[7].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*6, the_width - the_size, 12, text, 1)
text = totals[8] == 0 ? "无" : alives[8].to_s+"/"+totals[8].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(160, 350+12*7, the_width - the_size, 12, text, 1)
#活着的=@攻击者.获取num所有类型(true)
alives = @defender.get_num_all_type(true)
#攻击者总数s=@攻击者.获取num所有类型
totals = @defender.get_num_all_type
#自己目录字体。color=文本颜色(0)
self.contents.font.color = text_color(0)
the_width = 250#宽度=250
##text=@防御者。活下去。对s+“/”+@防守者。基本成员_大小.to_s
text = @defender.get_alive_num.to_s+"/"+@defender.base_member_size.to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350-12*2, the_width - the_size, 12, text, 1)
text = @defender.get_morale.to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350-12*1, the_width - the_size, 12, text, 1)
text = totals[1] == 0 ? "无" : alives[1].to_s+"/"+totals[1].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350-0, the_width - the_size, 12, text, 1)
text = totals[2] == 0 ? "无" : alives[2].to_s+"/"+totals[2].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*1, the_width - the_size, 12, text, 1)
text = totals[3] == 0 ? "无" : alives[3].to_s+"/"+totals[3].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*2, the_width - the_size, 12, text, 1)
text = totals[4] == 0 ? "无" : alives[4].to_s+"/"+totals[4].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*3, the_width - the_size, 12, text, 1)
text = totals[5] == 0 ? "无" : alives[5].to_s+"/"+totals[5].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*4, the_width - the_size, 12, text, 1)
text = totals[6] == 0 ? "无" : alives[6].to_s+"/"+totals[6].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*5, the_width - the_size, 12, text, 1)
text = totals[7] == 0 ? "无" : alives[7].to_s+"/"+totals[7].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*6, the_width - the_size, 12, text, 1)
text = totals[8] == 0 ? "无" : alives[8].to_s+"/"+totals[8].to_s
the_size = self.contents.text_size(text).width
self.contents.draw_text(480, 350+12*7, the_width - the_size, 12, text, 1)
#===============================================================
#self.contents.draw_text(119, 118, self.width - 40, 12, "当前效果对部队属性的影响总合(%)", 0)
self.contents.font.size = 10
self.contents.font.color = efs_text_color(0)
i = 0
dis = 49
x = 10
y = 350 + 12
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "甲胄", 0)
i+=1
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "生存", 0)
i+=1
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "暴击", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "杀伤", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "远程", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "反骑", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射速", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射程", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "盾甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "速度", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "士气", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "破甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "穿甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "反步", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "精确", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "弹药", 0)
i = 0
dis = 49
x = 10 + 320
y = 350 + 12
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "甲胄", 0)
i+=1
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "生存", 0)
i+=1
self.contents.draw_text(x + dis * i, y, self.width - 0, 10, "暴击", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "杀伤", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "远程", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*2, self.width - 0, 10, "反骑", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射速", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*4, self.width - 0, 10, "射程", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "盾甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "速度", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*1, self.width - 0, 10, "士气", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "破甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "穿甲", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*3, self.width - 0, 10, "反步", 0)
i = 0
self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "精确", 0)
i+=1
self.contents.draw_text(x + dis * i, y+15*5, self.width - 0, 10, "弹药", 0)
#常量状态=@攻击者。获取常量状态
const_states = @attacker.get_const_states
# 结果=常量状态数据。获取要显示的数据(常量状态)
result = Const_State_data.get_data_for_display(const_states)
red = text_color(2)
green = text_color(3)
white = text_color(0)
self.contents.font.size = 10
x = 10 + 25
y = 350 + 12
dis = 49
for i in 0...3
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * i, y + 15*0, self.width, 10, result[i].to_s, 0)
end
for i in 3...6
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-3), y + 15*2, self.width, 10, result[i].to_s, 0)
end
for i in 6...8
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-6), y + 15*4, self.width, 10, result[i].to_s, 0)
end
for i in 8...11
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-8), y + 15*1, self.width, 10, result[i].to_s, 0)
end
for i in 11...14
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-11), y + 15*3, self.width, 10, result[i].to_s, 0)
end
for i in 14...16
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-14), y + 15*5, self.width, 10, result[i].to_s, 0)
end
##常量状态=@防守者。获取常量状态
const_states = @defender.get_const_states
# 结果=常量状态数据。获取要显示的数据(常量状态)
result = Const_State_data.get_data_for_display(const_states)
x = 10 + 25 + 320
y = 350 + 12
dis = 49
for i in 0...3
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * i, y + 15*0, self.width, 10, result[i].to_s, 0)
end
for i in 3...6
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-3), y + 15*2, self.width, 10, result[i].to_s, 0)
end
for i in 6...8
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-6), y + 15*4, self.width, 10, result[i].to_s, 0)
end
for i in 8...11
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-8), y + 15*1, self.width, 10, result[i].to_s, 0)
end
for i in 11...14
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-11), y + 15*3, self.width, 10, result[i].to_s, 0)
end
for i in 14...16
self.contents.font.color = result[i] == 100 ? white : result[i] < 100 ? red : green
self.contents.draw_text(x + dis * (i-14), y + 15*5, self.width, 10, result[i].to_s, 0)
end
#==============================================================
#绘制走秀演员图形(@攻击者。事件角色,10,308,50)
draw_walk_actor_graphic(@attacker.event.character_name, 10,308,50)
draw_walk_actor_graphic(@defender.event.character_name,603,308,50)
self.contents.font.size = 12
self.contents.font.color = efs_text_color(1)
self.contents.draw_text(10, 335-12, self.width, 12, @attacker.the_name, 0)
self.contents.draw_text(330, 335-12, self.width, 12, @defender.the_name, 0)
#@攻击者。发挥战斗力。到s
text = @attacker.get_battle_effective.to_s
self.contents.draw_text(10, 335, self.width, 12, "战斗力: "+text, 0)
text = @defender.get_battle_effective.to_s
self.contents.draw_text(330, 335, self.width, 12, "战斗力: "+text, 0)
self.contents.font.size = 10
self.contents.font.color = efs_text_color(0)
self.contents.draw_text(10, y - 15, self.width, 10, "当前状态对影响百分比:", 0)
self.contents.draw_text(330, y - 15, self.width, 10, "当前状态对影响百分比:", 0)
end
#--------------------------------------------------------------------------
# ● 一些方法的重载
#--------------------------------------------------------------------------
def dispose
@base.dispose
super
end
def y=(y)
super(y)
@base.y=y
end
def visible=(visible)
super(visible)
@base.visible = visible
end
def contents_opacity=(opacity)
super(opacity)
@base.opacity = opacity
end
end
|
|