设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1049|回复: 2
打印 上一主题 下一主题

[已经解决] 血条与彩虹神剑的冲突

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
45 小时
注册时间
2011-11-26
帖子
90
跳转到指定楼层
1
发表于 2012-1-20 19:56:21 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
本帖最后由 wxj541374210 于 2012-1-20 20:06 编辑

我弄了个血条和彩虹神剑的脚本,血条如下
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. # HP/SP/EXPゲージ表示スクリプト Ver 1.00
  5. # 配布元・サポートURL
  6. # http://members.jcom.home.ne.jp/cogwheel/

  7. #==============================================================================
  8. # ■ Game_Actor
  9. #------------------------------------------------------------------------------
  10. #  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
  11. # の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
  12. #==============================================================================

  13. class Game_Actor < Game_Battler
  14.   def now_exp
  15.     return @exp - @exp_list[@level]
  16.   end
  17.   def next_exp
  18.     return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  19.   end
  20. end

  21. #==============================================================================
  22. # ■ Window_Base
  23. #------------------------------------------------------------------------------
  24. #  ゲーム中のすべてのウィンドウのスーパークラスです。
  25. #==============================================================================

  26. class Window_Base < Window
  27.   #--------------------------------------------------------------------------
  28.   # ● HP ゲージの描画
  29.   #--------------------------------------------------------------------------
  30.   # オリジナルのHP描画を draw_actor_hp_original と名前変更
  31.   alias :draw_actor_hp_original :draw_actor_hp
  32.    def draw_actor_hp(actor, x, y, width = 144)
  33.     # 変数rateに 現在のHP/MHPを代入
  34.     if actor.maxhp != 0
  35.       rate = actor.hp.to_f / actor.maxhp
  36.     else
  37.       rate = 0
  38.     end
  39.     # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  40.     # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  41.     # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  42.     # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  43.     # align3:ゲージタイプ 0:左詰め 1:右詰め
  44.     plus_x = 0
  45.     rate_x = 0
  46.     plus_y = 25
  47.     plus_width = 0
  48.     rate_width = 100
  49.     height = 10
  50.     align1 = 1
  51.     align2 = 2
  52.     align3 = 0
  53.     # グラデーション設定 grade1:空ゲージ grade2:実ゲージ
  54.     # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
  55.     grade1 = 1
  56.     grade2 = 0
  57.     # 色設定。color1:外枠,color2:中枠
  58.     # color3:空ゲージダークカラー,color4:空ゲージライトカラー
  59.     # color5:実ゲージダークカラー,color6:実ゲージライトカラー
  60.     color1 = Color.new(0, 0, 0, 192)
  61.     color2 = Color.new(255, 255, 192, 192)
  62.     color3 = Color.new(0, 0, 0, 192)
  63.     color4 = Color.new(64, 0, 0, 192)
  64.     color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
  65.     color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
  66.     # 変数spに描画するゲージの幅を代入
  67.     if actor.maxhp != 0
  68.       hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
  69.     else
  70.       hp = 0
  71.     end
  72.     # ゲージの描画
  73.     gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
  74.                 width, plus_width + width * rate_width / 100,
  75.                 height, hp, align1, align2, align3,
  76.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  77.     # オリジナルのHP描画処理を呼び出し
  78.     draw_actor_hp_original(actor, x, y, width)
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # ● SP ゲージの描画
  82.   #--------------------------------------------------------------------------
  83.   # オリジナルのSP描画を draw_actor_sp_original と名前変更
  84.   alias :draw_actor_sp_original :draw_actor_sp
  85.   def draw_actor_sp(actor, x, y, width = 144)
  86.     # 変数rateに 現在のSP/MSPを代入
  87.     if actor.maxsp != 0
  88.       rate = actor.sp.to_f / actor.maxsp
  89.     else
  90.       rate = 1
  91.     end
  92.     # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  93.     # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  94.     # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  95.     # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  96.     # align3:ゲージタイプ 0:左詰め 1:右詰め
  97.     plus_x = 0
  98.     rate_x = 0
  99.     plus_y = 25
  100.     plus_width = 0
  101.     rate_width = 100
  102.     height = 10
  103.     align1 = 1
  104.     align2 = 2
  105.     align3 = 0
  106.     # グラデーション設定 grade1:空ゲージ grade2:実ゲージ
  107.     # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
  108.     grade1 = 1
  109.     grade2 = 0
  110.     # 色設定。color1:外枠,color2:中枠
  111.     # color3:空ゲージダークカラー,color4:空ゲージライトカラー
  112.     # color5:実ゲージダークカラー,color6:実ゲージライトカラー
  113.     color1 = Color.new(0, 0, 0, 192)
  114.     color2 = Color.new(255, 255, 192, 192)
  115.     color3 = Color.new(0, 0, 0, 192)
  116.     color4 = Color.new(0, 64, 0, 192)
  117.     color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
  118.     color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
  119.     # 変数spに描画するゲージの幅を代入
  120.     if actor.maxsp != 0
  121.       sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
  122.     else
  123.       sp = (width + plus_width) * rate_width / 100
  124.     end
  125.     # ゲージの描画
  126.     gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
  127.                 width, plus_width + width * rate_width / 100,
  128.                 height, sp, align1, align2, align3,
  129.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  130.     # オリジナルのSP描画処理を呼び出し
  131.     draw_actor_sp_original(actor, x, y, width)
  132.   end
  133.   #--------------------------------------------------------------------------
  134.   # ● EXP ゲージの描画
  135.   #--------------------------------------------------------------------------
  136.   # オリジナルのEXP描画を draw_actor_sp_original と名前変更
  137.   alias :draw_actor_exp_original :draw_actor_exp
  138.   def draw_actor_exp(actor, x, y, width = 204)
  139.     # 変数rateに 現在のexp/nextexpを代入
  140.     if actor.next_exp != 0
  141.       rate = actor.now_exp.to_f / actor.next_exp
  142.     else
  143.       rate = 1
  144.     end
  145.     # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  146.     # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  147.     # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  148.     # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  149.     # align3:ゲージタイプ 0:左詰め 1:右詰め
  150.     plus_x = 0
  151.     rate_x = 0
  152.     plus_y = 25
  153.     plus_width = 0
  154.     rate_width = 100
  155.     height = 10
  156.     align1 = 1
  157.     align2 = 2
  158.     align3 = 0
  159.     # グラデーション設定 grade1:空ゲージ grade2:実ゲージ
  160.     # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
  161.     grade1 = 1
  162.     grade2 = 0
  163.     # 色設定。color1:外枠,color2:中枠
  164.     # color3:空ゲージダークカラー,color4:空ゲージライトカラー
  165.     # color5:実ゲージダークカラー,color6:実ゲージライトカラー
  166.     color1 = Color.new(0, 0, 0, 192)
  167.     color2 = Color.new(255, 255, 192, 192)
  168.     color3 = Color.new(0, 0, 0, 192)
  169.     color4 = Color.new(64, 0, 0, 192)
  170.     color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
  171.     color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
  172.     # 変数expに描画するゲージの幅を代入
  173.     if actor.next_exp != 0
  174.       exp = (width + plus_width) * actor.now_exp * rate_width /
  175.                                                           100 / actor.next_exp
  176.     else
  177.       exp = (width + plus_width) * rate_width / 100
  178.     end
  179.     # ゲージの描画
  180.     gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
  181.                 width, plus_width + width * rate_width / 100,
  182.                 height, exp, align1, align2, align3,
  183.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  184.     # オリジナルのEXP描画処理を呼び出し
  185.     draw_actor_exp_original(actor, x, y)
  186.   end
  187.   #--------------------------------------------------------------------------
  188.   # ● 延迟时间描画
  189.   #--------------------------------------------------------------------------
  190.   def draw_actor_delay_time(actor, x, y, width = 144)
  191.     # 変数rateに 現在のSP/MSPを代入
  192.     if actor.delay_time_max != 0
  193.       rate = actor.delay_time.to_f / actor.delay_time_max
  194.     else
  195.       rate = 0
  196.     end
  197.     # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  198.     # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  199.     # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  200.     # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  201.     # align3:ゲージタイプ 0:左詰め 1:右詰め
  202.     plus_x = 0
  203.     rate_x = 0
  204.     plus_y = 25
  205.     plus_width = 0
  206.     rate_width = 100
  207.     height = 10
  208.     align1 = 1
  209.     align2 = 2
  210.     align3 = 0
  211.     # グラデーション設定 grade1:空ゲージ grade2:実ゲージ
  212.     # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
  213.     grade1 = 1
  214.     grade2 = 0
  215.     # 色設定。color1:外枠,color2:中枠
  216.     # color3:空ゲージダークカラー,color4:空ゲージライトカラー
  217.     # color5:実ゲージダークカラー,color6:実ゲージライトカラー
  218.     color1 = Color.new(0, 0, 0, 192)
  219.     color2 = Color.new(255, 255, 192, 192)
  220.     color3 = Color.new(0, 0, 0, 192)
  221.     color4 = Color.new(0, 64, 0, 192)
  222.     color5 = Color.new(100 * rate, 100 * rate, 0, 192)
  223.     color6 = Color.new(255 * rate, 255 * rate, 0, 192)
  224.     # 変数spに描画するゲージの幅を代入
  225.     if actor.delay_time_max != 0
  226.       sp = (width + plus_width) * actor.delay_time * rate_width / 100 / actor.delay_time_max
  227.     else
  228.       sp = (width + plus_width) * rate_width / 100
  229.     end
  230.     # ゲージの描画
  231.     gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
  232.                 width, plus_width + width * rate_width / 100,
  233.                 height, sp, align1, align2, align3,
  234.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  235.     # 描绘字符串 "行动时间"
  236.     self.contents.font.color = system_color
  237.     self.contents.font.size = 20
  238.     self.contents.draw_text(x, y, 120, 32, 'Delay')
  239.     self.contents.font.color = normal_color
  240.     self.contents.draw_text(x, y, 120, 32, actor.delay_time.to_s, 2)
  241.   end
  242.   #--------------------------------------------------------------------------
  243.   # ● 咏唱时间描画
  244.   #--------------------------------------------------------------------------
  245.   def draw_actor_casting_time(actor, x, y, width = 144)
  246.     # 変数rateに 現在のSP/MSPを代入
  247.     time = actor.casting_time_max - actor.casting_time
  248.     if actor.casting_time_max != 0
  249.       rate = time.to_f / actor.casting_time_max
  250.     else
  251.       rate = 0
  252.     end
  253.     # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  254.     # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  255.     # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  256.     # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  257.     # align3:ゲージタイプ 0:左詰め 1:右詰め
  258.     plus_x = 0
  259.     rate_x = 0
  260.     plus_y = 25
  261.     plus_width = 0
  262.     rate_width = 100
  263.     height = 10
  264.     align1 = 1
  265.     align2 = 2
  266.     align3 = 0
  267.     # グラデーション設定 grade1:空ゲージ grade2:実ゲージ
  268.     # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
  269.     grade1 = 1
  270.     grade2 = 0
  271.     # 色設定。color1:外枠,color2:中枠
  272.     # color3:空ゲージダークカラー,color4:空ゲージライトカラー
  273.     # color5:実ゲージダークカラー,color6:実ゲージライトカラー
  274.     color1 = Color.new(0, 0, 0, 192)
  275.     color2 = Color.new(255, 255, 192, 192)
  276.     color3 = Color.new(0, 0, 0, 192)
  277.     color4 = Color.new(0, 64, 0, 192)
  278.     color5 = Color.new(100 * rate, 100 * rate, 0, 192)
  279.     color6 = Color.new(255 * rate, 255 * rate, 0, 192)
  280.     # 変数spに描画するゲージの幅を代入
  281.     if actor.casting_time_max != 0
  282.       sp = (width + plus_width) * time * rate_width / 100 / actor.casting_time_max
  283.     else
  284.       sp = (width + plus_width) * rate_width / 100
  285.     end
  286.     # ゲージの描画
  287.     gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
  288.                 width, plus_width + width * rate_width / 100,
  289.                 height, sp, align1, align2, align3,
  290.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  291.     # 描绘字符串 "行动时间"
  292.     self.contents.font.color = system_color
  293.     self.contents.font.size = 20
  294.     self.contents.draw_text(x, y, 120, 32, 'Cast')
  295.     self.contents.font.color = normal_color
  296.     self.contents.draw_text(x, y, 120, 32, time.to_s, 2)
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● ゲージの描画
  300.   #--------------------------------------------------------------------------
  301.   def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
  302.                 color1, color2, color3, color4, color5, color6, grade1, grade2)
  303.     case align1
  304.     when 1
  305.       x += (rect_width - width) / 2
  306.     when 2
  307.       x += rect_width - width
  308.     end
  309.     case align2
  310.     when 1
  311.       y -= height / 2
  312.     when 2
  313.       y -= height
  314.     end
  315.     # 枠描画
  316.     self.contents.fill_rect(x, y, width, height, color1)
  317.     self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
  318.     if align3 == 0
  319.       if grade1 == 2
  320.         grade1 = 3
  321.       end
  322.       if grade2 == 2
  323.         grade2 = 3
  324.       end
  325.     end
  326.     if (align3 == 1 and grade1 == 0) or grade1 > 0
  327.       color = color3
  328.       color3 = color4
  329.       color4 = color
  330.     end
  331.     if (align3 == 1 and grade2 == 0) or grade2 > 0
  332.       color = color5
  333.       color5 = color6
  334.       color6 = color
  335.     end
  336.     # 空ゲージの描画
  337.     self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
  338.                                   color3, color4, grade1)
  339.     if align3 == 1
  340.       x += width - gauge
  341.     end
  342.     # 実ゲージの描画
  343.     self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
  344.                                   color5, color6, grade2)
  345.   end
  346. end

  347. #------------------------------------------------------------------------------
  348. #  Bitmapクラスに新たな機能を追加します。
  349. #==============================================================================

  350. class Bitmap
  351.   #--------------------------------------------------------------------------
  352.   # ● 矩形をグラデーション表示
  353.   #     color1 : スタートカラー
  354.   #     color2 : エンドカラー
  355.   #     align  :  0:横にグラデーション
  356.   #               1:縦にグラデーション
  357.   #               2:斜めにグラデーション(激重につき注意)
  358.   #--------------------------------------------------------------------------
  359.   def gradation_rect(x, y, width, height, color1, color2, align = 0)
  360.     if align == 0
  361.       for i in x...x + width
  362.         red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
  363.         green = color1.green +
  364.                 (color2.green - color1.green) * (i - x) / (width - 1)
  365.         blue  = color1.blue +
  366.                 (color2.blue - color1.blue) * (i - x) / (width - 1)
  367.         alpha = color1.alpha +
  368.                 (color2.alpha - color1.alpha) * (i - x) / (width - 1)
  369.         color = Color.new(red, green, blue, alpha)
  370.         fill_rect(i, y, 1, height, color)
  371.       end
  372.     elsif align == 1
  373.       for i in y...y + height
  374.         red   = color1.red +
  375.                 (color2.red - color1.red) * (i - y) / (height - 1)
  376.         green = color1.green +
  377.                 (color2.green - color1.green) * (i - y) / (height - 1)
  378.         blue  = color1.blue +
  379.                 (color2.blue - color1.blue) * (i - y) / (height - 1)
  380.         alpha = color1.alpha +
  381.                 (color2.alpha - color1.alpha) * (i - y) / (height - 1)
  382.         color = Color.new(red, green, blue, alpha)
  383.         fill_rect(x, i, width, 1, color)
  384.       end
  385.     elsif align == 2
  386.       for i in x...x + width
  387.         for j in y...y + height
  388.           red   = color1.red + (color2.red - color1.red) *
  389.                   ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  390.           green = color1.green + (color2.green - color1.green) *
  391.                   ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  392.           blue  = color1.blue + (color2.blue - color1.blue) *
  393.                   ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  394.           alpha = color1.alpha + (color2.alpha - color1.alpha) *
  395.                   ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  396.           color = Color.new(red, green, blue, alpha)
  397.           set_pixel(i, j, color)
  398.         end
  399.       end
  400.     elsif align == 3
  401.       for i in x...x + width
  402.         for j in y...y + height
  403.           red   = color1.red + (color2.red - color1.red) *
  404.                 ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  405.           green = color1.green + (color2.green - color1.green) *
  406.                 ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  407.           blue  = color1.blue + (color2.blue - color1.blue) *
  408.                 ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  409.           alpha = color1.alpha + (color2.alpha - color1.alpha) *
  410.                 ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
  411.           color = Color.new(red, green, blue, alpha)
  412.           set_pixel(i, j, color)
  413.         end
  414.       end
  415.     end
  416.   end
  417. end
