查看: 2458|回复: 2

[已经过期] 如何使技能信息显示某个变量的数量

[复制链接]
梦石
0
星屑
1442
在线时间
328 小时
注册时间
2016-4-4
回帖
126

开拓者

发表于 2016-7-25 15:55:06 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
  1. #--------------------------------------------------------------------------
  2.   #取得当前角色
  3.   #--------------------------------------------------------------------------
  4.   class Scene_Battle
  5.     alias lqc_phase3_setup_command_window phase3_setup_command_window
  6.     def phase3_setup_command_window
  7.       $active_now = $game_party.actors[@actor_index]
  8.       lqc_phase3_setup_command_window
  9.     end
  10.   end
  11. #==============================================================================
  12. # ■ Window_Help
  13. #------------------------------------------------------------------------------
  14. #  特技及物品的说明、角色的状态显示的窗口。
  15. #==============================================================================

  16. class Window_SkillHelp < Window_Base
  17.   #--------------------------------------------------------------------------
  18.   # ● 初始化对像
  19.   #--------------------------------------------------------------------------
  20.   def initialize
  21.     super(320-50, 0, 320+50,416)
  22.     self.contents = Bitmap.new(width - 32, height - 32)
  23.     if $game_temp.in_battle
  24.       self.height = 256+64
  25.       self.back_opacity = 160
  26.     end
  27.   end   
  28.   #--------------------------------------------------------------------------
  29.   # ● 设置文本
  30.   #     text  : 窗口显示的字符串
  31.   #     align : 对齐方式 (0..左对齐、1..中间对齐、2..右对齐)
  32.   #--------------------------------------------------------------------------
  33.   def set_text(skill)
  34.     if skill !=nil
  35.       fontsize=18        #定义文字大小
  36.       infx=100           #定义说明文字左边内容的宽度
  37.       y=20               #定义行距
  38.       self.contents.clear
  39.       self.contents.font.color = normal_color
  40.       self.contents.font.size = fontsize
  41.       xx=0
  42.       yy=0
  43.       yy = -160 if $skill_second_page
  44.       s=[]
  45.       s=skill.description.scan(/./)
  46.       space = self.contents.text_size(" ").width
  47.       #一行显示21个字
  48.       for i in s
  49.         sss = self.contents.text_size(i)
  50.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  51.           yy+=y
  52.           xx=4
  53.         end
  54.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  55.         xx+=sss.width
  56.       end
  57.       self.contents.font.size = fontsize
  58.       #-------------------------------------------------------------------
  59.       #描画技能类型
  60.       #-------------------------------------------------------------------
  61.           hurt_flag = false
  62.           curse_flag = false
  63.           heal_flag = false
  64.           cure_flag = false
  65.         if skill.common_event_id > 0
  66.           the_event = Game_CommonEvent.new(skill.common_event_id)
  67.           for i in the_event.list
  68.             the_parameters = i.parameters
  69.             the_code = i.code
  70.             case the_code
  71.               when 331
  72.                 if the_parameters[1] == 1
  73.                   hurt_flag = true
  74.                 end
  75.               when 332
  76.                 if the_parameters[1] == 1
  77.                   hurt_flag = true
  78.                 end
  79.               when 338
  80.                 if the_parameters[0] == 0
  81.                   hurt_flag = true
  82.                 end
  83.                 if the_parameters[0] == 1
  84.                   heal_flag = true
  85.                 end
  86.               when 333
  87.                 curse_flag = true
  88.               when 311
  89.                 if the_parameters[1] == 0
  90.                   heal_flag = true
  91.                 end
  92.               when 312
  93.                 if the_parameters[1] == 0
  94.                   heal_flag = true
  95.                 end
  96.               when 313
  97.                 cure_flag = true
  98.             end
  99.           end
  100.         end
  101.         
  102.         xx=0
  103.         yy+=y
  104.         self.contents.font.color = system_color
  105.         self.contents.draw_text(xx, yy, infx, sss.height, "技能类型")
  106.         xx = infx
  107.         if skill.occasion == 3
  108.           self.contents.font.color = normal_color
  109.           self.contents.draw_text(xx, yy, 40, sss.height, "被动")
  110.           xx += 40
  111.         end
  112.         if skill.scope == 1 || skill.scope == 2
  113.           if skill.atk_f > 0
  114.             self.contents.font.color = Color.new(220, 20, 60, 255)
  115.             self.contents.draw_text(xx, yy, 40, sss.height, "物理")
  116.             xx += 40   
  117.           elsif skill.power > 0
  118.             self.contents.font.color = Color.new(0, 191, 255, 255)
  119.             self.contents.draw_text(xx, yy, 40, sss.height, "魔法")
  120.             xx += 40
  121.           end
  122.      #     if skill.plus_state_set.size > 0 or skill.minus_state_set.size > 0 or curse_flag
  123.      #       self.contents.font.color = Color.new(128, 0, 128, 255)
  124.      #       self.contents.draw_text(xx, yy, 40, sss.height, "妨害")
  125.      #       xx += 40
  126.      #     end
  127.         end
  128.         if skill.scope >= 3 and skill.scope <= 7
  129.           if skill.atk_f < 0 or skill.power < 0 or heal_flag
  130.             self.contents.font.color = Color.new(50, 205, 50, 255)
  131.             self.contents.draw_text(xx, yy, 40, sss.height, "恢复")
  132.             xx += 40
  133.           end
  134.      #     if skill.plus_state_set.size > 0 or skill.minus_state_set.size > 0 or cure_flag
  135.      #       self.contents.font.color = Color.new(72, 209, 204, 255)
  136.      #       self.contents.draw_text(xx, yy, 40, sss.height, "祝福")
  137.      #       xx += 40
  138.      #     end
  139.         end
  140.       #  if skill.common_event_id > 0
  141.       #    if hurt_flag
  142.       #    self.contents.font.color = Color.new(255, 69, 0, 255)
  143.       #    self.contents.draw_text(xx, yy, 40, sss.height, "特殊")
  144.       #    xx += 40
  145.       #    end
  146.       #  end
  147.         if xx == 100
  148.           self.contents.font.color = disabled_color
  149.           self.contents.draw_text(xx, yy, 58, sss.height, "未分类")
  150.           xx += 58
  151.         end
  152.       #-------------------------------------------------------------------
  153.       #描画使用场合
  154.       #-------------------------------------------------------------------
  155.      # if skill.occasion != 3
  156.      #   xx=0
  157.      #   yy+=y
  158.      #   self.contents.font.color=system_color
  159.      #   self.contents.draw_text(xx, yy, infx, sss.height, "使用时机")
  160.      #   xx=infx
  161.      #   case skill.occasion
  162.      #     when 0
  163.      #       i="任何时候"
  164.      #     when 1
  165.      #       i="仅战斗中"
  166.      #     when 2
  167.      #       i="仅菜单中"
  168.      #   end
  169.         self.contents.font.color=normal_color
  170.         self.contents.draw_text(xx, yy, infx, sss.height, i)
  171.       #-------------------------------------------------------------------
  172.       #描画效果范围
  173.       #-------------------------------------------------------------------
  174.       xx=0
  175.       yy+=y
  176.       self.contents.font.color=system_color
  177.       self.contents.draw_text(xx, yy, infx, sss.height, "效果范围")
  178.       xx=infx                                 
  179.       self.contents.font.color=normal_color
  180.       case skill.scope
  181.         when 0
  182.           i="无"
  183.         when 1
  184.           i="敌方单体"
  185.         when 2
  186.           i="敌方全体"
  187.         when 3
  188.           i="我方单体"
  189.         when 4
  190.           i="我方全体"
  191.         when 5
  192.           i="我方战斗不能单体"
  193.         when 6
  194.           i="我方战斗不能全体"
  195.         when 7
  196.           i="自身"
  197.       end
  198.       self.contents.draw_text(xx, yy, infx, sss.height, i)
  199.     #---------------------------------------------------------------------------
  200.     #伤害估算
  201.     #---------------------------------------------------------------------------
  202.       if $game_temp.in_battle
  203.       xx = 0
  204.       yy += y
  205.       #--------------------------------------------------
  206.       #求对敌人伤害
  207.       #--------------------------------------------------
  208.       x_powers = 0
  209.       x_user = $active_now
  210.       if skill.scope == 1 or skill.scope == 2
  211.         self.contents.font.color=system_color
  212.         self.contents.draw_text(xx, yy, 100, sss.height, "预计威力")
  213.         enemies_court = 0
  214.         for x_enemy in $game_troop.enemies
  215.         if x_enemy.is_a?(Game_Enemy)
  216.         x_power = skill.power + x_user.atk * skill.atk_f / 100
  217.         if x_power > 0
  218.        # x_power -= x_enemy.pdef * skill.pdef_f / 200
  219.        # x_power -= x_enemy.mdef * skill.mdef_f / 200
  220.         x_power = [x_power, 0].max
  221.         end
  222.         rate = 1.0
  223.         rate += (x_user.str * skill.str_f / 2000)
  224.         rate += (x_user.dex * skill.dex_f / 2000)
  225.         rate += (x_user.agi * skill.agi_f / 2000)
  226.         rate += (x_user.int * skill.int_f / 2000)
  227.         x_power *= rate
  228.         x_power *= x_enemy.elements_correct(skill.element_set).to_f
  229.         x_power /= 100.0
  230.         if x_power > 0
  231.         if x_enemy.guarding?
  232.           x_power /= 2
  233.         end
  234.         end
  235.         x_powers += x_power
  236.         enemies_court += 1
  237.         end
  238.       end
  239.       out_power = enemies_court == 0 ? 0 : (x_powers / enemies_court)
  240.       out_power_max = out_power * (100 + skill.variance) / 100.0
  241.       out_power_max = out_power_max.to_i
  242.       out_power_min = out_power * (100 - skill.variance) / 100.0
  243.       out_power_min = out_power_min.to_i
  244.       xx = 100
  245.       #------------------------------------------------------------------------
  246.       #------------------------------------------------------------------------
  247.       self.draw_text_add(xx-1, yy-1, 100, sss.height, out_power_min.to_s + " - " + out_power_max.to_s,255,20,147,255)
  248.       #-----------------------------------------------------------------------------
  249.       #求对自己的恢复量
  250.       #-----------------------------------------------------------------------------
  251.       elsif skill.scope >= 3
  252.         self.contents.font.color=Color.new(0,255,0,255)
  253.         self.contents.draw_text(xx, yy, 100, sss.height, "预计恢复")
  254.         actors_court = 0
  255.         for x_actor in $game_party.actors
  256.          if x_actor.is_a?(Game_Actor)
  257.          x_power = skill.power + x_user.atk * skill.atk_f / 100
  258.           if x_power > 0
  259.        #    x_power -= x_actor.pdef * skill.pdef_f / 200
  260.        #    x_power -= x_actor.mdef * skill.mdef_f / 200
  261.            x_power = [x_power, 0].max
  262.           end
  263.          rate = 1.0
  264.          rate += (x_user.str * skill.str_f / 2000)
  265.          rate += (x_user.dex * skill.dex_f / 2000)
  266.          rate += (x_user.agi * skill.agi_f / 2000)
  267.          rate += (x_user.int * skill.int_f / 2000)
  268.          x_power *= rate
  269.          x_power *= x_actor.elements_correct(skill.element_set).to_f
  270.          x_power /= 100.0
  271.          x_powers += x_power
  272.          actors_court += 1
  273.          end
  274.         end
  275.       out_power = actors_court == 0 ? 0 : (x_powers / actors_court)
  276.       out_power_max = out_power * (100 + skill.variance) / 100.0
  277.       out_power_max = - out_power_max.to_i
  278.       out_power_min = out_power * (100 - skill.variance) / 100.0
  279.       out_power_min = - out_power_min.to_i
  280.       xx = 100
  281.       self.draw_text_add(xx, yy, 100, sss.height, out_power_min.to_s + " - " + out_power_max.to_s,127,255,0,255)
  282.     end
  283.     #--------------------------------------------------------------------
  284.     #计算命中率
  285.     #--------------------------------------------------------------------
  286.     if skill.scope == 1 or skill.scope == 2
  287.     xx = 200
  288.     self.contents.font.color=system_color
  289.     self.contents.draw_text(xx, yy, 75, sss.height, "结算命中")
  290.     xx += 75
  291.     hit = skill.hit
  292.     hit *= x_user.hit / 100
  293.     s_hits = 0
  294.     enemies_court = 0
  295.     for x_enemy in $game_troop.enemies
  296.       eva = 8 * x_enemy.agi / x_user.dex + x_enemy.eva
  297.       s_hit = 100 - eva * skill.eva_f / 100
  298.       s_hit = x_enemy.cant_evade? ? 100 : s_hit
  299.       s_hits += s_hit * hit / 100
  300.       enemies_court += 1
  301.     end
  302.     hit = enemies_court ? (s_hits / enemies_court) : 0
  303.     hit = [[hit.to_i,100].min,0].max
  304.     self.draw_text_add(xx, yy, 100, sss.height, hit.to_s + "%",193,255,193,255)
  305.     end
  306.     xx=0
  307.     yy+=y
  308.     yy+=2
  309.     self.contents.font.color=system_color
  310.     self.contents.draw_text(xx, yy, infx, sss.height, "平均")
  311.     xx+=infx
  312.     self.contents.font.size = 22
  313.       if skill.scope == 1 or skill.scope == 2
  314.         self.contents.font.color=Color.new(255,215,0,255)
  315.         self.contents.draw_text(xx, yy, infx, 22,(out_power * hit /100).to_i.to_s)
  316.       elsif skill.scope >= 3
  317.         self.contents.font.color=Color.new(255,215,0,255)
  318.         self.contents.draw_text(xx, yy, infx, 22,out_power.to_i.to_s)
  319.       end
  320.     yy+=2
  321.     end
  322.     #--------------------------------------------------------------------
  323.     #描画基础威力
  324.     #--------------------------------------------------------------------
  325.       xx=0
  326.       yy+=y
  327.       self.contents.font.size = fontsize
  328.       self.contents.font.color=system_color
  329.       self.contents.draw_text(xx, yy, infx, sss.height, "基本威力")
  330.       xx=infx
  331.       self.contents.font.color=normal_color
  332.       self.contents.draw_text(xx, yy, infx*2, sss.height, skill.power.to_s)
  333.     #--------------------------------------------------------------------
  334.     #描画攻击计算依据
  335.     #--------------------------------------------------------------------
  336.     if skill.atk_f + skill.power != 0
  337.       xx=0
  338.       yy+=y
  339.       self.contents.font.color=system_color
  340.       self.contents.draw_text(xx, yy, infx, sss.height, "属性参数")
  341.       xx=infx
  342.       self.contents.font.color=normal_color
  343.       infx = 54
  344.       if skill.atk_f != 0
  345.         self.contents.draw_text(xx, yy, infx, sss.height, "| ATK " )
  346.         xx += infx
  347.       end
  348.       if skill.str_f != 0
  349.         self.contents.draw_text(xx, yy, infx, sss.height, "| STR " )
  350.         xx += infx
  351.       end
  352.       if skill.dex_f != 0
  353.         self.contents.draw_text(xx, yy, infx, sss.height, "| DEX " )
  354.         xx += infx
  355.       end
  356.       if skill.agi_f != 0
  357.         self.contents.draw_text(xx, yy, infx, sss.height, "| AGI " )
  358.         xx += infx
  359.       end
  360.       if skill.int_f != 0
  361.         self.contents.draw_text(xx, yy, infx, sss.height, "| INT " )
  362.         xx += infx
  363.       end
  364.         self.contents.draw_text(xx, yy, infx, sss.height, "|" )
  365.       xx = 100
  366.       yy += 10
  367.       if skill.atk_f != 0
  368.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  369.         xx += infx
  370.       end
  371.       if skill.str_f != 0
  372.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  373.         xx += infx
  374.       end
  375.       if skill.dex_f != 0
  376.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  377.         xx += infx
  378.       end
  379.       if skill.agi_f != 0
  380.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  381.         xx += infx
  382.       end
  383.       if skill.int_f != 0
  384.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  385.         xx += infx
  386.       end
  387.         self.contents.draw_text(xx, yy, infx, sss.height, "|" )
  388.       xx = 100
  389.       yy += 10
  390.       if skill.atk_f != 0
  391.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + skill.atk_f.to_s + " ")
  392.         xx += infx
  393.       end
  394.       if skill.str_f != 0
  395.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + skill.str_f.to_s + " " )
  396.         xx += infx
  397.       end
  398.       if skill.dex_f != 0
  399.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + skill.dex_f.to_s + " " )
  400.         xx += infx
  401.       end
  402.       if skill.agi_f != 0
  403.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + skill.agi_f.to_s + " ")
  404.         xx += infx
  405.       end
  406.       if skill.int_f != 0
  407.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + skill.int_f.to_s + " " )
  408.         xx += infx
  409.       end
  410.         self.contents.draw_text(xx, yy, infx, sss.height, "|" )
  411.       if $game_temp.in_battle
  412.       xx=100
  413.       yy += 10
  414.       self.contents.font.color=normal_color
  415.       if skill.atk_f != 0
  416.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  417.         xx += infx
  418.       end
  419.       if skill.str_f != 0
  420.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  421.         xx += infx
  422.       end
  423.       if skill.dex_f != 0
  424.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  425.         xx += infx
  426.       end
  427.       if skill.agi_f != 0
  428.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  429.         xx += infx
  430.       end
  431.       if skill.int_f != 0
  432.         self.contents.draw_text(xx, yy, infx, sss.height, "|  ")
  433.         xx += infx
  434.       end
  435.         self.contents.draw_text(xx, yy, infx, sss.height, "|" )
  436.       xx=0
  437.       yy+=10
  438.       self.contents.font.color=system_color
  439.       self.contents.draw_text(xx, yy, 100, sss.height, "角色属性")
  440.       xx = 100
  441.       self.contents.font.color=normal_color
  442.       if skill.atk_f != 0
  443.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + $active_now.atk.to_s + " ")
  444.         xx += infx
  445.       end
  446.       if skill.str_f != 0
  447.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + $active_now.str.to_s + " " )
  448.         xx += infx
  449.       end
  450.       if skill.dex_f != 0
  451.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + $active_now.dex.to_s + " " )
  452.         xx += infx
  453.       end
  454.       if skill.agi_f != 0
  455.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + $active_now.agi.to_s + " ")
  456.         xx += infx
  457.       end
  458.       if skill.int_f != 0
  459.         self.contents.draw_text(xx, yy, infx, sss.height, "| " + $active_now.int.to_s + " " )
  460.         xx += infx
  461.       end
  462.         self.contents.draw_text(xx, yy, infx, sss.height, "|" )
  463.       end
  464.       end
  465.       #-----------------------------------------------------------------------------
  466.       #防御计算值
  467.       #-----------------------------------------------------------------------------
  468.       infx = 100
  469.       xx = 0
  470.       yy += y
  471.       self.contents.font.color=system_color
  472.       self.contents.draw_text(xx, yy, infx, sss.height, "伤害类型")
  473.       xx=infx
  474.       self.contents.font.color=normal_color
  475.       if skill.pdef_f == 0 and skill.mdef_f != 0
  476.       self.contents.draw_text(xx, yy, infx, sss.height, "[魔法]")
  477.       elsif skill.pdef_f != 0 and skill.mdef_f == 0
  478.       self.contents.draw_text(xx, yy, infx, sss.height, "[物理]")
  479.       elsif skill.pdef_f != 0 and skill.mdef_f != 0
  480.       self.contents.draw_text(xx, yy, infx, sss.height, "[混合]")
  481.       elsif skill.pdef_f == 0 and skill.mdef_f == 0
  482.       self.contents.draw_text(xx, yy, infx, sss.height, "[无视防御]")
  483.       end
  484.       #-----------------------------------------------------------------------
  485.       #波动度
  486.       #-----------------------------------------------------------------------
  487.       unless $game_temp.in_battle
  488.         xx=0
  489.         yy+=y
  490.         self.contents.font.color=system_color
  491.         self.contents.draw_text(xx, yy, infx, sss.height, "威力波动度")
  492.         xx=infx
  493.         self.contents.font.color=normal_color
  494.         self.contents.draw_text(xx, yy, infx*2, sss.height, skill.variance.to_s)
  495.       #-----------------------------------------------------------------------
  496.       #基本命中率
  497.       #-----------------------------------------------------------------------
  498.         xx=0
  499.         yy+=y
  500.         self.contents.font.color=system_color
  501.         self.contents.draw_text(xx, yy, infx, sss.height, "基础命中")
  502.         xx=infx
  503.         self.contents.font.color=normal_color
  504.         self.contents.draw_text(xx, yy, infx, sss.height, skill.hit.to_s)
  505.         xx+=45
  506.         if skill.eva_f != 100
  507.           self.contents.font.color=system_color
  508.           self.contents.draw_text(xx, yy, 90, sss.height, "无视百分之")
  509.           xx+=90
  510.           self.contents.font.color=normal_color
  511.           self.contents.draw_text(xx, yy, 36, sss.height, (100 - skill.eva_f).to_s)
  512.           xx+=36
  513.           self.contents.font.color=system_color
  514.           self.contents.draw_text(xx, yy, 36, sss.height, "回避")
  515.         end
  516.       end
  517.   
  518.       #-----------------------------------------------------------------------
  519.       xx=0
  520.       yy+=y
  521.       element=""
  522.       for i in skill.element_set
  523.         if i <= 17
  524.           element =element+" "+$data_system.elements[i]
  525.         end
  526.       end
  527.       self.contents.font.color=system_color
  528.       self.contents.draw_text(xx, yy, infx, sss.height, "技能属性")
  529.       xx=infx-space
  530.       self.contents.font.color=normal_color
  531.       s=[]
  532.       s=element.scan(/./)
  533.       #一行显示21个字
  534.       for i in s
  535.         sss = self.contents.text_size(i)
  536.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  537.           yy+=y
  538.           xx=infx
  539.         end
  540.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  541.         xx+=sss.width
  542.       end
  543.       xx=0
  544.       yy+=y
  545.       race=""
  546.       for i in skill.plus_state_set
  547.           race += "["+$data_states[i].name+"]" if $data_states[i].name != ""
  548.       end
  549.       self.contents.font.color=system_color
  550.       self.contents.draw_text(xx, yy, infx, sss.height, "附加状态")
  551.       xx=infx
  552.       self.contents.font.color=normal_color
  553.       s=[]
  554.       s=race.scan(/./)
  555.       #一行显示21个字
  556.       for i in s
  557.         sss = self.contents.text_size(i)
  558.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  559.           yy+=y
  560.           xx=infx
  561.         end
  562.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  563.         xx+=sss.width
  564.       end
  565.       xx=0
  566.       yy+=y
  567.       race=""
  568.       for i in skill.minus_state_set
  569.           race += "["+$data_states[i].name+"]" if $data_states[i].name != ""
  570.       end
  571.       self.contents.font.color=system_color
  572.       self.contents.draw_text(xx, yy, infx, sss.height, "解除状态")
  573.       xx=infx
  574.       self.contents.font.color=normal_color
  575.       s=[]
  576.       s=race.scan(/./)
  577.       #一行显示21个字
  578.       for i in s
  579.         sss = self.contents.text_size(i)
  580.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  581.           yy+=y
  582.           xx=infx
  583.         end
  584.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  585.         xx+=sss.width
  586.       end
  587.       @actor = nil
  588.     end
  589.     end
  590.     self.visible = true
  591.   end
  592.   def draw_text_add(xx,yy,width,height,i,red,green,blue,gray)
  593.       self.contents.font.color = Color.new(0,0,0,255)
  594.       self.contents.draw_text(xx-1, yy-1,width,height,i)
  595.       self.contents.draw_text(xx, yy-1,width,height,i)
  596.       self.contents.draw_text(xx+1, yy-1,width,height,i)
  597.       self.contents.draw_text(xx-1, yy,width,height,i)
  598.       self.contents.draw_text(xx+1, yy,width,height,i)
  599.       self.contents.draw_text(xx-1, yy+1,width,height,i)
  600.       self.contents.draw_text(xx, yy+1,width,height,i)
  601.       self.contents.draw_text(xx+1, yy+1,width,height,i)
  602.       self.contents.font.color = Color.new(red,green,blue,gray)
  603.       self.contents.draw_text(xx, yy,width,height,i)
  604.     end
  605. end
复制代码

如何使这个技能信息显示脚本中“预计威力”部分显示:
如果某个技能设置了公共事件 并且 变量1(伤害计算)不等于0
威力部分显示变量1(伤害计算)
梦石
0
星屑
1442
在线时间
328 小时
注册时间
2016-4-4
回帖
126

开拓者

 楼主| 发表于 2016-7-27 13:40:46 | 显示全部楼层
没人么
回复

使用道具 举报

梦石
0
星屑
1442
在线时间
328 小时
注册时间
2016-4-4
回帖
126

开拓者

 楼主| 发表于 2016-7-27 23:04:23 | 显示全部楼层
没人回答orz
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部