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

Project1

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

[已经过期] 全动画脚本问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
657
在线时间
333 小时
注册时间
2011-3-14
帖子
121
跳转到指定楼层
1
发表于 2013-7-28 23:06:07 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 lxzuz 于 2013-7-29 19:18 编辑

这脚本是修改加强再加强版的,但不是最新的,问题如图:

在战斗里面动画一点问题都没有,但在 地图上 主角事件有优先级的地图元件会遮挡住动画(把动画踩死在脚下{:2_263:} )
我不想换脚本啊,能告诉我怎么弄好吗

Lv2.观梦者

梦石
0
星屑
657
在线时间
333 小时
注册时间
2011-3-14
帖子
121
2
 楼主| 发表于 2013-7-28 23:16:04 | 只看该作者
本帖最后由 lxzuz 于 2013-7-29 08:22 编辑
  1. #==============================================================================
  2. # ■ 全动画战斗系统(修改加强再加强版)
  3. #------------------------------------------------------------------------------
  4. #  By whbm
  5. #   应用脚本 彩虹神剑 By 66
  6. #==============================================================================
  7.     $fangyu = 0
  8. #新加部分 改进基础 叮当猫的全动画脚本
  9. #================
  10. module RPG
  11.   class Sprite < ::Sprite
  12.     @@_animations = []
  13.     @@_reference_count = {}
  14.    
  15.     def dispose
  16.       dispose_damage
  17.       dispose_animation
  18.       dispose_loop_animation
  19.        dispose_loop_animation1
  20.       super
  21.     end
  22.    
  23.    
  24.   
  25.    
  26.     def loop_animation1(animation)
  27.       return if animation == @_loop_animation1
  28.       dispose_loop_animation1
  29.       @_loop_animation1 = animation
  30.       return if @_loop_animation1 == nil
  31.       @_loop_animation1_index = 0
  32.       animation_name = @_loop_animation1.animation_name
  33.       animation_hue = @_loop_animation1.animation_hue
  34.       bitmap = RPG::Cache.animation(animation_name, animation_hue)
  35.       if @@_reference_count.include?(bitmap)
  36.         @@_reference_count[bitmap] += 1
  37.       else
  38.         @@_reference_count[bitmap] = 1
  39.       end
  40.       @_loop_animation1_sprites = []
  41.       for i in 0..15
  42.         sprite = ::Sprite.new(self.viewport)
  43.         sprite.bitmap = bitmap
  44.         sprite.visible = false
  45.         @_loop_animation1_sprites.push(sprite)
  46.       end
  47.       update_loop_animation1
  48.     end
  49.    
  50.    
  51.    

  52.     def dispose_loop_animation1
  53.       if @_loop_animation1_sprites != nil
  54.         sprite = @_loop_animation1_sprites[0]
  55.         if sprite != nil
  56.           @@_reference_count[sprite.bitmap] -= 1
  57.           if @@_reference_count[sprite.bitmap] == 0
  58.             sprite.bitmap.dispose
  59.           end
  60.         end
  61.         for sprite in @_loop_animation1_sprites
  62.           sprite.dispose
  63.         end
  64.         @_loop_animation1_sprites = nil
  65.         @_loop_animation1 = nil
  66.       end
  67.     end
  68.    
  69.    
  70.    
  71.    
  72.     def update_loop_animation1
  73.       frame_index = @_loop_animation1_index
  74.       cell_data = @_loop_animation1.frames[frame_index].cell_data
  75.       position = @_loop_animation1.position
  76.       animation_set_sprites(@_loop_animation1_sprites, cell_data, position)
  77.       for timing in @_loop_animation1.timings
  78.         if timing.frame == frame_index
  79.           animation_process_timing(timing, true)
  80.         end
  81.       end
  82.     end
  83.    
  84.   end
  85. end
  86. #===============
  87. #新加部分

  88. class Spriteset_Battle
  89.   #--------------------------------------------------------------------------
  90.   # ● 初始化变量
  91.   #--------------------------------------------------------------------------
  92.   def initialize
  93.     # 生成显示端口
  94.     @viewport1 = Viewport.new(0, 0, 640, 480)
  95.     @viewport2 = Viewport.new(0, 0, 640, 480)
  96.     @viewport3 = Viewport.new(0, 0, 640, 480)
  97.     @viewport4 = Viewport.new(0, 0, 640, 480)
  98.     @viewport2.z = 101
  99.     @viewport3.z = 200
  100.     @viewport4.z = 5000
  101.     # 生成战斗背景活动块
  102.     @battleback_sprite = Sprite.new(@viewport1)
  103.     # 生成敌人活动块
  104.     @enemy_sprites = []
  105.     for enemy in $game_troop.enemies.reverse
  106. #      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
  107.       @enemy_sprites.push(Sprite_Battler.new(@viewport4, enemy))#敌人的显示高度
  108.     end
  109.     # 生成敌人活动块
  110.     @actor_sprites = []
  111.     @actor_sprites.push(Sprite_Battler.new(@viewport2))
  112.     @actor_sprites.push(Sprite_Battler.new(@viewport2))
  113.     @actor_sprites.push(Sprite_Battler.new(@viewport2))
  114.     @actor_sprites.push(Sprite_Battler.new(@viewport2))
  115.     # 生成天候
  116.     @weather = RPG::Weather.new(@viewport1)
  117.     # 生成图片活动块
  118.     @picture_sprites = []
  119.     for i in 51..100
  120.       @picture_sprites.push(Sprite_Picture.new(@viewport3,
  121.         $game_screen.pictures[i]))
  122.     end
  123.     # 生成计时器块
  124.     @timer_sprite = Sprite_Timer.new
  125.     # 刷新画面
  126.     update
  127.   end
  128.   #..........................................................................
  129.   #--------------------------------------------------------------------------
  130.   # ● 胜利图
  131.   #--------------------------------------------------------------------------
  132.   def win
  133.     for sprite in @actor_sprites
  134.       sprite.win
  135.     end
  136.   end
  137.   #..........................................................................
  138.   #--------------------------------------------------------------------------
  139.   # ● 刷新画面
  140.   #--------------------------------------------------------------------------
  141.   def update
  142.     # 刷新角色的活动块 (对应角色的替换)
  143.     @actor_sprites[0].battler = $game_party.actors[0]
  144.     @actor_sprites[1].battler = $game_party.actors[1]
  145.     @actor_sprites[2].battler = $game_party.actors[2]
  146.     @actor_sprites[3].battler = $game_party.actors[3]
  147.     # 战斗背景的文件名与现在情况有差异的情况下
  148.     if @battleback_name != $game_temp.battleback_name
  149.       @battleback_name = $game_temp.battleback_name
  150.       if @battleback_sprite.bitmap != nil
  151.         @battleback_sprite.bitmap.dispose
  152.       end
  153.       @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
  154.       @battleback_sprite.src_rect.set(0, 0, 640, 480)
  155.     end
  156.     # 刷新战斗者的活动块
  157.     for sprite in @enemy_sprites + @actor_sprites
  158.       sprite.update
  159.     end
  160.     # 刷新天气图形
  161.     @weather.type = $game_screen.weather_type
  162.     @weather.max = $game_screen.weather_max
  163.     @weather.update
  164.     # 刷新图片活动块
  165.     for sprite in @picture_sprites
  166.       sprite.update
  167.     end
  168.     # 刷新计时器活动块
  169.     @timer_sprite.update
  170.     # 设置画面的色调与震动位置
  171.     @viewport1.tone = $game_screen.tone
  172.     @viewport1.ox = $game_screen.shake
  173.     # 设置画面的闪烁色
  174.     @viewport4.color = $game_screen.flash_color
  175.     # 刷新显示端口
  176.     @viewport1.update
  177.     @viewport2.update
  178.     @viewport4.update
  179.   end
  180. end
  181. class Arrow_Enemy < Arrow_Base
  182.   #--------------------------------------------------------------------------
  183.   # ● 获取光标指向的敌人
  184.   #--------------------------------------------------------------------------
  185.   def enemy
  186.     return $game_troop.enemies[@index]
  187.   end
  188.   #--------------------------------------------------------------------------
  189.   # ● 刷新画面
  190.   #--------------------------------------------------------------------------
  191.   def update
  192.     super
  193.     # 如果指向不存在的敌人就离开
  194.     $game_troop.enemies.size.times do
  195.       break if self.enemy.exist?
  196.       @index += 1
  197.       @index %= $game_troop.enemies.size
  198.     end
  199.     # 光标右
  200.     if Input.repeat?(Input::RIGHT)
  201.       $game_system.se_play($data_system.cursor_se)
  202.       $game_troop.enemies.size.times do
  203.         @index += 1
  204.         @index %= $game_troop.enemies.size
  205.         break if self.enemy.exist?
  206.       end
  207.     end
  208.     # 光标左
  209.     if Input.repeat?(Input::LEFT)
  210.       $game_system.se_play($data_system.cursor_se)
  211.       $game_troop.enemies.size.times do
  212.         @index += $game_troop.enemies.size - 1
  213.         @index %= $game_troop.enemies.size
  214.         break if self.enemy.exist?
  215.       end
  216.     end
  217.     # 设置活动块坐标
  218.     if self.enemy != nil
  219.       self.x = self.enemy.screen_x + self.ox
  220.       self.y = self.enemy.screen_y + self.oy
  221.     end
  222.   end
  223. end
  224. class Arrow_Actor < Arrow_Base
  225.   #--------------------------------------------------------------------------
  226.   # ● 获取光标指向的角色
  227.   #--------------------------------------------------------------------------
  228.   def actor
  229.     return $game_party.actors[@index]
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● 刷新画面
  233.   #--------------------------------------------------------------------------
  234.   def update
  235.     super
  236.     # 光标右
  237.     if Input.repeat?(Input::RIGHT)
  238.       $game_system.se_play($data_system.cursor_se)
  239.       @index += 1
  240.       @index %= $game_party.actors.size
  241.     end
  242.     # 光标左
  243.     if Input.repeat?(Input::LEFT)
  244.       $game_system.se_play($data_system.cursor_se)
  245.       @index += $game_party.actors.size - 1
  246.       @index %= $game_party.actors.size
  247.     end
  248.     # 设置活动块坐标
  249.     if self.actor != nil
  250.       self.x = self.actor.screen_x + self.ox
  251.       self.y = self.actor.screen_y + self.oy
  252.     end
  253.   end
  254. end
  255. class Scene_Battle
  256.   #--------------------------------------------------------------------------
  257.   # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  258.   #--------------------------------------------------------------------------
  259.   def update_phase4_step3
  260.     # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  261.     if @animation1_id == 0
  262.       @active_battler.white_flash = true
  263.     else
  264.     # 添加施法动画
  265. #     @active_battler.setup_battler_ani(@active_battler.battler_name.split(/★/)[8], 1)
  266.       @active_battler.animation_id = @animation1_id
  267.       @active_battler.animation_hit = true
  268.     end
  269.     # 对像方动画
  270.     for target in @target_battlers
  271.       target.animation_id = @animation2_id
  272.       target.animation_hit = (target.damage != "Miss")
  273.       ###########################################################
  274.       target.setup_battler_dead_ani(0)
  275.       ############################################################
  276.       #.......................................................................
  277.       if target.is_a?(Game_Actor)
  278.         ##############
  279.         if target.guarding?
  280.           $fangyu = 1
  281.         end
  282.         ##############
  283.         if target.current_action.kind == 0 and target.current_action.basic == 1
  284.            target.setup_battler_ani(target.battler_name.split(/★/)[2], 1)
  285.          #else
  286.            #target.current_action.kind == 0 and target.current_action.basic == 1
  287.           # target.setup_battler_ani(target.battler_name.split(/★/)[3], 0)
  288.            else
  289.          target.setup_battler_hurt_ani(0)
  290.         end
  291.       end
  292.       if target.is_a?(Game_Enemy)
  293.        if target.current_action.kind == 0 and target.current_action.basic == 1
  294.           target.setup_battler_ani(target.battler_name.split(/★/)[1])
  295.         else
  296.           target.setup_battler_hurt_ani(0)
  297.         end
  298.       end
  299.       #.......................................................................
  300.     end
  301.     # 对像方动画
  302.     for target in @target_battlers
  303.       target.animation_id = @animation2_id
  304.       target.animation_hit = (target.damage != "Miss")
  305.       #......................................................................
  306.     end
  307.     # 限制动画长度、最低 8 帧
  308.     @wait_count = 8
  309.     # 移至步骤 5
  310.     @phase4_step = 5
  311.   end
  312.   #--------------------------------------------------------------------------
  313.   # ● 刷新画面 (主回合步骤 4 : 对像方动画) ★
  314.   #--------------------------------------------------------------------------
  315.   def update_phase4_step4
  316.     # 移至步骤 5
  317.     @phase4_step = 5
  318.   end
  319. end
  320. class Game_Actor < Game_Battler
  321.   
  322. #小改动
  323. #############################################################################
  324. #                                横版修改                                   #
  325. #############################################################################
  326.   
  327.   #--------------------------------------------------------------------------
  328.   # ● 取得战斗画面的 X 坐标
  329.   #--------------------------------------------------------------------------
  330. #  def screen_x
  331. #    case self.index
  332. #    when 0
  333. #      return 515
  334. #    when 1
  335. #      return 440
  336. #    when 2
  337. #      return 590
  338. #    when 3
  339. #      return 390
  340. #    else
  341. #      return 640
  342. #    end
  343. #  end
  344.   #--------------------------------------------------------------------------
  345.   # ● 取得战斗画面的 Y 坐标
  346.   #--------------------------------------------------------------------------
  347. #  def screen_y
  348. #    case self.index
  349. #    when 0
  350. #      return 310
  351. #    when 1
  352. #      return 295
  353. #    when 2
  354. #      return 325
  355. #    when 3
  356. #      return 340
  357. #    else
  358. #      return 1000
  359. #    end
  360. #  end
  361.   #--------------------------------------------------------------------------
  362.   # ● 取得战斗画面的 Z 坐标
  363.   #--------------------------------------------------------------------------
  364. #  def screen_z
  365. #    case self.index
  366. #    when 0
  367. #      return 1
  368. #    when 1
  369. #      return 0
  370. #    when 2
  371. #      return 2
  372. #    when 3
  373. #      return 3
  374. #    else
  375. #      return 0
  376. #    end
  377. #  end
  378.   
  379.   
  380. #############################################################################
  381.   
  382.   
  383.   
  384.   def screen_x
  385.     # 返回计算后的队伍 X 坐标的排列顺序
  386.   #if $game_party.actors[1].name ="南宫复"
  387.      case self.index
  388.     when 0
  389.       return 500
  390.     when 1
  391.       return 580
  392.     when 2
  393.       return 510
  394.     when 3
  395.       return 600
  396.   # end
  397.   else
  398.     return 600
  399.   end
  400. end

  401.       #......................................................................
  402. #     case self.index
  403.   #  when 0
  404.    #   return 400
  405.    # when 1
  406.    #   return 470
  407.    # when 2
  408.    #   return 540
  409.    # when 3
  410.     #  return 610
  411.     #else
  412.     #  return 0
  413.     #end
  414.   #end
  415.   #--------------------------------------------------------------------------
  416.   # ● 取得战斗画面的 Y 坐标
  417.   #--------------------------------------------------------------------------
  418.   def screen_y
  419.     #........................................................................
  420.     case self.index
  421.     when 0
  422.       return 435
  423.     when 1
  424.       return 380
  425.     when 2
  426.       return 360
  427.     when 3
  428.       return 325
  429.       end
  430.   end
  431.   #--------------------------------------------------------------------------
  432.   # ● 取得战斗画面的 Z 坐标
  433.   #--------------------------------------------------------------------------
  434.   def screen_z
  435.     # 返回计算后的队伍 Z 坐标的排列顺序
  436.     if self.index != nil
  437.       return 4 - self.index
  438.     else
  439.       return 0
  440.     end
  441.   end
  442. end

  443. class Scene_Battle
  444.   #..........................................................................
  445.   #--------------------------------------------------------------------------
  446.   # ● 返回phase
  447.   #--------------------------------------------------------------------------
  448.   def phase
  449.     return @phase
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # ● 返回phase4_step
  453.   #--------------------------------------------------------------------------
  454.   def phase4_step
  455.     return @phase4_step
  456.   end
  457.   #--------------------------------------------------------------------------
  458.   # ● 返回phase4_step
  459.   #--------------------------------------------------------------------------
  460.   def actor_command_active?
  461.     return @actor_command_window.active
  462.   end
  463.   #..........................................................................
  464. end
  465. class Game_Battler
  466.   #..........................................................................
  467.   #--------------------------------------------------------------------------
  468.   # ● 获取循环的动画 ID
  469.   #--------------------------------------------------------------------------  
  470.   def show_damage(value)
  471.     @show_damage_value = value
  472.   end
  473.   #--------------------------------------------------------------------------
  474.   # ● 获取循环的动画 ID
  475.   #--------------------------------------------------------------------------
  476.   def show_damage_value
  477.     return @show_damage_value
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● 获取循环的动画 ID
  481.   #--------------------------------------------------------------------------
  482.   def battler_ani
  483.     return @battler_ani
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● 获取循环的动画 ID
  487.   #--------------------------------------------------------------------------
  488.   def setup_battler_ani(battler_ani, once = 0)
  489.     @battler_ani = battler_ani
  490.     @once = once
  491.   end
  492.   #--------------------------------------------------------------------------
  493.   # ● 获取循环的动画 ID
  494.   #--------------------------------------------------------------------------
  495.   def setup_battler_hurt_ani(hurt)
  496.     @hurt = hurt
  497.   end  
  498.   #--------------------------------------------------------------------------
  499.   # ● 获取循环的动画 ID
  500.   #--------------------------------------------------------------------------
  501.   def setup_battler_dead_ani(over)
  502.     @over = over
  503.   end
  504.   #--------------------------------------------------------------------------
  505.   # ● 获取循环的动画 ID
  506.   #--------------------------------------------------------------------------
  507.   def battler_dead_ani
  508.     return @over
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ● 获取循环的动画 ID
  512.   #--------------------------------------------------------------------------
  513.   def battler_ani_once
  514.     return @once
  515.   end
  516.   #--------------------------------------------------------------------------
  517.   # ● 获取循环的动画 ID
  518.   #--------------------------------------------------------------------------
  519.   def battler_hurt_ani
  520.     return @hurt
  521.   end
  522.   #..........................................................................
  523. end
  524. class Sprite_Battler < RPG::Sprite
  525.   #..........................................................................
  526.   #--------------------------------------------------------------------------
  527.   # ● 胜利图
  528.   #--------------------------------------------------------------------------
  529.   def win
  530.     if @battler_name != nil and not @battler.hidden and not @battler.dead?
  531.       @battler.setup_battler_ani(@battler_name.split(/★/)[6], 1)
  532.     end
  533.   end
  534.   #..........................................................................
  535.   #--------------------------------------------------------------------------
  536.   # ● 释放
  537.   #--------------------------------------------------------------------------
  538.   def dispose
  539.     if self.bitmap != nil
  540.       self.bitmap.dispose
  541.     end
  542.     super
  543.   end
  544.   #--------------------------------------------------------------------------
  545.   # ● 刷新画面
  546.   #--------------------------------------------------------------------------
  547.   def update
  548.     super
  549.     # 战斗者为 nil 的情况下
  550.    if [url=home.php?mod=space&uid=133701]@battler[/url] == nil   
  551.        self.bitmap = nil  
  552.        loop_animation(nil)
  553.        loop_animation1(nil)
  554.       return
  555.     end
  556.     # 文件名和色相与当前情况有差异的情况下
  557.     if @battler.battler_name != @battler_name or
  558.        @battler.battler_hue != @battler_hue
  559.       @battler_hue = @battler.battler_hue
  560.       # 获取、设置位图
  561.       @battler_name = @battler.battler_name
  562.       self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  563.       #.......................................................................
  564.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  565.       #.......................................................................
  566.       @width = bitmap.width
  567.       [url=home.php?mod=space&uid=291977]@height[/url] = bitmap.height
  568.       self.ox = @width / 2
  569.       self.oy = @height
  570.       # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  571.       if @battler.is_a?(Game_Enemy)
  572.         if @battler.dead? or @battler.hidden
  573.           self.opacity = 0
  574.         end
  575.       end
  576.     end
  577.     # 动画 ID 与当前的情况有差异的情况下
  578.     #.........................................................................
  579.     if @battler.battler_ani != @battler_ani
  580.       @battler_ani = @battler.battler_ani
  581.       loop_animation($data_animations[@battler_ani.to_i])
  582.       

  583.       
  584.      end
  585.    
  586.     #.........................................................................
  587.     # 应该被显示的角色的情况下
  588.     if @battler.is_a?(Game_Actor) and @battler_visible
  589.       # 不是主状态的时候稍稍降低点透明度
  590.       if $game_temp.battle_main_phase
  591.         self.opacity += 3 if self.opacity < 255
  592.       else
  593.         self.opacity -= 3 if self.opacity > 207
  594.       end
  595.     end
  596.     # 明灭
  597.     if @battler.blink
  598.       blink_on
  599.     else
  600.       blink_off
  601.     end
  602.     # 不可见的情况下
  603.     unless @battler_visible
  604.       # 出现 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  605.       if not @battler.hidden and not @battler.dead? and
  606.          (@battler.damage == nil or @battler.damage_pop)
  607.         if @battler.is_a?(Game_Enemy)
  608.           appear
  609.         else
  610.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  611.         end
  612.         @battler_visible = true
  613.       end
  614.     end
  615.     # 可见的情况下
  616.     if @battler_visible
  617.       # 逃跑
  618.       if @battler.hidden
  619.         $game_system.se_play($data_system.escape_se)
  620.         escape
  621.         @battler_visible = false
  622.       end
  623.       # 白色闪烁
  624.       if @battler.white_flash
  625.         whiten
  626.         @battler.white_flash = false
  627.       end
  628.       # 动画
  629.       if @battler.animation_id != 0
  630.         animation = $data_animations[@battler.animation_id]
  631.         animation(animation, @battler.animation_hit)
  632.         @battler.animation_id = 0
  633.       end
  634.       # 伤害
  635.       if @battler.damage_pop
  636.         damage(@battler.damage, @battler.critical)
  637.         @battler.damage = nil
  638.         @battler.critical = false
  639.         @battler.damage_pop = false
  640.       end
  641.       # korapusu
  642.       if @battler.damage == nil and @battler.dead?
  643.         #....................................................................
  644.         if @battler.is_a?(Game_Enemy)
  645.           $game_system.se_play($data_system.enemy_collapse_se)
  646.           #collapse
  647.         else
  648.           $game_system.se_play($data_system.actor_collapse_se)
  649.         end
  650.         #....................................................................
  651.         @battler_visible = false
  652.       end
  653.     end
  654.     # 设置活动块的坐标
  655.     self.x = @battler.screen_x
  656.     self.y = @battler.screen_y
  657.     self.z = @battler.screen_z
  658.   end
  659. end
  660. module RPG
  661.   class Sprite < ::Sprite
  662.     def damage(value, critical)
  663.       dispose_damage
  664.       if value.is_a?(Numeric)
  665.         damage_string = value.abs.to_s
  666.       else
  667.         damage_string = value.to_s
  668.       end
  669.       bitmap = Bitmap.new(160, 48)
  670.       bitmap.font.name = "Arial Black"
  671.       bitmap.font.size = 32
  672.       bitmap.font.color.set(0, 0, 0)
  673.       bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
  674.       bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
  675.       bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
  676.       bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
  677.       if value.is_a?(Numeric) and value < 0
  678.         bitmap.font.color.set(176, 255, 144)
  679.       else
  680.         bitmap.font.color.set(255, 255, 255)
  681.       end
  682.       bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
  683.       if critical
  684.         bitmap.font.size = 20
  685.         bitmap.font.color.set(0, 0, 0)
  686.         bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
  687.         bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
  688.         bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
  689.         bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
  690.         bitmap.font.color.set(255, 255, 255)
  691.         bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
  692.       end
  693.       @_damage_sprite = ::Sprite.new(self.viewport)
  694.       @_damage_sprite.bitmap = bitmap
  695.       @_damage_sprite.ox = 80
  696.       @_damage_sprite.oy = 20
  697.       @_damage_sprite.x = self.x
  698.       @_damage_sprite.x -= self.bitmap.width/2 if @battler.is_a?(Game_Actor)
  699.       @_damage_sprite.y = self.y - self.oy / 2
  700.       @_damage_sprite.z = 3000
  701.       @_damage_duration = 40
  702.     end
  703.   end
  704. end
  705. module RPG
  706. #--------------------------------------------------------------------------
  707. # ● 常量设定
  708. #--------------------------------------------------------------------------
  709. # 是否显示总伤害
  710. SHOW_TOTAL_DAMAGE = true
  711. # 角色受攻击时是否跳一下
  712. BATTLER_JUMP = true
  713. # 伤害美化字符串文件夹名(放在Pictures文件夹中的子文件夹)
  714. #STRING_DOCUMENTS = ""
  715. # 是否使用伤害美化效果
  716. USE_DAMAGE = true

  717. class Sprite < ::Sprite
  718.    #==========================================
  719.    # 修改说明:
  720.    # @flash_shake用来制作挨打时候跳跃
  721.    # @_damage    用来记录每次打击之后弹出数字
  722.    # @_total_damage 记录总伤害
  723.    # @_total_damage_duration 总伤害持续帧
  724.    #==========================================
  725.    #alias 66RPG_rainbow_initialize : initialize
  726.    def initialize(viewport = nil)
  727.      #66RPG_rainbow_initialize(viewport)
  728.      super(viewport)
  729.      @_whiten_duration = 0
  730.      @_appear_duration = 0
  731.      @_escape_duration = 0
  732.      @_collapse_duration = 0
  733.      @_damage_duration = 0
  734.      @_animation_duration = 0
  735.      @_blink = false
  736.      # 挨打时候跳跃
  737.      @flash_shake = 0
  738.      # 伤害记录数组
  739.      @_damage = []
  740.      # 总伤害数字
  741.      @_total_damage = 0
  742.      # 总伤害持续帧
  743.      @_total_damage_duration = 0
  744.      #.........................................................................
  745.      #记录已经发生的伤害的变量
  746.      @p_dam=0
  747.      @hits=0
  748.      ############ #小改动
  749.      #记录前一次攻击次数
  750.      @temp_hits=0
  751.      #判断是否为最后一次攻击
  752.      @last_hits=0
  753.      ############
  754.      #.........................................................................
  755.    end
  756.     def animation_set_sprites(sprites, cell_data, position)
  757.       for i in 0..15
  758.         sprite = sprites[i]
  759.         pattern = cell_data[i, 0]
  760.         if sprite == nil or pattern == nil or pattern == -1
  761.           sprite.visible = false if sprite != nil
  762.           next
  763.         end
  764.         sprite.visible = true
  765.         sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
  766.         if position == 3
  767.           if self.viewport != nil
  768.             sprite.x = self.viewport.rect.width / 2
  769.             sprite.y = self.viewport.rect.height - 160
  770.           else
  771.             sprite.x = 320
  772.             sprite.y = 240
  773.           end
  774.         else
  775.           sprite.x = self.x - self.ox + self.src_rect.width / 2
  776.           sprite.y = self.y - self.oy + self.src_rect.height / 2
  777.           sprite.y -= self.src_rect.height / 4 if position == 0
  778.           sprite.y += self.src_rect.height / 4 if position == 2
  779.         end
  780.         sprite.x += cell_data[i, 1]
  781.         sprite.y += cell_data[i, 2]
  782.         sprite.z =1
  783.         sprite.ox = 96
  784.         sprite.oy = 96
  785.         sprite.zoom_x = cell_data[i, 3] / 100.0
  786.         sprite.zoom_y = cell_data[i, 3] / 100.0
  787.         sprite.angle = cell_data[i, 4]
  788.         sprite.mirror = (cell_data[i, 5] == 1)
  789.         sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
  790.         sprite.blend_type = cell_data[i, 7]
  791.       end
  792.     end

  793.    #--------------------------------------------------------------------------
  794.    #美化的伤害处理
  795.    #--------------------------------------------------------------------------
  796.     def damage(value, critical)
  797.       
  798. if USE_DAMAGE == true then
  799.   
  800.       # 释放伤害,效果是伤害数字快速消失,觉得不如不消失好看......
  801.       #dispose_damage
  802.       #清除hit数
  803.       dispose_hit
  804.       # 如果伤害值是数值
  805.       if value.is_a?(Numeric)
  806.         # 绝对值转为字符串
  807.         damage_string = value.abs.to_s
  808.       else
  809.         # 转为字符串
  810.         damage_string = value.to_s
  811.       end
  812.       # 初始化位图
  813.       bitmap = Bitmap.new(162, 64)
  814.       bitmap.font.name = ["华文行楷","黑体", "宋体"]
  815.       bitmap.font.size = 32
  816.       # 伤害值是数值的情况下
  817.       if value.is_a?(Numeric)
  818.         # 分割伤害值字符串
  819.         damage_array = damage_string.scan(/./)
  820.         damage_x = 81 - damage_string.size * 9
  821.         # 伤害值为负的情况下
  822.         if value < 0
  823.           # 调用回复数字表
  824.           rect_y = 32
  825.         else
  826.           # 调用伤害数字表
  827.           rect_y = 0
  828.         end
  829.         # 循环伤害值字符串
  830.         for char in damage_array
  831.           number = char.to_i
  832.           # 显示伤害数字
  833.           bitmap.blt(damage_x, 32, RPG::Cache.picture( "Damage"),#"Damagenew"),
  834.           Rect.new(number * 18, rect_y, 18, 32))
  835.           # 后移一位
  836.           damage_x += 18
  837.         end
  838.       # 伤害值不是数值的情况
  839.       else
  840.         # 如果伤害值不是 Miss
  841.         unless value == "Miss"
  842.           # 系统默认描画字符串
  843.           bitmap.font.color.set(0, 0, 0)
  844.           bitmap.draw_text(-1, 27, 162, 36, damage_string, 1)
  845.           bitmap.draw_text(+1, 27, 162, 36, damage_string, 1)
  846.           bitmap.draw_text(-1, 29, 162, 36, damage_string, 1)
  847.           bitmap.draw_text(+1, 29, 162, 36, damage_string, 1)
  848.           bitmap.font.color.set(255, 255, 255)
  849.           bitmap.draw_text(0, 28, 162, 36, damage_string, 1)
  850.         # Miss 的情况下
  851.         else
  852.           # 显示未击中图画
  853.           bitmap.blt(36, 28, RPG::Cache.picture("Damage"), Rect.new(90, 64, 90, 32))
  854.         end
  855.       end
  856.       # 会心一击标志打开的情况
  857.       if critical
  858.         #会心一击伤害效果
  859. ###########################################################
  860.        $game_screen.start_flash(Color.new(255,255,255,255),5)
  861. ###########################################################
  862.         # 显示会心一击图画
  863.         bitmap.blt(36, 0, RPG::Cache.picture( "Damage"), Rect.new(0, 64, 90, 32))
  864.       end
  865.       
  866. else
  867.       
  868.      #.........................................................................
  869.      #清除hit数
  870.      dispose_hit
  871.      #.........................................................................
  872.      if value.is_a?(Numeric)
  873.        damage_string = value.abs.to_s
  874.      else
  875.        damage_string = value.to_s
  876.      end
  877.      bitmap = Bitmap.new(160, 48)
  878.      bitmap.font.name = "Arial Black"
  879.      bitmap.font.size = 32
  880.      bitmap.font.color.set(0, 0, 0)
  881.      bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
  882.      bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
  883.      bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
  884.      bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
  885.      #=======================================
  886.      # 修改:颜色
  887.      #=======================================
  888.      if value.is_a?(Numeric) and value < 0
  889.        bitmap.font.color.set(176, 255, 144)
  890.      else
  891.        bitmap.font.color.set(255, 55, 55)
  892.      end
  893.      bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
  894.      if critical
  895.        #会心一击伤害效果
  896. ###########################################################
  897.        $game_screen.start_flash(Color.new(255,255,255,255),5)
  898. ###########################################################
  899.        bitmap.font.size = 20
  900.        bitmap.font.color.set(0, 0, 0)
  901.        bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
  902.        bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
  903.        bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
  904.        bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
  905.        bitmap.font.color.set(255, 255, 255)
  906.        bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
  907.      end
  908.      
  909. end
  910.    
  911.      # 伤害值定位     
  912.      @_damage_sprite = ::Sprite.new#(self.viewport)
  913.      @_damage_sprite.bitmap = bitmap
  914.      @_damage_sprite.ox = 80
  915.      @_damage_sprite.oy = 20
  916.      @_damage_sprite.x = self.x
  917.      @_damage_sprite.y = self.y - self.oy / 2
  918.      @_damage_sprite.z = 3000
  919.      @_damage_duration = 40
  920.      #=======================================
  921.      # 修改:推入新的伤害
  922.      #=======================================
  923.      @_damage.push([@_damage_sprite,@_damage_duration-10,0, rand(30) - 15, rand(3)])
  924.      # 总伤害处理
  925.      make_total_damage(value)
  926.      
  927.      
  928.      
  929.     end
  930.    #--------------------------------------------------------------------------
  931.    # ● 返回 @hits
  932.    #--------------------------------------------------------------------------
  933.    def get_hit
  934.      return @hits
  935.    end
  936.    #--------------------------------------------------------------------------
  937.    # ● hit数的美化描绘
  938.     # ● hit数的美化描绘
  939.    #--------------------------------------------------------------------------
  940.    #..........................................................................
  941.    def hit
  942.      # 如果伤害值是数值
  943.      # 转为字符串
  944.      value=@hits
  945.      hits_string = value.to_s
  946.      # 初始化位图
  947.      bitmap = Bitmap.new(320, 64)
  948.      bitmap.font.name = "Arial Black"
  949.      bitmap.font.size = 32
  950.      # 分割伤害值字符串
  951.      hits_array = hits_string.scan(/./)
  952.      hits_x = - 36.2#hits_string.size * 18.1 # 81 - hits_string.size * 18.1
  953.      rect_y = 0
  954.      # 循环伤害值字符串
  955.      for char in hits_array
  956.        # 后移一位
  957.        hits_x += 36.2
  958.        number = char.to_i
  959.        # 显示伤害数字
  960.        bitmap.blt(hits_x, 0, RPG::Cache.picture("Number"),
  961.        Rect.new(number * 36.2, rect_y, 36.2, 50))
  962.      end
  963.      hits_x += 18.1
  964.      bitmap.blt(hits_x, 0, RPG::Cache.picture("HITS"),
  965.                 Rect.new(0, -21, 90, 50))
  966.      # 伤害值定位
  967.      @_hits_sprite = ::Sprite.new(self.viewport)
  968.      @_hits_sprite.bitmap = bitmap
  969.      @_hits_sprite.x = 560 - hits_string.size * 36.2
  970.      @_hits_sprite.y = 70
  971.      @_hits_sprite.z = 3000
  972.      @_hits_duration = 40
  973.    end
  974.    #.......................................................................................
  975.    #--------------------------------------------------------------------------
  976.    # ● 美化的总伤害处理
  977.    #--------------------------------------------------------------------------
  978.    def make_total_damage(value)
  979.      
  980. if USE_DAMAGE == true then     
  981.      
  982.      if value.is_a?(Numeric)# and SHOW_TOTAL_DAMAGE
  983.        @_total_damage += value
  984.         # 绝对值转为字符串
  985.         damage_string = @_total_damage.abs.to_s
  986.       else
  987.         return
  988.       end
  989. #####################################################小改动
  990.      if SHOW_TOTAL_DAMAGE
  991. #####################################################
  992.       # 初始化位图
  993.       bitmap = Bitmap.new(300, 150)
  994.       bitmap.font.name = "Arial Black"
  995.       bitmap.font.size = 30
  996.       # 伤害值是数值的情况下
  997.       if value.is_a?(Numeric)
  998.         # 分割伤害值字符串
  999.         damage_array = damage_string.scan(/./)
  1000.         damage_x = 40 - damage_string.size * 9
  1001.         # 伤害值为负的情况下
  1002.         if value < 0
  1003.           # 调用回复数字表
  1004.           name=  "Number3"
  1005.         else
  1006.           # 调用伤害数字表
  1007.           name=   "Number2"
  1008.         end
  1009.         # 循环伤害值字符串
  1010.         for char in damage_array
  1011.           number = char.to_i
  1012.           # 显示伤害数字
  1013.           bitmap.blt(damage_x, 0, RPG::Cache.picture(name),
  1014.           Rect.new(number * 30, 0, 30, 50))
  1015.           # 后移一位
  1016.           damage_x += 26
  1017.         end
  1018. #####################################################小改动
  1019.      end
  1020. #####################################################
  1021.       end
  1022.       
  1023. else
  1024.             
  1025.    #--------------------------------------------------------------------------
  1026.    # ● 总伤害处理
  1027.    #--------------------------------------------------------------------------
  1028.      if value.is_a?(Numeric)# and SHOW_TOTAL_DAMAGE
  1029.        @_total_damage += value
  1030.      else
  1031.        return
  1032.      end
  1033. #####################################################小改动
  1034.      if SHOW_TOTAL_DAMAGE
  1035. #####################################################
  1036.      bitmap = Bitmap.new(300, 150)
  1037.      bitmap.font.name = "Arial Black"
  1038.      bitmap.font.size = 48
  1039.      bitmap.font.color.set(0, 0, 0)
  1040.      bitmap.draw_text(+2, 12+2, 160, 36, @_total_damage.abs.to_s, 1)
  1041.      if @_total_damage < 0
  1042.        bitmap.font.color.set(80, 255, 00)
  1043.      else
  1044.        bitmap.font.color.set(255, 140, 0)
  1045.      end
  1046.      bitmap.draw_text(0, 12, 160, 36, @_total_damage.abs.to_s, 1)
  1047. #####################################################小改动
  1048.      end
  1049. #####################################################
  1050. end

  1051.      if @_total_damage_sprite.nil?
  1052.        @_total_damage_sprite = ::Sprite.new#(self.viewport)
  1053.        @_total_damage_sprite.ox = 80
  1054.        @_total_damage_sprite.oy = 20
  1055.        @_total_damage_sprite.z = 3000
  1056.      end
  1057.      @_total_damage_sprite.bitmap = bitmap
  1058.      @_total_damage_sprite.zoom_x = 1.5
  1059.      @_total_damage_sprite.zoom_y = 1.5
  1060.      @_total_damage_sprite.x = self.x
  1061.      @_total_damage_sprite.y = self.y  - self.oy / 2 - 64
  1062.      @_total_damage_sprite.z = 3001
  1063.      #.........................................................................
  1064.      @_total_damage_duration = 40
  1065.      #.........................................................................
  1066.      #.........................................................................
  1067.      #hit数描绘
  1068.      @hits+=1
  1069.      hit
  1070.      #.........................................................................
  1071.    end
  1072.    def animation(animation, hit, battler_damage="", battler_critical=false)
  1073.      dispose_animation      
  1074.      #=======================================
  1075.      # 修改:记录伤害和critical
  1076.      #=======================================
  1077.      @battler_damage = battler_damage
  1078.      @battler_critical = battler_critical
  1079.      @_animation = animation
  1080.      return if @_animation == nil
  1081.      @_animation_hit = hit
  1082.      @_animation_duration = @_animation.frame_max
  1083.      animation_name = @_animation.animation_name
  1084.      animation_hue = @_animation.animation_hue
  1085.      bitmap = RPG::Cache.animation(animation_name, animation_hue)
  1086.      #=======================================
  1087.      # 修改:计算总闪光权限值
  1088.      #=======================================
  1089.      for timing in @_animation.timings
  1090.        quanzhong = animation_process_timing(timing, @_animation_hit,true)
  1091.        @all_quanzhong += quanzhong
  1092.        # 记录最后一次闪光
  1093.        @_last_frame = timing.frame if quanzhong != 0
  1094.      end
  1095.      #.........................................................................
  1096.      @last_frame = @_last_frame
  1097.      #.........................................................................
  1098.      if @@_reference_count.include?(bitmap)
  1099.        @@_reference_count[bitmap] += 1
  1100.      else
  1101.        @@_reference_count[bitmap] = 1
  1102.      end
  1103.      #=======================================
  1104.      # 修改:行动方动画不显示伤害
  1105.      #=======================================
  1106.      if $scene.is_a?(Scene_Battle)
  1107.        if $scene.animation1_id == @battler.animation_id
  1108.          @battler_damage = ""
  1109.        end
  1110.      end
  1111.      @_animation_sprites = []
  1112.      if @_animation.position != 3 or not @@_animations.include?(animation)
  1113.        for i in 0..15
  1114.          sprite = ::Sprite.new(self.viewport)
  1115.          sprite.bitmap = bitmap
  1116.          sprite.visible = false
  1117.          @_animation_sprites.push(sprite)
  1118.        end
  1119.        unless @@_animations.include?(animation)
  1120.          @@_animations.push(animation)
  1121.        end
  1122.      end
  1123.      update_animation
  1124.    end
  1125.    #=======================================
  1126.    # 修改:更换清除伤害的算法,以防万一
  1127.    #       本内容在脚本中没有使用过
  1128.    #=======================================
  1129.    def dispose_damage
  1130.      for damage in @_damage.reverse
  1131.        damage[0].bitmap.dispose
  1132.        damage[0].dispose
  1133.        @_damage.delete(damage)
  1134.      end
  1135.      @_total_damage = 0
  1136.      @_last_frame = -1
  1137.      if @_total_damage_sprite != nil
  1138.        @_total_damage_duration = 0
  1139.        @_total_damage_sprite.bitmap.dispose
  1140.        @_total_damage_sprite.dispose
  1141.        @_total_damage_sprite = nil
  1142.      end
  1143.    end
  1144.    #=======================================
  1145.    # 清除hit数
  1146.    #=======================================
  1147.    #...........................................................................
  1148.    def dispose_hit
  1149.      if @_hits_sprite != nil
  1150.        @_hits_sprite.bitmap.dispose
  1151.        @_hits_sprite.dispose
  1152.        @_hits_sprite = nil
  1153.      end
  1154.    end
  1155.    #...........................................................................
  1156.    def dispose_animation
  1157.      #=======================================
  1158.      # 修改:清除记录的伤害,清除权重记录
  1159.      #=======================================
  1160.      @battler_damage = nil
  1161.      @battler_critical = nil
  1162.      @all_quanzhong = 1
  1163.      @_total_damage = 0
  1164.      @_last_frame = -1
  1165.      #.........................................................................
  1166.      @hits = 0
  1167.      #.........................................................................
  1168.      if @_animation_sprites != nil
  1169.        sprite = @_animation_sprites[0]
  1170.        if sprite != nil
  1171.          @@_reference_count[sprite.bitmap] -= 1
  1172.          if @@_reference_count[sprite.bitmap] == 0
  1173.            sprite.bitmap.dispose
  1174.          end
  1175.        end
  1176.        for sprite in @_animation_sprites
  1177.          sprite.dispose
  1178.        end
  1179.        @_animation_sprites = nil
  1180.        @_animation = nil
  1181.      end
  1182.    end
  1183.    def update
  1184.      super
  1185.      if @_whiten_duration > 0
  1186.        @_whiten_duration -= 1
  1187.        self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  1188.      end
  1189.      if @_appear_duration > 0
  1190.        @_appear_duration -= 1
  1191.        self.opacity = (16 - @_appear_duration) * 16
  1192.      end
  1193.      if @_escape_duration > 0
  1194.        @_escape_duration -= 1
  1195.        self.opacity = 256 - (32 - @_escape_duration) * 10
  1196.      end
  1197.      if @_collapse_duration > 0
  1198.        @_collapse_duration -= 1
  1199.        self.opacity = 256 - (48 - @_collapse_duration) * 6
  1200.      end
  1201.      #=======================================
  1202.      # 修改:更新算法,更新弹出
  1203.      #=======================================
  1204.      if @_damage_duration > 0
  1205.        @_damage_duration -= 1
  1206.        for damage in @_damage
  1207.          damage[0].x = self.x + self.viewport.rect.x -
  1208.                        self.ox + self.src_rect.width / 2 +
  1209.                        (40 - damage[1]) * damage[3] / 10
  1210.          damage[0].y -= damage[4]+damage[1]/10
  1211.          damage[0].opacity = damage[1]*20
  1212.          damage[1] -= 1
  1213.          if damage[1]==0
  1214.            damage[0].bitmap.dispose
  1215.            damage[0].dispose
  1216.            @_damage.delete(damage)
  1217.            next
  1218.          end
  1219.        end
  1220.      end
  1221.      #=======================================
  1222.      # 添加:弹出总伤害
  1223.      #=======================================
  1224.      if @_total_damage_duration > 0
  1225.        @_total_damage_duration -= 1
  1226.        @_total_damage_sprite.y -= 1 if @_total_damage_duration % 2 == 0
  1227.        if @_total_damage_sprite.zoom_x > 1.0
  1228.          @_total_damage_sprite.zoom_x -= 0.05
  1229.        end
  1230.        if @_total_damage_sprite.zoom_y > 1.0
  1231.          @_total_damage_sprite.zoom_y -= 0.05
  1232.        end
  1233.        @_total_damage_sprite.opacity = 256 - (24 - @_total_damage_duration) * 16
  1234.        #......................................................................
  1235.        if @_total_damage_duration <= 7 and @_total_damage_duration > 0
  1236.          @_hits_sprite.opacity -= 32
  1237.          @_hits_sprite.x += 1
  1238.        end
  1239.        #......................................................................
  1240.        if @_total_damage_duration <= 0
  1241.          #.....................................................................
  1242.          dispose_hit
  1243. ##########################
  1244.          @_total_damage = 0
  1245. ##########################
  1246.          #.....................................................................
  1247.          @_total_damage = 0
  1248.          @_total_damage_duration = 0
  1249. #####################################################小改动
  1250.          if SHOW_TOTAL_DAMAGE
  1251.          @_total_damage_sprite.bitmap.dispose
  1252.          end
  1253. #####################################################
  1254.          @_total_damage_sprite.dispose
  1255.          @_total_damage_sprite = nil
  1256.        end
  1257.      end
  1258.      #=======================================
  1259.      if @_animation != nil and (Graphics.frame_count % 2 == 0)
  1260.        @_animation_duration -= 1
  1261.        update_animation
  1262.      end
  1263.      if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  1264.        update_loop_animation
  1265.        @_loop_animation_index += 1
  1266.        #......................................................................
  1267.        @loop_animation_once = 0
  1268.        @loop_animation_once = 1 if @once == 1 and @_loop_animation_index == @_loop_animation.frame_max
  1269.        #......................................................................
  1270.        @_loop_animation_index %= @_loop_animation.frame_max
  1271.      end
  1272.      
  1273.      if @_loop_animation1 != nil and (Graphics.frame_count % 2 == 0)
  1274.         update_loop_animation1
  1275.         @_loop_animation1_index += 1
  1276.         @_loop_animation1_index %= @_loop_animation1.frame_max
  1277.       end
  1278.       
  1279.      if @_blink
  1280.        @_blink_count = (@_blink_count + 1) % 32
  1281.        if @_blink_count < 16
  1282.          alpha = (16 - @_blink_count) * 6
  1283.        else
  1284.          alpha = (@_blink_count - 16) * 6
  1285.        end
  1286.        self.color.set(255, 255, 255, alpha)
  1287.      end
  1288.      @@_animations.clear
  1289.    end
  1290.    #..........................................................................
  1291.    def loop_animation_once
  1292.      return @_loop_animation_once
  1293.    end
  1294.    #..........................................................................
  1295.    def update_animation
  1296.      if @_animation_duration > 0
  1297.        frame_index = @_animation.frame_max - @_animation_duration
  1298.        @frame_index = frame_index
  1299.        cell_data = @_animation.frames[frame_index].cell_data
  1300.        position = @_animation.position
  1301.        animation_set_sprites(@_animation_sprites, cell_data, position)
  1302.        #=======================================
  1303.        # 修改:弹出伤害,权重计算
  1304.        #=======================================
  1305.        for timing in @_animation.timings
  1306.          if timing.frame == frame_index
  1307.            t = 1.0 * animation_process_timing(timing, @_animation_hit)            
  1308.            #p t,"当前权重", @all_quanzhong,"总权重"
  1309.            if @battler_damage.is_a?(Numeric) and t != 0
  1310.              t *= @battler_damage
  1311.              t /= @all_quanzhong
  1312.              t = t.to_i
  1313.              #在闪光不是最后一次的情况下,把这次伤害加入到已经发生的伤害中★★★★★★★★★★★★★★★★★★★★★★★★★★
  1314.              if frame_index != @_last_frame
  1315.              @p_dam+= t
  1316.              end
  1317.              #p @p_dam,"已发生伤害",@battler_damage,"总伤害"(调试用)★★★★★★★★★★★★★★★★★★★★★★★★★★
  1318.              #闪光为最后一次的情况下,改变这次伤害的计算方法(总伤害-已经发生伤害)★★★★★★★★★★★★★★★★★★★★★★★★★★
  1319.              if frame_index == @_last_frame
  1320.                t= @battler_damage-@p_dam
  1321.              end
  1322.              #p t,"当前伤害",@battler_damage,"总伤害"
  1323.              # 最后一次闪光的话,伤害修正
  1324.              if frame_index == @_last_frame
  1325.                @_total_damage = @battler_damage - t
  1326.                @p_dam=0      #已经发生的伤害归0★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  1327.             end
  1328.              #p t,@battler_damage,@all_quanzhong
  1329.              damage(t,@battler_critical)
  1330.             #连击次数归0★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  1331.             if frame_index == @_last_frame
  1332.                       ############ #小改动
  1333.                       @last_hits=1
  1334.                       @temp_hits=0
  1335.                       ############
  1336.                       @hits=0
  1337.             end
  1338.            # 防止重复播放miss
  1339.            elsif !@battler_damage.is_a?(Numeric) and timing.flash_scope != 0
  1340.              damage(@battler_damage,@battler_critical)
  1341.            end
  1342.          end
  1343.        end
  1344.      else
  1345.        dispose_animation
  1346.      end
  1347.    end
  1348.    #=======================================
  1349.    # 修改:敌人跳跃的功能 + 添加返回数值
  1350.    #=======================================
  1351.    def update_loop_animation
  1352.      frame_index = @_loop_animation_index
  1353.      cell_data = @_loop_animation.frames[frame_index].cell_data
  1354.      position = @_loop_animation.position
  1355.      #·改·
  1356.      if @wait_count.to_i <= 0
  1357.        @wait_count = 0
  1358.        animation_set_sprites(@_loop_animation_sprites, cell_data, position)
  1359.      else
  1360.        @wait_count -= 1
  1361.        for sprite in @_loop_animation_sprites
  1362.          sprite.visible = false
  1363.        end
  1364.      end
  1365.      if @wait_flash.to_i <= 0
  1366.        @wait_flash = 0
  1367.      else
  1368.        @wait_flash -= 1
  1369.        for sprite in @_loop_animation_sprites
  1370.          sprite.blend_type = 1
  1371.        end
  1372.      end
  1373.      #·改·
  1374.      for timing in @_loop_animation.timings
  1375.        if timing.frame == frame_index
  1376.          animation_process_timing(timing, true)
  1377.        end
  1378.      end
  1379.    end
  1380.    #=======================================
  1381.    # 修改:敌人跳跃的功能 + 添加返回数值
  1382.    #=======================================
  1383.    def loop_animation(animation)
  1384.      return if animation == @_loop_animation
  1385.      dispose_loop_animation
  1386.   
  1387.      @_loop_animation = animation
  1388.      return if @_loop_animation == nil
  1389.      @_loop_animation_index = 0
  1390.      animation_name = @_loop_animation.animation_name
  1391.      animation_hue = @_loop_animation.animation_hue
  1392.      bitmap = RPG::Cache.animation(animation_name, animation_hue)
  1393.      if @@_reference_count.include?(bitmap)
  1394.        @@_reference_count[bitmap] += 1
  1395.      else
  1396.        @@_reference_count[bitmap] = 1
  1397.      end
  1398.      @_loop_animation_sprites = []
  1399.      for i in 0..15
  1400.        sprite = ::Sprite.new
  1401.        sprite.bitmap = bitmap
  1402.        sprite.visible = false
  1403.        @_loop_animation_sprites.push(sprite)
  1404.      end
  1405.      update_loop_animation
  1406.    end
  1407.    #=======================================
  1408.    # 修改:敌人跳跃的功能 + 添加返回数值
  1409.    #=======================================
  1410.     def animation_process_timing(timing, hit,dontflash=false)
  1411.       if (timing.condition == 0) or
  1412.          (timing.condition == 1 and hit == true) or
  1413.          (timing.condition == 2 and hit == false)
  1414.         unless dontflash
  1415.           if timing.se.name != ""
  1416.             se = timing.se
  1417.             Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)
  1418.           end
  1419.         end
  1420.         case timing.flash_scope
  1421.         when 1
  1422.           unless dontflash
  1423.             self.flash(timing.flash_color, timing.flash_duration * 2)
  1424.             #....................................................................
  1425.             @wait_flash = timing.flash_duration
  1426.             #....................................................................
  1427.             if @_total_damage >0
  1428.               @flash_shake_switch = true
  1429.               @flash_shake = 10
  1430.             end
  1431.           end
  1432.           return timing.flash_color.alpha * timing.flash_duration
  1433.         when 2
  1434.           unless dontflash
  1435.             if self.viewport != nil
  1436.               self.viewport.flash(timing.flash_color, timing.flash_duration * 2)
  1437.               return timing.flash_color.alpha * timing.flash_duration
  1438.             end
  1439.           end
  1440.         when 3
  1441.           unless dontflash
  1442.             self.flash(nil, timing.flash_duration * 2)
  1443.             #@_loop_animation_count = 1
  1444.             #·改·
  1445.             @wait_count = timing.flash_duration
  1446.             #·改·
  1447.           end
  1448.           return timing.flash_color.alpha * timing.flash_duration
  1449.         end
  1450.       end      
  1451.       return 0
  1452.     end   
  1453. end
  1454. end
  1455. #==============================================================================
  1456. # ■ Sprite_Battler
  1457. #==============================================================================
  1458. class Sprite_Battler < RPG::Sprite
  1459. #--------------------------------------------------------------------------
  1460. # ● 初始化对像
  1461. #    添加跳跃记录
  1462. #--------------------------------------------------------------------------
  1463. def initialize(viewport, battler = nil)
  1464.   super(viewport)
  1465.   @battler = battler
  1466.   @battler_visible = false
  1467.   @flash_shake_switch = true

  1468.   #........................................................................
  1469.   @once = 0
  1470.   @frame_index = -1
  1471.   @last_frame = 0
  1472.   #........................................................................
  1473. end
  1474. #--------------------------------------------------------------------------
  1475. # ● 刷新画面
  1476. #    增添跳跃功能
  1477. #--------------------------------------------------------------------------
  1478. def update
  1479.   super
  1480.   # 战斗者为 nil 的情况下
  1481.   if @battler == nil
  1482.     self.bitmap = nil
  1483.     loop_animation(nil)
  1484.    loop_animation1(nil)
  1485.     return
  1486.   end
  1487.   # 文件名和色相与当前情况有差异的情况下
  1488.   if @battler.battler_name != @battler_name or
  1489.      @battler.battler_hue != @battler_hue
  1490.     # 获取、设置位图
  1491.     @battler_name = @battler.battler_name
  1492.     @battler_hue = @battler.battler_hue
  1493.     self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  1494.     #.......................................................................
  1495.     if not @battler.hidden and not @battler.dead?
  1496.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  1497.     end
  1498.     #.......................................................................
  1499.     @width = bitmap.width
  1500.     [url=home.php?mod=space&uid=291977]@height[/url] = bitmap.height
  1501.     self.ox = @width / 2
  1502.     self.oy = @height
  1503.   end
  1504.   #.......................................................................
  1505.   update_actor_animation
  1506.   update_enemy_animation
  1507.   #.......................................................................
  1508.   # 动画 ID 与当前的情况有差异的情况下
  1509.   #.........................................................................
  1510.   if @battler.is_a?(Game_Enemy)
  1511.     if @once == 1 and @loop_animation_once == 1 and
  1512.        @battler.battler_dead_ani == 1
  1513.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[5])
  1514.     elsif @once == 1 and @loop_animation_once == 1 and $scene.phase != 5
  1515.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  1516.     end
  1517.   end
  1518.   if @battler.is_a?(Game_Actor)
  1519.     ####################################################################
  1520.     if @once == 1 and @loop_animation_once == 1 and $scene.phase != 5 and
  1521.        @battler.battler_dead_ani == 1 and @battler.dead?
  1522.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[5])
  1523.     #######################################################################
  1524.     elsif @once == 1 and @loop_animation_once == 1 and $scene.phase != 5
  1525.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  1526.       #################################################################
  1527.       $fangyu = 0
  1528.       @battler.setup_battler_dead_ani(0)
  1529.       ########################################################
  1530.     elsif @once == 1 and @loop_animation_once == 1 and $scene.phase == 5 and
  1531.           not @battler.dead?
  1532.       @battler.setup_battler_ani(@battler.battler_name.split(/★/)[7])
  1533.       ######################################################
  1534.       $fangyu = 0
  1535.       @battler.setup_battler_dead_ani(0)
  1536.       ######################################################
  1537.     end
  1538.   end
  1539.   
  1540. if @battler.damage == nil and
  1541.        @battler.state_animation_id != @state_animation_id
  1542.       @state_animation_id = @battler.state_animation_id
  1543.      # loop_animation($data_animations[@state_animation_id])
  1544.        loop_animation1($data_animations[@state_animation_id])
  1545.     end

  1546.    
  1547.   if @battler.battler_ani != @battler_ani
  1548.     @battler_ani = @battler.battler_ani
  1549.     @once = @battler.battler_ani_once
  1550.     loop_animation($data_animations[@battler_ani.to_i])
  1551.     # @battler.state_animation_id != @state_animation_id
  1552.       #@state_animation_id = @battler.state_animation_id
  1553.      # loop_animation($data_animations[@state_animation_id])
  1554.       # loop_animation1($data_animations[@state_animation_id])
  1555.      
  1556.    
  1557.   end
  1558.   #.........................................................................
  1559.   # 明灭
  1560.   if @battler.blink
  1561.     blink_on
  1562.   else
  1563.     blink_off
  1564.   end
  1565.   # 不可见的情况下
  1566.   unless @battler_visible
  1567.     # 出现
  1568.     if not @battler.hidden and not @battler.dead? and
  1569.        (@battler.damage == nil or @battler.damage_pop)
  1570.       #.......................................................................
  1571.       if @battler.is_a?(Game_Enemy)
  1572.         @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  1573.         #appear
  1574.       else
  1575.         @battler.setup_battler_ani(@battler.battler_name.split(/★/)[1])
  1576.       end
  1577.       #.......................................................................
  1578.       @battler_visible = true
  1579.     end
  1580.   end
  1581.   # 可见的情况下
  1582.   if @battler_visible
  1583.     # 逃跑
  1584.     if @battler.hidden
  1585.       $game_system.se_play($data_system.escape_se)
  1586.       escape
  1587.       @battler_visible = false
  1588.     end
  1589.     # 白色闪烁
  1590.     if @battler.white_flash
  1591.       whiten
  1592.       @battler.white_flash = false
  1593.     end
  1594.     # 动画
  1595.     if @battler.animation_id != 0
  1596.       animation = $data_animations[@battler.animation_id]
  1597.       animation(animation, @battler.animation_hit,@battler.damage, @battler.critical)
  1598.       # animation(animation, @battler.animation_hit)
  1599.       @battler.animation_id = 0
  1600.     end
  1601.     # 伤害
  1602.     if @battler.damage_pop
  1603.       @battler.damage = nil
  1604.       @battler.critical = false
  1605.       @battler.damage_pop = false
  1606.     end
  1607.     # korapusu
  1608.     if @battler.damage == nil and @battler.dead?
  1609.       if @battler.is_a?(Game_Enemy)
  1610.         if @battler.battler_dead_ani != 1
  1611.           #p "Battler Death Error"
  1612.           $game_system.se_play($data_system.enemy_collapse_se)
  1613.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
  1614.           @battler.setup_battler_dead_ani(1)
  1615.         end
  1616.         #.....................................................................
  1617.         collapse
  1618.         #.....................................................................
  1619.       else
  1620.         #.....................................................................
  1621.         if @battler.battler_dead_ani != 1
  1622.           #p "Battler Death Error"
  1623.           $game_system.se_play($data_system.enemy_collapse_se)
  1624.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
  1625.           @battler.setup_battler_dead_ani(1)
  1626.         end
  1627.         #.....................................................................
  1628.       end
  1629.       @battler_visible = false
  1630.     end
  1631.   end
  1632.   # 设置活动块的坐标
  1633.   if @flash_shake_switch == true
  1634.     self.x = @battler.screen_x
  1635.     self.y = @battler.screen_y
  1636.     self.z = @battler.screen_z
  1637.     @flash_shake_switch = false
  1638.   end
  1639.   if @flash_shake != 0 and @battler.damage != nil and RPG::BATTLER_JUMP
  1640.     if @battler.is_a?(Game_Enemy)
  1641.       case @flash_shake
  1642.       when 9..10
  1643.         self.x -=4
  1644.         self.y -=4
  1645.         self.z = @battler.screen_z
  1646.       when 6..8
  1647.         self.x -=2
  1648.         self.y -=2
  1649.         self.z = @battler.screen_z
  1650.       when 3..5
  1651.         self.x +=2
  1652.         self.y +=2
  1653.         self.z = @battler.screen_z
  1654.       when 1..2
  1655.         self.x +=4
  1656.         self.y +=4
  1657.         self.z = @battler.screen_z
  1658.       end
  1659.     end
  1660.     if @battler.is_a?(Game_Actor)
  1661.       case @flash_shake
  1662.       when 9..10
  1663.         self.x +=4
  1664.         self.y +=4
  1665.         self.z = @battler.screen_z
  1666.       when 6..8
  1667.         self.x +=2
  1668.         self.y +=2
  1669.         self.z = @battler.screen_z
  1670.       when 3..5
  1671.         self.x -=2
  1672.         self.y -=2
  1673.         self.z = @battler.screen_z
  1674.       when 1..2
  1675.         self.x -=4
  1676.         self.y -=4
  1677.         self.z = @battler.screen_z
  1678.       end
  1679.     end
  1680.    @flash_shake -= 1
  1681.   end
  1682. end
  1683. end

  1684. #==============================================================================
  1685. # ■ Scene_Battle
  1686. #------------------------------------------------------------------------------
  1687. #  处理战斗画面的类。
  1688. #==============================================================================

  1689. class Scene_Battle
  1690. #--------------------------------------------------------------------------
  1691. # ● 定义实例变量
  1692. #--------------------------------------------------------------------------
  1693. attr_reader   :animation1_id                    # 行动方动画ID
  1694. end
  1695. class Sprite_Battler < RPG::Sprite
  1696.   #--------------------------------------------------------------------------
  1697.   # ● 处理角色动作
  1698.   #--------------------------------------------------------------------------
  1699.   def update_actor_animation
  1700.     if @battler.is_a?(Game_Actor)
  1701.       if @battler.show_damage_value != nil
  1702.         self.damage(@battler.show_damage_value, false)
  1703.         @battler.show_damage(nil)
  1704.         @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1705.         @battler.setup_battler_hurt_ani(1)
  1706.       end
  1707.       if @battler.current_action.kind == 0 and @battler.current_action.basic == 1 and @battler.show_damage_value != nil
  1708.         # 防御的时候
  1709.         if @hits > @temp_hits and not @battler.dead?
  1710.           ############ #小改动
  1711.           @temp_hits+=1
  1712.           ############
  1713.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[2], 1)
  1714.           @battler.setup_battler_hurt_ani(1)
  1715.           #################################################################
  1716.         elsif @last_hits == 1 and not @battler.dead?
  1717.           ############ #小改动
  1718.           @last_hits = 0
  1719.           ############
  1720.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[2], 1)
  1721.           @battler.setup_battler_hurt_ani(1)
  1722.           #################################################################
  1723.         elsif @frame_index != -1 and @frame_index != @last_frame and not @battler.dead? and [email protected]_a?(Numeric)
  1724.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[2], 1)
  1725.           @battler.setup_battler_hurt_ani(1)
  1726.           #################################################################
  1727.         elsif @last_hits == 1 and not @battler.dead? and [email protected]_a?(Numeric)
  1728.           ############ #小改动
  1729.           @last_hits = 0
  1730.           ############
  1731.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[2], 1)
  1732.           @battler.setup_battler_hurt_ani(1)
  1733.           #################################################################
  1734.         end
  1735.       else
  1736.         # 单回合只有一次攻击
  1737.        if @last_hits == 1 and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0 and $fangyu != 1
  1738.           ############ #小改动
  1739.           @last_hits = 0
  1740.           ############
  1741.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1742.           @battler.setup_battler_hurt_ani(1)
  1743.           #################################################################
  1744.         # 单回合多次攻击
  1745.        elsif @hits > @temp_hits and @frame_index != @last_frame and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0 and $fangyu != 1
  1746.           ############ #小改动
  1747.           @temp_hits+=1
  1748.           ############
  1749.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1750.           @battler.setup_battler_hurt_ani(1)
  1751.         ########################################################################
  1752.         # 死亡之前攻击
  1753.        elsif @hits > @temp_hits and @frame_index != @last_frame and @battler.damage.is_a?(Numeric) and @battler.damage > 0 and $fangyu != 1 and @battler.dead? and @battler.battler_dead_ani != 1
  1754.           ############ #小改动
  1755.           @temp_hits+=1
  1756.           ############
  1757.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1758.           @battler.setup_battler_hurt_ani(1)
  1759.           #################################################################
  1760.         # 闪避的回合
  1761.        elsif !@battler_damage.is_a?(Numeric) and @last_hits == 1 and @frame_index == @last_frame
  1762.           @last_hits = 0
  1763.           #################################################################
  1764.         # 无伤害的攻击
  1765.         elsif @battler_damage.is_a?(Numeric) and @battler.damage == 0 and @last_hits == 1 and @frame_index == @last_frame
  1766.           @last_hits = 0
  1767.           #################################################################
  1768.         # 死亡判定
  1769.        elsif @last_hits == 1 and @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
  1770. #          for actor in $game_party.actors
  1771. #默认的话  如果死亡  其他角色添加第六号状态
  1772. #《石焚刃暖》里 是狂暴状态
  1773. #            if @battler != actor
  1774. #              actor.add_state(6)
  1775. #            end
  1776. #          end
  1777.           @last_hits = 0
  1778.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
  1779.           @battler.setup_battler_dead_ani(1)
  1780.           #################################################################
  1781.         # 胜利判定

  1782.         end
  1783.       end
  1784.     end
  1785.   end
  1786.   #--------------------------------------------------------------------------
  1787.   # ● 处理敌人动作
  1788.   #--------------------------------------------------------------------------
  1789.   def update_enemy_animation
  1790.     if @battler.is_a?(Game_Enemy)
  1791.       if @battler.show_damage_value != nil
  1792.         self.damage(@battler.show_damage_value, false)
  1793.         @battler.show_damage(nil)
  1794.         @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1795.         @battler.setup_battler_hurt_ani(1)
  1796.       end
  1797.       if @battler.current_action.kind == 0 and @battler.current_action.basic == 1
  1798.       else
  1799.         # 单回合只有一次攻击
  1800.         if @last_hits == 1 and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0
  1801.           ############ #小改动
  1802.           @last_hits = 0
  1803.           ############
  1804.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1805.           @battler.setup_battler_hurt_ani(1)
  1806.           #################################################################
  1807.         # 单回合多次攻击
  1808.        elsif @hits > @temp_hits and @frame_index != @last_frame and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0
  1809.           ############ #小改动
  1810.           @temp_hits+=1
  1811.           ############
  1812.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1813.           @battler.setup_battler_hurt_ani(1)
  1814.           #################################################################
  1815.         # 死亡之前攻击
  1816.        elsif @hits > @temp_hits and @frame_index != @last_frame and @battler.damage.is_a?(Numeric) and @battler.damage > 0 and @battler.dead? and @battler.battler_dead_ani != 1
  1817.           ############ #小改动
  1818.           @temp_hits+=1
  1819.           ############
  1820.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
  1821.           @battler.setup_battler_hurt_ani(1)
  1822.           #################################################################
  1823.         # 无伤害的攻击
  1824.         elsif !@battler_damage.is_a?(Numeric) and @last_hits == 1 and @frame_index == @last_frame
  1825.           @last_hits = 0
  1826.           #################################################################
  1827.         # 闪避的回合
  1828.         elsif @battler_damage.is_a?(Numeric) and @battler.damage == 0 and @last_hits == 1 and @frame_index == @last_frame
  1829.           @last_hits = 0
  1830.           #################################################################
  1831.         # 死亡判定
  1832.         elsif @last_hits == 1 and @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
  1833.           @last_hits = 0
  1834.           @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
  1835.           @battler.setup_battler_dead_ani(1)
  1836.           collapse
  1837.         end
  1838.       end
  1839.     end
  1840.   end
  1841. end

复制代码

点评

脚本在此。  发表于 2013-7-28 23:18
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
657
在线时间
333 小时
注册时间
2011-3-14
帖子
121
3
 楼主| 发表于 2013-7-29 08:32:23 | 只看该作者
用代码打脚本出了些小问题
554行应为if @battler == nil
571行应为@height = bitmap.height
1509行应为@height = bitmap.height
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-8 19:57

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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