复制代码
和一个彩虹神剑及彩虹神剑补丁:
  1. ==begin
  2. ==============================================================================

  3. 彩虹神剑(伤害分段显示)显示总伤害版 v1.0b

  4. ==============================================================================

  5. 彩虹神剑 by 柳柳
  6. 显示总伤害修改 by 叶子

  7. ==============================================================================

  8. 6-20-2006 v1.0
  9. 在彩虹神剑的基础上增加了显示总伤害的功能,而且总伤害的数字是弹出伤害时逐渐增加的

  10. v1.0a
  11. 修正了显示伤害和实际伤害有差别的问题
  12. 修正了miss的情况下显示miss混乱的问题
  13. 修正了对己方技能重复显示伤害的问题
  14. 未修正播放目标动画第一帧时目标有时无端跳动的BUG

  15. v1.0b
  16. 修改了总伤害数字的位置和z坐标
  17. 未修正播放目标动画第一帧时目标有时无端跳动的BUG

  18. ==============================================================================
  19. =end
  20. # 核心的说明:
  21. # damage_pop 不再附带damage()的功能,这个放到animation里面去了

  22. module RPG
  23. #--------------------------------------------------------------------------
  24. # ● 常量设定
  25. #--------------------------------------------------------------------------
  26. # 是否显示总伤害
  27. SHOW_TOTAL_DAMAGE = true
  28. # 角色受攻击时是否跳一下
  29. BATTLER_JUMP = false
  30. class Sprite < ::Sprite
  31. #==========================================
  32. # 修改说明:
  33. # @flash_shake用来制作挨打时候跳跃
  34. # @_damage 用来记录每次打击之后弹出数字
  35. # @_total_damage 记录总伤害
  36. # @_total_damage_duration 总伤害持续帧
  37. #==========================================
  38. #alias 66RPG_rainbow_initialize : initialize
  39. def initialize(viewport = nil)
  40. #66RPG_rainbow_initialize(viewport)
  41. super(viewport)
  42. @_whiten_duration = 0
  43. @_appear_duration = 0
  44. @_escape_duration = 0
  45. @_collapse_duration = 0
  46. @_damage_duration = 0
  47. @_animation_duration = 0
  48. @_blink = false
  49. # 挨打时候跳跃
  50. @flash_shake = 0
  51. # 伤害记录数组
  52. @_damage = []
  53. # 总伤害数字
  54. @_total_damage = 0
  55. # 总伤害持续帧
  56. @_total_damage_duration = 0
  57. end
  58. def damage(value, critical)
  59. if value.is_a?(Numeric)
  60. damage_string = value.abs.to_s
  61. else
  62. damage_string = value.to_s
  63. end
  64. bitmap = Bitmap.new(160, 48)
  65. bitmap.font.name = "Arial Black"
  66. bitmap.font.size = 32
  67. bitmap.font.color.set(0, 0, 0)
  68. bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
  69. bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
  70. bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
  71. bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
  72. #=======================================
  73. # 修改:颜色
  74. #=======================================
  75. if value.is_a?(Numeric) and value < 0
  76. bitmap.font.color.set(176, 255, 144)
  77. else
  78. bitmap.font.color.set(255, 55, 55)
  79. end
  80. bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
  81. if critical
  82. bitmap.font.size = 20
  83. bitmap.font.color.set(0, 0, 0)
  84. bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
  85. bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
  86. bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
  87. bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
  88. bitmap.font.color.set(255, 255, 255)
  89. bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
  90. end
  91. @_damage_sprite = ::Sprite.new(self.viewport)
  92. @_damage_sprite.bitmap = bitmap
  93. @_damage_sprite.ox = 80
  94. @_damage_sprite.oy = 20
  95. @_damage_sprite.x = self.x
  96. @_damage_sprite.y = self.y - self.oy / 2
  97. @_damage_sprite.z = 3000
  98. @_damage_duration = 40
  99. #=======================================
  100. # 修改:推入新的伤害
  101. #=======================================
  102. @_damage.push([@_damage_sprite,@_damage_duration-10,0, rand(30) - 15, rand(3)])
  103. # 总伤害处理
  104. make_total_damage(value)
  105. end
  106. #--------------------------------------------------------------------------
  107. # ● 总伤害处理
  108. #--------------------------------------------------------------------------
  109. def make_total_damage(value)
  110. if value.is_a?(Numeric) and SHOW_TOTAL_DAMAGE
  111. @_total_damage += value
  112. else
  113. return
  114. end
  115. bitmap = Bitmap.new(300, 150)
  116. bitmap.font.name = "Arial Black"
  117. bitmap.font.size = 48
  118. bitmap.font.color.set(0, 0, 0)
  119. bitmap.draw_text(+2, 12+2, 160, 36, @_total_damage.abs.to_s, 1)
  120. if @_total_damage < 0
  121. bitmap.font.color.set(80, 255, 00)
  122. else
  123. bitmap.font.color.set(255, 140, 0)
  124. end
  125. bitmap.draw_text(0, 12, 160, 36, @_total_damage.abs.to_s, 1)
  126. if @_total_damage_sprite.nil?
  127. @_total_damage_sprite = ::Sprite.new(self.viewport)
  128. @_total_damage_sprite.ox = 80
  129. @_total_damage_sprite.oy = 20
  130. @_total_damage_sprite.z = 3000
  131. end
  132. @_total_damage_sprite.bitmap = bitmap
  133. @_total_damage_sprite.zoom_x = 1.5
  134. @_total_damage_sprite.zoom_y = 1.5
  135. @_total_damage_sprite.x = self.x
  136. @_total_damage_sprite.y = self.y - self.oy / 2 - 64
  137. @_total_damage_sprite.z = 3001
  138. @_total_damage_duration = 80
  139. end
  140. def animation(animation, hit, battler_damage="", battler_critical=false)
  141. dispose_animation
  142. #=======================================
  143. # 修改:记录伤害和critical
  144. #=======================================
  145. @battler_damage = battler_damage
  146. @battler_critical = battler_critical
  147. @_animation = animation
  148. return if @_animation == nil
  149. @_animation_hit = hit
  150. @_animation_duration = @_animation.frame_max
  151. animation_name = @_animation.animation_name
  152. animation_hue = @_animation.animation_hue
  153. bitmap = RPG::Cache.animation(animation_name, animation_hue)
  154. #=======================================
  155. # 修改:计算总闪光权限值
  156. #=======================================
  157. for timing in @_animation.timings
  158. quanzhong = animation_process_timing(timing, @_animation_hit,true)
  159. @all_quanzhong += quanzhong
  160. # 记录最后一次闪光
  161. @_last_frame = timing.frame if quanzhong != 0
  162. end
  163. if @@_reference_count.include?(bitmap)
  164. @@_reference_count[bitmap] += 1
  165. else
  166. @@_reference_count[bitmap] = 1
  167. end
  168. #=======================================
  169. # 修改:行动方动画不显示伤害
  170. #=======================================
  171. if $scene.is_a?(Scene_Battle)
  172. if $scene.animation1_id == @battler.animation_id
  173. @battler_damage = ""
  174. end
  175. end
  176. @_animation_sprites = []
  177. if @_animation.position != 3 or not @@_animations.include?(animation)
  178. for i in 0..15
  179. sprite = ::Sprite.new(self.viewport)
  180. sprite.bitmap = bitmap
  181. sprite.visible = false
  182. @_animation_sprites.push(sprite)
  183. end
  184. unless @@_animations.include?(animation)
  185. @@_animations.push(animation)
  186. end
  187. end
  188. update_animation
  189. end
  190. #=======================================
  191. # 修改:更换清除伤害的算法,以防万一
  192. # 本内容在脚本中没有使用过
  193. #=======================================
  194. def dispose_damage
  195. for damage in @_damage.reverse
  196. damage[0].bitmap.dispose
  197. damage[0].dispose
  198. @_damage.delete(damage)
  199. end
  200. @_total_damage = 0
  201. @_last_frame = -1
  202. if @_total_damage_sprite != nil
  203. @_total_damage_duration = 0
  204. @_total_damage_sprite.bitmap.dispose
  205. @_total_damage_sprite.dispose
  206. @_total_damage_sprite = nil
  207. end
  208. end
  209. def dispose_animation
  210. #=======================================
  211. # 修改:清除记录的伤害,清除权重记录
  212. #=======================================
  213. @battler_damage = nil
  214. @battler_critical = nil
  215. @all_quanzhong = 1
  216. @_total_damage = 0
  217. @_last_frame = -1
  218. if @_animation_sprites != nil
  219. sprite = @_animation_sprites[0]
  220. if sprite != nil
  221. @@_reference_count[sprite.bitmap] -= 1
  222. if @@_reference_count[sprite.bitmap] == 0
  223. sprite.bitmap.dispose
  224. end
  225. end
  226. for sprite in @_animation_sprites
  227. sprite.dispose
  228. end
  229. @_animation_sprites = nil
  230. @_animation = nil
  231. end
  232. end
  233. def update
  234. super
  235. if @_whiten_duration > 0
  236. @_whiten_duration -= 1
  237. self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  238. end
  239. if @_appear_duration > 0
  240. @_appear_duration -= 1
  241. self.opacity = (16 - @_appear_duration) * 16
  242. end
  243. if @_escape_duration > 0
  244. @_escape_duration -= 1
  245. self.opacity = 256 - (32 - @_escape_duration) * 10
  246. end
  247. if @_collapse_duration > 0
  248. @_collapse_duration -= 1
  249. self.opacity = 256 - (48 - @_collapse_duration) * 6
  250. end
  251. #=======================================
  252. # 修改:更新算法,更新弹出
  253. #=======================================
  254. if @_damage_duration > 0
  255. @_damage_duration -= 1
  256. for damage in @_damage
  257. damage[0].x = self.x + self.viewport.rect.x -
  258. self.ox + self.src_rect.width / 2 +
  259. (40 - damage[1]) * damage[3] / 10
  260. damage[0].y -= damage[4]+damage[1]/10
  261. damage[0].opacity = damage[1]*20
  262. damage[1] -= 1
  263. if damage[1]==0
  264. damage[0].bitmap.dispose
  265. damage[0].dispose
  266. @_damage.delete(damage)
  267. next
  268. end
  269. end
  270. end
  271. #=======================================
  272. # 添加:弹出总伤害
  273. #=======================================
  274. if @_total_damage_duration > 0
  275. @_total_damage_duration -= 1
  276. @_total_damage_sprite.y -= 1 if @_total_damage_duration % 2 == 0
  277. if @_total_damage_sprite.zoom_x > 1.0
  278. @_total_damage_sprite.zoom_x -= 0.05
  279. end
  280. if @_total_damage_sprite.zoom_y > 1.0
  281. @_total_damage_sprite.zoom_y -= 0.05
  282. end
  283. @_total_damage_sprite.opacity = 256 - (24 - @_total_damage_duration) * 16
  284. if @_total_damage_duration <= 0
  285. @_total_damage = 0
  286. @_total_damage_duration = 0
  287. @_total_damage_sprite.bitmap.dispose
  288. @_total_damage_sprite.dispose
  289. @_total_damage_sprite = nil
  290. end
  291. end
  292. #=======================================
  293. if @_animation != nil and (Graphics.frame_count % 2 == 0)
  294. @_animation_duration -= 1
  295. update_animation
  296. end
  297. if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  298. update_loop_animation
  299. @_loop_animation_index += 1
  300. @_loop_animation_index %= @_loop_animation.frame_max
  301. end
  302. if @_blink
  303. @_blink_count = (@_blink_count + 1) % 32
  304. if @_blink_count < 16
  305. alpha = (16 - @_blink_count) * 6
  306. else
  307. alpha = (@_blink_count - 16) * 6
  308. end
  309. self.color.set(255, 255, 255, alpha)
  310. end
  311. @@_animations.clear
  312. end
  313. def update_animation
  314. if @_animation_duration > 0
  315. frame_index = @_animation.frame_max - @_animation_duration
  316. cell_data = @_animation.frames[frame_index].cell_data
  317. position = @_animation.position
  318. animation_set_sprites(@_animation_sprites, cell_data, position)
  319. #=======================================
  320. # 修改:弹出伤害,权重计算
  321. #=======================================
  322. for timing in @_animation.timings
  323. if timing.frame == frame_index
  324. t = 1.0 * animation_process_timing(timing, @_animation_hit)
  325. #p t,"当前权重", @all_quanzhong,"总权重"
  326. if @battler_damage.is_a?(Numeric) and t != 0
  327. t *= @battler_damage
  328. t /= @all_quanzhong
  329. #p t,"当前伤害",@battler_damage,"总伤害"
  330. t = t.to_i
  331. # 最后一次闪光的话,伤害修正
  332. if frame_index == @_last_frame
  333. @_total_damage = @battler_damage - t
  334. end
  335. #p t,@battler_damage,@all_quanzhong
  336. damage(t,@battler_critical)
  337. # 防止重复播放miss
  338. elsif !@battler_damage.is_a?(Numeric) and timing.flash_scope != 0
  339. damage(@battler_damage,@battler_critical)
  340. end
  341. end
  342. end
  343. else
  344. dispose_animation
  345. end
  346. end
  347. #=======================================
  348. # 修改:敌人跳跃的功能 + 添加返回数值
  349. #=======================================
  350. def animation_process_timing(timing, hit,dontflash=false)
  351. if (timing.condition == 0) or
  352. (timing.condition == 1 and hit == true) or
  353. (timing.condition == 2 and hit == false)
  354. unless dontflash
  355. if timing.se.name != ""
  356. se = timing.se
  357. Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)
  358. end
  359. end
  360. case timing.flash_scope
  361. when 1
  362. unless dontflash
  363. self.flash(timing.flash_color, timing.flash_duration * 2)
  364. if @_total_damage >0
  365. @flash_shake_switch = true
  366. @flash_shake = 10
  367. end
  368. end
  369. return timing.flash_color.alpha * timing.flash_duration
  370. when 2
  371. unless dontflash
  372. if self.viewport != nil
  373. self.viewport.flash(timing.flash_color, timing.flash_duration * 2)
  374. return timing.flash_color.alpha * timing.flash_duration
  375. end
  376. end
  377. when 3
  378. unless dontflash
  379. self.flash(nil, timing.flash_duration * 2)
  380. end
  381. return timing.flash_color.alpha * timing.flash_duration
  382. end
  383. end
  384. return 0
  385. end
  386. end
  387. end
  388. #==============================================================================
  389. # ■ Sprite_Battler
  390. #==============================================================================
  391. class Sprite_Battler < RPG::Sprite
  392. #--------------------------------------------------------------------------
  393. # ● 初始化对像
  394. # 添加跳跃记录
  395. #--------------------------------------------------------------------------
  396. def initialize(viewport, battler = nil)
  397. super(viewport)
  398. @battler = battler
  399. @battler_visible = false
  400. @flash_shake_switch = true
  401. end
  402. #--------------------------------------------------------------------------
  403. # ● 刷新画面
  404. # 增添跳跃功能
  405. #--------------------------------------------------------------------------
  406. def update
  407. super
  408. # 战斗者为 nil 的情况下
  409. if @battler == nil
  410. self.bitmap = nil
  411. loop_animation(nil)
  412. return
  413. end
  414. # 文件名和色相与当前情况有差异的情况下
  415. if @battler.battler_name != @battler_name or
  416. @battler.battler_hue != @battler_hue
  417. # 获取、设置位图
  418. @battler_name = @battler.battler_name
  419. @battler_hue = @battler.battler_hue
  420. self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  421. @width = bitmap.width
  422. @height = bitmap.height
  423. self.ox = @width / 2
  424. self.oy = @height
  425. ###########################################################################
  426. if @battler.dead?
  427. self.bitmap = RPG::Cache.battler(@battler.id.to_s + "Dead", @battler_hue)
  428. @width = bitmap.width
  429. @height = bitmap.height
  430. self.ox = @width / 2
  431. self.oy = @height
  432. end
  433. # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  434. if (@battler.dead? or @battler.hidden) and @battler.is_a?(Game_Enemy)
  435. ###########################################################################
  436. self.opacity = 0
  437. end
  438. end
  439. # 动画 ID 与当前的情况有差异的情况下
  440. if @battler.damage == nil and
  441. @battler.state_animation_id != @state_animation_id
  442. @state_animation_id = @battler.state_animation_id
  443. loop_animation($data_animations[@state_animation_id])
  444. end
  445. # 应该被显示的角色的情况下
  446. if @battler.is_a?(Game_Actor) and @battler_visible
  447. # 不是主状态的时候稍稍降低点透明度
  448. if $game_temp.battle_main_phase
  449. self.opacity += 3 if self.opacity < 255
  450. else
  451. self.opacity -= 3 if self.opacity > 207
  452. end
  453. end




  454. # 明灭
  455. if @battler.blink
  456. blink_on
  457. else
  458. blink_off
  459. end
  460. # 不可见的情况下
  461. unless @battler_visible
  462. # 出现
  463. if not @battler.hidden and not @battler.dead? and
  464. ###########################################################################
  465. (@battler.damage == nil or @battler.damage_pop)
  466. if @battler.is_a?(Game_Enemy)
  467. ###########################################################################
  468. appear
  469. ###########################################################################
  470. else
  471. self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  472. @width = bitmap.width
  473. @height = bitmap.height
  474. self.ox = @width / 2
  475. self.oy = @height
  476. end
  477. @battler_visible = true
  478. ###########################################################################
  479. end
  480. end
  481. # 可见的情况下
  482. if @battler_visible
  483. # 逃跑
  484. if @battler.hidden
  485. $game_system.se_play($data_system.escape_se)
  486. escape
  487. @battler_visible = false
  488. end
  489. # 白色闪烁
  490. if @battler.white_flash
  491. whiten
  492. @battler.white_flash = false
  493. end
  494. # 动画
  495. if @battler.animation_id != 0
  496. animation = $data_animations[@battler.animation_id]
  497. animation(animation, @battler.animation_hit,@battler.damage, @battler.critical)
  498. @battler.animation_id = 0
  499. end
  500. # 伤害
  501. if @battler.damage_pop

  502. @battler.damage = nil
  503. @battler.critical = false
  504. @battler.damage_pop = false
  505. end
  506. ###########################################################################
  507. # korapusu
  508. if @battler.damage == nil and @battler.dead?
  509. if @battler.is_a?(Game_Enemy)
  510. $game_system.se_play($data_system.enemy_collapse_se)
  511. collapse
  512. else
  513. $game_system.se_play($data_system.actor_collapse_se)
  514. # 角色战斗图变为角色ID+"Dead"的名字的战斗图
  515. self.bitmap = RPG::Cache.battler(@battler.id.to_s + "Dead", @battler_hue)
  516. @width = bitmap.width
  517. @height = bitmap.height
  518. self.ox = @width / 2
  519. self.oy = @height
  520. end
  521. @battler_visible = false
  522. ###########################################################################
  523. end
  524. end
  525. # 设置活动块的坐标
  526. if @flash_shake_switch == true
  527. self.x = @battler.screen_x
  528. self.y = @battler.screen_y
  529. self.z = @battler.screen_z
  530. @flash_shake_switch = false
  531. end
  532. if @flash_shake != 0 and @battler.damage != nil and RPG::BATTLER_JUMP
  533. case @flash_shake
  534. when 9..10
  535. self.x = @battler.screen_x
  536. self.y -=4
  537. self.z = @battler.screen_z
  538. when 6..8
  539. self.x = @battler.screen_x
  540. self.y -=2
  541. self.z = @battler.screen_z
  542. when 3..5
  543. self.x = @battler.screen_x
  544. self.y +=2
  545. self.z = @battler.screen_z
  546. when 2
  547. self.x = @battler.screen_x
  548. self.y += 4
  549. self.z = @battler.screen_z
  550. when 1
  551. self.x = @battler.screen_x
  552. self.y = @battler.screen_y
  553. self.z = @battler.screen_z
  554. end
  555. @flash_shake -= 1
  556. end
  557. end
  558. end

  559. #==============================================================================
  560. # ■ Scene_Battle
  561. #------------------------------------------------------------------------------
  562. #  处理战斗画面的类。
  563. #==============================================================================

  564. class Scene_Battle
  565. #--------------------------------------------------------------------------
  566. # ● 定义实例变量
  567. #--------------------------------------------------------------------------
  568. attr_reader :animation1_id # 行动方动画ID
  569. end
复制代码
补丁:
  1. class Game_Battler
  2.    # 声明一个实例变量判断是否需要显示固定伤害
  3.    attr_accessor :battle_solid_damage
  4. end

  5. class Scene_Battle
  6.    def update_phase4_step1
  7.      # 隐藏帮助窗口
  8.      @help_window.visible = false
  9.      # 判定胜败
  10.      if judge
  11.        # 胜利或者失败的情况下 : 过程结束
  12.        return
  13.      end
  14.      # 强制行动的战斗者不存在的情况下
  15.      if $game_temp.forcing_battler == nil
  16.        # 设置战斗事件
  17.        setup_battle_event
  18.        # 执行战斗事件中的情况下
  19.        if $game_system.battle_interpreter.running?
  20.          return
  21.        end
  22.      end
  23.      # 强制行动的战斗者存在的情况下
  24.      if $game_temp.forcing_battler != nil
  25.        # 在头部添加后移动
  26.        @action_battlers.delete($game_temp.forcing_battler)
  27.        @action_battlers.unshift($game_temp.forcing_battler)
  28.      end
  29.      # 未行动的战斗者不存在的情况下 (全员已经行动)
  30.      if @action_battlers.size == 0
  31.        # 开始同伴命令回合
  32.        start_phase2
  33.        return
  34.      end
  35.      # 初始化动画 ID 和公共事件 ID
  36.      @animation1_id = 0
  37.      @animation2_id = 0
  38.      @common_event_id = 0
  39.      # 未行动的战斗者移动到序列的头部
  40.      @active_battler = @action_battlers.shift
  41.      # 如果已经在战斗之外的情况下
  42.      if @active_battler.index == nil
  43.        return
  44.      end
  45.      # 连续伤害
  46.      if @active_battler.hp > 0 and @active_battler.slip_damage?
  47.        @active_battler.slip_damage_effect
  48.        @active_battler.damage_pop = true
  49.        @active_battler.battle_solid_damage = true
  50.      end
  51.      # 自然解除状态
  52.      @active_battler.remove_states_auto
  53.      # 刷新状态窗口
  54.      @status_window.refresh
  55.      # 移至步骤 2
  56.      @phase4_step = 2
  57.    end
  58. end

  59. class Sprite_Battler < RPG::Sprite
  60.    def update
  61.      super
  62. # 战斗者为 nil 的情况下
  63. if @battler == nil
  64. self.bitmap = nil
  65. loop_animation(nil)
  66. return
  67. end
  68. # 文件名和色相与当前情况有差异的情况下
  69. if @battler.battler_name != @battler_name or
  70. @battler.battler_hue != @battler_hue
  71. # 获取、设置位图
  72. @battler_name = @battler.battler_name
  73. @battler_hue = @battler.battler_hue
  74. self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  75. @width = bitmap.width
  76. @height = bitmap.height
  77. self.ox = @width / 2
  78. self.oy = @height
  79. ###########################################################################
  80. if @battler.dead?
  81. self.bitmap = RPG::Cache.battler(@battler.id.to_s + "Dead", @battler_hue)
  82. @width = bitmap.width
  83. @height = bitmap.height
  84. self.ox = @width / 2
  85. self.oy = @height
  86. end
  87. # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  88. if (@battler.dead? or @battler.hidden) and @battler.is_a?(Game_Enemy)
  89. ###########################################################################
  90. self.opacity = 0
  91. end
  92. end
  93. # 动画 ID 与当前的情况有差异的情况下
  94. if @battler.damage == nil and
  95. @battler.state_animation_id != @state_animation_id
  96. @state_animation_id = @battler.state_animation_id
  97. loop_animation($data_animations[@state_animation_id])
  98. end
  99. # 应该被显示的角色的情况下
  100. if @battler.is_a?(Game_Actor) and @battler_visible
  101. # 不是主状态的时候稍稍降低点透明度
  102. if $game_temp.battle_main_phase
  103. self.opacity += 3 if self.opacity < 255
  104. else
  105. self.opacity -= 3 if self.opacity > 207
  106. end
  107. end

  108. # 明灭
  109. if @battler.blink
  110. blink_on
  111. else
  112. blink_off
  113. end
  114. # 不可见的情况下
  115. unless @battler_visible
  116. # 出现
  117. if not @battler.hidden and not @battler.dead? and
  118. ###########################################################################
  119. (@battler.damage == nil or @battler.damage_pop)
  120. if @battler.is_a?(Game_Enemy)
  121. ###########################################################################
  122. appear
  123. ###########################################################################
  124. else
  125. self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  126. @width = bitmap.width
  127. @height = bitmap.height
  128. self.ox = @width / 2
  129. self.oy = @height
  130. end
  131. @battler_visible = true
  132. ###########################################################################
  133. end
  134. end
  135. # 可见的情况下
  136. if @battler_visible
  137. # 逃跑
  138. if @battler.hidden
  139. $game_system.se_play($data_system.escape_se)
  140. escape
  141. @battler_visible = false
  142. end
  143. # 白色闪烁
  144. if @battler.white_flash
  145. whiten
  146. @battler.white_flash = false
  147. end
  148. # 动画
  149. if @battler.animation_id != 0
  150. animation = $data_animations[@battler.animation_id]
  151. animation(animation, @battler.animation_hit,@battler.damage, @battler.critical)
  152. @battler.animation_id = 0
  153. end
  154. # 伤害
  155. if @battler.damage_pop
  156. # 显示固定伤害
  157. if @battler.battle_solid_damage
  158. damage(@battler.damage, @battler.critical)
  159. @battler.battle_solid_damage = false
  160. end

  161. @battler.damage = nil
  162. @battler.critical = false
  163. @battler.damage_pop = false
  164. end
  165. ###########################################################################
  166. # korapusu
  167. if @battler.damage == nil and @battler.dead?
  168. if @battler.is_a?(Game_Enemy)
  169. $game_system.se_play($data_system.enemy_collapse_se)
  170. collapse
  171. else
  172. $game_system.se_play($data_system.actor_collapse_se)
  173. # 角色战斗图变为角色ID+"Dead"的名字的战斗图
  174. self.bitmap = RPG::Cache.battler(@battler.id.to_s + "Dead", @battler_hue)
  175. @width = bitmap.width
  176. @height = bitmap.height
  177. self.ox = @width / 2
  178. self.oy = @height
  179. end
  180. @battler_visible = false
  181. ###########################################################################
  182. end
  183. end
  184.      # 设置活动块的坐标
  185.      if @flash_shake_switch == true
  186.        self.x = @battler.screen_x
  187.        self.y = @battler.screen_y
  188.        self.z = @battler.screen_z
  189.        @flash_shake_switch = false
  190.      end
  191.      if @flash_shake != 0 and @battler.damage != nil and RPG::BATTLER_JUMP
  192.        case @flash_shake
  193.        when 9..10
  194.          self.x +=3
  195.          self.y = @battler.screen_y
  196.          self.z = @battler.screen_z
  197.        when 6..8
  198.          self.x -=3
  199.          self.y = @battler.screen_y
  200.          self.z = @battler.screen_z
  201.        when 3..5
  202.          self.x +=3
  203.          self.y = @battler.screen_y
  204.          self.z = @battler.screen_z
  205.        when 2
  206.          self.x -=3
  207.          self.y = @battler.screen_y
  208.          self.z = @battler.screen_z
  209.        when 1
  210.          self.x +=3
  211.          self.y = @battler.screen_y
  212.          self.z = @battler.screen_z
  213.        end
  214.        @flash_shake -= 1
  215.      end
  216.    end
  217. end

  218. class Interpreter
  219.    def command_338
  220.      # 获取操作值
  221.      value = operate_value(0, @parameters[2], @parameters[3])
  222.      # 处理循环
  223.      iterate_battler(@parameters[0], @parameters[1]) do |battler|
  224.        # 战斗者存在的情况下
  225.        if battler.exist?
  226.          # 更改 HP
  227.          battler.hp -= value
  228.          # 如果在战斗中
  229.          if $game_temp.in_battle
  230.            # 设置伤害
  231.            battler.damage = value
  232.            battler.damage_pop = true
  233.            battler.battle_solid_damage = true
  234.          end
  235.        end
  236.      end
  237.      # 继续
  238.      return true
  239.    end
  240. end
复制代码
他们发生了冲突,删去发生冲突彩虹神剑的第266及269行后,分段伤害就被固定了,不会移动了
请高手帮我改一改

Lv1.梦旅人

梦石
0
星屑
50
在线时间
45 小时
注册时间
2011-11-26
帖子
90
3
 楼主| 发表于 2012-1-20 20:09:10 | 只看该作者
mzr1996 发表于 2012-1-20 19:58
http://rpg.blue/article-40531.html
彩虹神剑用:在怪物脚下显示血条

并不是怪物血条而是人物血条

点评

额,对不起,我没看仔细。  发表于 2012-1-20 22:45
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
53 小时
注册时间
2011-11-13
帖子
67
2
发表于 2012-1-20 19:58:29 | 只看该作者
http://rpg.blue/article-40531.html
彩虹神剑用:在怪物脚下显示血条

点评

虽然你指的是怪物血条,不过我试过之后,居然好了,谢谢  发表于 2012-1-20 20:12
奇迹も、魔法も、あるんだよ
回复

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-10-1 21:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表