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

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: 黑米馒头
打印 上一主题 下一主题

[已经解决] 吸血技能

[复制链接]

Lv1.梦旅人

薄凉看客

梦石
0
星屑
50
在线时间
1269 小时
注册时间
2010-6-20
帖子
1316
11
发表于 2014-8-29 19:30:21 | 只看该作者
测试的时候可以防御一下因为老牛也会鹰击~

真移位物理(主动and被动),法术连击.rar

540.25 KB, 下载次数: 26

点评

哎呀激动了不小新连贴了  发表于 2014-8-29 19:30
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3526
在线时间
1887 小时
注册时间
2010-6-19
帖子
1210
12
 楼主| 发表于 2014-8-29 19:41:37 | 只看该作者
恐惧剑刃 发表于 2014-8-29 18:45
主动连击也放进去了,顺便测试下那个十字斩吧
两个附件,新建文本文档的那个是你说会报错的那个问题 ...

坑了,连击效果还是不行,我把Battke4的脚本全贴出来你看下,
连击放进去就,有连击技能攻击就显示      target.attack_effect(@active_battler, 0.8)#80%的伤害  错误
  1. #==============================================================================
  2. # ■ Scene_Battle (分割定义 4)
  3. #------------------------------------------------------------------------------
  4. #  处理战斗画面的类。
  5. #==============================================================================

  6. class Scene_Battle
  7.   #--------------------------------------------------------------------------
  8.   # ● 开始主回合
  9.   #--------------------------------------------------------------------------
  10.   def start_phase4
  11.    
  12.     # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
  13.     # 检测队伍中的敌人是否存在连续伤害
  14.     for enemy in $game_troop.enemies
  15.       if enemy.hp > 0 and @active_battler.slip_damage?
  16.         enemy.slip_damage_effect
  17.         enemy.damage_pop = true
  18.       end
  19.     end  
  20.     # 检测队伍中的角色是否存在连续伤害
  21.     for actor in $game_party.actors
  22.       if actor.hp > 0 and @active_battler.slip_damage?
  23.         actor.slip_damage_effect
  24.         actor.damage_pop = true
  25.       end
  26.     end  
  27.     # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
  28.    
  29.    
  30.     #获取我方保护者列表...
  31.       for i in 0..$game_party.actors.size-1
  32.         if $game_party.actors[i].current_action.kind == 6 and $game_party.actors[$game_party.actors[i].current_action.target_index].baohu.include?(i) == false
  33.            $game_party.actors[$game_party.actors[i].current_action.target_index].baohu.push(i)
  34.         end
  35.       end
  36.       
  37.     # 转移到回合 4
  38.     @phase = 4
  39.     # 回合数计数
  40.     $game_temp.battle_turn += 1
  41.     # 搜索全页的战斗事件
  42.     for index in 0...$data_troops[@troop_id].pages.size
  43.       # 获取事件页
  44.       page = $data_troops[@troop_id].pages[index]
  45.       # 本页的范围是 [回合] 的情况下
  46.       if page.span == 1
  47.         # 设置已经执行标志
  48.         $game_temp.battle_event_flags[index] = false
  49.       end
  50.     end
  51.     # 设置角色为非选择状态
  52.     @actor_index = -1
  53.     @active_battler = nil
  54.     # 有效化同伴指令窗口
  55.     @party_command_window.active = false
  56.     @party_command_window.visible = false
  57.     # 无效化角色指令窗口
  58.     @actor_command_window.active = false
  59.     @actor_command_window.visible = false
  60.     @actor2_command_window.active = false
  61.     @actor2_command_window.visible = false
  62.     # 设置主回合标志
  63.     $game_temp.battle_main_phase = true
  64.     # 生成敌人行动
  65.     for enemy in $game_troop.enemies
  66.       enemy.make_action
  67.     end
  68.     # 生成行动顺序
  69.     make_action_orders
  70.     # 移动到步骤 1
  71.     @phase4_step = 1
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● 生成行动循序
  75.   #--------------------------------------------------------------------------
  76.   def make_action_orders
  77.     # 初始化序列 @action_battlers
  78.     @action_battlers = []
  79.     # 添加敌人到 @action_battlers 序列
  80.     for enemy in $game_troop.enemies
  81.       @action_battlers.push(enemy)
  82.     end
  83.     # 添加角色到 @action_battlers 序列
  84.     for actor in $game_party.actors
  85.       @action_battlers.push(actor)
  86.     end
  87.     # 确定全体的行动速度
  88.     for battler in @action_battlers
  89.       battler.make_action_speed
  90.     end
  91.     # 按照行动速度从大到小排列
  92.     @action_battlers.sort! {|a,b|
  93.       b.current_action.speed - a.current_action.speed }
  94.   end
  95.   #--------------------------------------------------------------------------
  96.   # ● 刷新画面 (主回合)
  97.   #--------------------------------------------------------------------------
  98.   def update_phase4
  99.     if @kds_count != nil and @kds_count > 0
  100.       @kds_count -= 1
  101.       return
  102.     end
  103.    
  104.     if $lianji == 0
  105.       $lianji = nil
  106.      unless @active_battler.current_action.forcing
  107.        if @active_battler.restriction == 2 or @active_battler.restriction == 3
  108.          @active_battler.current_action.kind = 0
  109.          @active_battler.current_action.basic = 0
  110.        end
  111.        if @active_battler.restriction == 4
  112.          $game_temp.forcing_battler = nil
  113.          @phase4_step = 1
  114.           return
  115.        end
  116.      end
  117.      @target_battlers = []
  118.      case @active_battler.current_action.kind
  119.      when 0
  120.        make_basic_action_result
  121.      when 1
  122.        make_skill_action_result
  123.      when 2
  124.        make_item_action_result
  125.      end
  126.     end
  127.    
  128.    
  129.     case @phase4_step
  130.     when 1
  131.       update_phase4_step1
  132.     when 2
  133.       update_phase4_step2
  134.     when 3
  135.       update_phase4_step3
  136.     when 4
  137.       update_phase4_step4
  138.     when 5
  139.       update_phase4_step5
  140.     when 6
  141.       update_phase4_step6
  142.     end
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● 刷新画面 (主回合步骤 1 : 准备行动)
  146.   #--------------------------------------------------------------------------
  147.   def update_phase4_step1
  148.     # 隐藏帮助窗口
  149.     @help_window.visible = false
  150.     # 判定胜败
  151.     if judge
  152.       # 胜利或者失败的情况下 : 过程结束
  153.       return
  154.     end
  155.     # 强制行动的战斗者不存在的情况下
  156.     if $game_temp.forcing_battler == nil
  157.       # 设置战斗事件
  158.       setup_battle_event
  159.       # 执行战斗事件中的情况下
  160.       if $game_system.battle_interpreter.running?
  161.         return
  162.       end
  163.     end
  164.     # 强制行动的战斗者存在的情况下
  165.     if $game_temp.forcing_battler != nil
  166.       # 在头部添加后移动
  167.       @action_battlers.delete($game_temp.forcing_battler)
  168.       @action_battlers.unshift($game_temp.forcing_battler)
  169.     end
  170.     # 未行动的战斗者不存在的情况下 (全员已经行动)
  171.     if @action_battlers.size == 0
  172.       # 开始同伴命令回合
  173.       start_phase2
  174.       return
  175.     end
  176.     # 初始化动画 ID 和公共事件 ID
  177.     @animation1_id = 0
  178.     @animation2_id = 0
  179.     @common_event_id = 0
  180.     # 未行动的战斗者移动到序列的头部
  181.     @active_battler = @action_battlers.shift
  182.     # 如果已经在战斗之外的情况下
  183.     if @active_battler.index == nil
  184.       return
  185.     end
  186.    
  187.     #=====================================================================
  188.     # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
  189.     # 连续伤害
  190.     #if @active_battler.hp > 0 and @active_battler.slip_damage?
  191.     #  @active_battler.slip_damage_effect
  192.     #  @active_battler.damage_pop = true
  193.     #end
  194.     # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
  195.     #=====================================================================
  196.     # 自然解除状态
  197.     @active_battler.remove_states_auto
  198.     # 刷新状态窗口
  199.     @status_window.refresh
  200.     # 移至步骤 2
  201.     @phase4_step = 2
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● 刷新画面 (主回合步骤 2 : 开始行动)
  205.   #--------------------------------------------------------------------------
  206.   def update_phase4_step2
  207.     # 如果不是强制行动
  208.     unless @active_battler.current_action.forcing
  209.       
  210.   
  211.     for kds in 0..$game_party.actors.size-1
  212.       if $game_party.actors[kds].current_action.kind == 3 or $game_party.actors[kds].current_action.kind == 6
  213.       else
  214.         $game_party.actors[kds].kds_a1 = $game_party.actors[kds].current_action.kind
  215.         $game_party.actors[kds].kds_a2 = $game_party.actors[kds].current_action.basic
  216.        if $game_party.actors[kds].current_action.kind == 0 and $game_party.actors[kds].current_action.basic == 0
  217.         $game_party.actors[kds].kds_tg = $game_party.actors[kds].current_action.target_index
  218.        elsif $game_party.actors[kds].current_action.kind == 1
  219.          $game_party.actors[kds].kds_id = $game_party.actors[kds].current_action.skill_id
  220.          $game_party.actors[kds].kds_tg = $game_party.actors[kds].current_action.target_index
  221.        elsif $game_party.actors[kds].current_action.kind == 2
  222.          $game_party.actors[kds].kds_id2 = $game_party.actors[kds].current_action.item_id
  223.          $game_party.actors[kds].kds_tg2 = $game_party.actors[kds].current_action.target_index
  224.        end
  225.       end
  226.     end
  227.       
  228.       
  229.     if  @active_battler.is_a?(Game_Actor)
  230.       
  231.        for kds in @active_battler.skills #@active_battler.actions

  232.          if $data_skills[kds].element_set.include?(38)
  233.              if @active_battler.dead? == false
  234.               @active_battler.damage = - @active_battler.level*2
  235.               @active_battler.hp += @active_battler.level*2
  236.               @active_battler.critical = false
  237.               @active_battler.damage_pop = true
  238.               @status_window.refresh
  239.              end
  240.             break
  241.          elsif $data_skills[kds].element_set.include?(37)
  242.              if @active_battler.dead? == false
  243.               @active_battler.damage = - @active_battler.level*1
  244.               @active_battler.hp += @active_battler.level*1
  245.               @active_battler.critical = false
  246.               @active_battler.damage_pop = true
  247.               @status_window.refresh
  248.              end
  249.             break
  250.          end
  251.        end
  252.     end


  253.       
  254.       # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下
  255.       if @active_battler.restriction == 2 or @active_battler.restriction == 3
  256.         # 设置行动为攻击
  257.         @active_battler.current_action.kind = 0
  258.         @active_battler.current_action.basic = 0
  259.       end
  260.       # 限制为 [不能行动] 的情况下
  261.       if @active_battler.restriction == 4
  262.         # 清除行动强制对像的战斗者
  263.         $game_temp.forcing_battler = nil
  264.         # 移至步骤 1
  265.         @phase4_step = 1
  266.         return
  267.       end
  268.     end
  269.     # 清除对像战斗者
  270.     @target_battlers = []
  271.     # 行动种类分支
  272.     case @active_battler.current_action.kind
  273.     when 0  # 基本
  274.       make_basic_action_result
  275.     when 1  # 特技
  276.       make_skill_action_result
  277.     when 2  # 物品
  278.       make_item_action_result
  279.     end
  280.    
  281.     #==========================================================
  282.     # 被动技能-物理、魔法连击效果
  283.     #==========================================================
  284.     @kds_hit = 0
  285.     if @active_battler.is_a?(Game_Actor) and @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
  286.        for kds in @active_battler.skills
  287.          if $data_skills[kds].element_set.include?(33)
  288.            if rand(100) < 20
  289.            @kds_hit = 1
  290.            end
  291.            break
  292.          elsif $data_skills[kds].element_set.include?(34)
  293.            if rand(100) < 33
  294.            @kds_hit = 1
  295.            end
  296.            break
  297.          end
  298.        end
  299.     elsif @active_battler.current_action.kind == 1 and @active_battler.is_a?(Game_Actor)
  300.        for kds in @active_battler.skills
  301.          if $data_skills[kds].element_set.include?(26)
  302.            if rand(100) < 33
  303.            @kds_hit = 1
  304.            end
  305.            break
  306.          elsif $data_skills[kds].element_set.include?(25)
  307.            if rand(100) < 20
  308.            @kds_hit = 1
  309.            end
  310.            break
  311.          end
  312.        end
  313.     end
  314.    
  315.     if @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
  316.      for kds in @active_battler.actions
  317.        if $data_skills[kds.skill_id].element_set.include?(34)
  318.           if rand(100) < 25
  319.            @kds_hit = 1
  320.           end
  321.            break
  322.        elsif $data_skills[kds.skill_id].element_set.include?(33)
  323.           if rand(100) < 13
  324.            @kds_hit = 1
  325.           end
  326.            break
  327.        end
  328.      end
  329.     elsif @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.kind == 1
  330.      for kds in @active_battler.actions
  331.        if $data_skills[kds.skill_id].element_set.include?(26)
  332.          if rand(100) < 25
  333.            @kds_hit = 1
  334.          end
  335.            break
  336.        elsif $data_skills[kds.skill_id].element_set.include?(25)
  337.         if rand(100) < 13   
  338.            @kds_hit = 1
  339.         end
  340.            break
  341.        end
  342.      end
  343.     end
  344.       
  345.       
  346.     # 移至步骤 3
  347.     if @phase4_step == 2
  348.       @phase4_step = 3
  349.     end
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   # ● 生成基本行动结果
  353.   #--------------------------------------------------------------------------
  354.   def make_basic_action_result
  355.     # 攻击的情况下
  356.     if @active_battler.current_action.basic == 0
  357.       # 设置攻击 ID
  358.       @animation1_id = @active_battler.animation1_id
  359.       @animation2_id = @active_battler.animation2_id
  360.       # 行动方的战斗者是敌人的情况下
  361.       if @active_battler.is_a?(Game_Enemy)
  362.         if @active_battler.restriction == 3
  363.           target = $game_troop.random_target_enemy
  364.         elsif @active_battler.restriction == 2
  365.           target = $game_party.random_target_actor
  366.         else
  367.           index = @active_battler.current_action.target_index
  368.           target = $game_party.smooth_target_actor(index)
  369.         end
  370.       end
  371.       # 行动方的战斗者是角色的情况下
  372.       if @active_battler.is_a?(Game_Actor)
  373. # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  374.   #-------★★没改前★★-----------------------------------------------------
  375.   #  @animation1_id = @active_battler.animation1_id; @animation2_id = 23
  376.   #-------★★没改前★★-----------------------------------------------------
  377.         @animation1_id = @active_battler.animation1_id
  378.         @animation2_id = @active_battler.animation2_id
  379. # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  380.         if @active_battler.restriction == 3
  381.           target = $game_party.random_target_actor
  382.         elsif @active_battler.restriction == 2
  383.           target = $game_troop.random_target_enemy
  384.         else
  385.           index = @active_battler.current_action.target_index
  386.           target = $game_troop.smooth_target_enemy(index)
  387.         end
  388.       end
  389.       #############加入的########################
  390.       @help_window.set_text(@active_battler.name + "发动了攻击", 1)
  391.       # 设置对像方的战斗者序列
  392.       @target_battlers = [target]
  393.       # 应用通常攻击效果
  394.       for target in @target_battlers
  395.         target.attack_effect(@active_battler)
  396.       end
  397.       return
  398.     end
  399.     # 防御的情况下
  400. if @active_battler.current_action.basic == 1
  401.   #############加入的########################
  402.   @help_window.set_text(@active_battler.name + "选择了" + $data_system.words.guard, 1) #修改内容
  403.    #   @help_window.set_text($data_system.words.guard, 1)
  404.       # ——回复。可以改为SP。
  405.       @active_battler.damage = -@active_battler.maxsp * 0.08
  406.       @active_battler.damage = @active_battler.damage.to_i
  407.       @active_battler.sp -= @active_battler.damage
  408.       # 回復值的表示
  409.       @target_battlers.push(@active_battler)
  410.       # ——回复。可以改为SP。
  411.       @active_battler.damage = -@active_battler.maxhp * 0.08
  412.       @active_battler.damage = @active_battler.damage.to_i
  413.       @active_battler.hp -= @active_battler.damage
  414.       # 回復值的表示
  415.       @target_battlers.push(@active_battler)
  416.       return
  417.     end
  418.     # 逃跑的情况下
  419.     if @active_battler.is_a?(Game_Enemy) and
  420.        @active_battler.current_action.basic == 2
  421.       #  帮助窗口显示"逃跑"
  422.      # @help_window.set_text("逃跑", 1)
  423.       #############加入的########################
  424.       @help_window.set_text(@active_battler.name + "逃跑了", 1) #修改内容
  425.       # 逃跑
  426.       @active_battler.escape
  427.       return
  428.     end
  429.     # 什么也不做的情况下
  430.     if @active_battler.current_action.basic == 3
  431.       # 清除强制行动对像的战斗者
  432.       $game_temp.forcing_battler = nil
  433.       # 移至步骤 1
  434.       @phase4_step = 1
  435.       return
  436.     end
  437.   end
  438.   #--------------------------------------------------------------------------
  439.   # ● 设置物品或特技对像方的战斗者
  440.   #     scope : 特技或者是物品的范围
  441.   #--------------------------------------------------------------------------
  442.   def set_target_battlers(scope)
  443.     # 行动方的战斗者是敌人的情况下
  444.     if @active_battler.is_a?(Game_Enemy)
  445.       # 效果范围分支
  446.       case scope
  447.       when 1  # 敌单体
  448.         index = @active_battler.current_action.target_index
  449.         @target_battlers.push($game_party.smooth_target_actor(index))
  450.         dr_ac
  451.       when 2  # 敌全体
  452.         for actor in $game_party.actors
  453.           if actor.exist?
  454.             @target_battlers.push(actor)
  455.           end
  456.         end
  457.       when 3  # 我方单体
  458.         index = @active_battler.current_action.target_index
  459.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  460.         dr_dr
  461.       when 4  # 我方全体
  462.         for enemy in $game_troop.enemies
  463.           if enemy.exist?
  464.             @target_battlers.push(enemy)
  465.           end
  466.         end
  467.       when 5  # 我方单体 (HP 0)
  468.         index = @active_battler.current_action.target_index
  469.         enemy = $game_troop.enemies[index]
  470.         if enemy != nil and enemy.hp0?
  471.           @target_battlers.push(enemy)
  472.         end
  473.       when 6  # 我方全体 (HP 0)
  474.         for enemy in $game_troop.enemies
  475.           if enemy != nil and enemy.hp0?
  476.             @target_battlers.push(enemy)
  477.           end
  478.         end
  479.       when 7  # 使用者
  480.         @target_battlers.push(@active_battler)
  481.       end
  482.     end
  483.     # 行动方的战斗者是角色的情况下
  484.     if @active_battler.is_a?(Game_Actor)
  485.       # 效果范围分支
  486.       case scope
  487.       when 1  # 敌单体
  488.         index = @active_battler.current_action.target_index
  489.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  490.         ac_dr
  491.       when 2  # 敌全体
  492.         for enemy in $game_troop.enemies
  493.           if enemy.exist?
  494.             @target_battlers.push(enemy)
  495.           end
  496.         end
  497.       when 3  # 我方单体
  498.         index = @active_battler.current_action.target_index
  499.         @target_battlers.push($game_party.smooth_target_actor(index))
  500.         ac_ac   
  501.       when 4  # 我方全体
  502.         for actor in $game_party.actors
  503.           if actor.exist?
  504.             @target_battlers.push(actor)
  505.           end
  506.         end
  507.       when 5  # 我方单体 (HP 0)
  508.         index = @active_battler.current_action.target_index
  509.         actor = $game_party.actors[index]
  510.         if actor != nil and actor.hp0?
  511.           @target_battlers.push(actor)
  512.         end
  513.       when 6  # 我方全体 (HP 0)
  514.         for actor in $game_party.actors
  515.           if actor != nil and actor.hp0?
  516.             @target_battlers.push(actor)
  517.           end
  518.         end
  519.       when 7  # 使用者
  520.         @target_battlers.push(@active_battler)
  521.       end
  522.     end
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # ● 生成特技行动结果
  526.   #--------------------------------------------------------------------------
  527.   def make_skill_action_result
  528.     # 行动方的战斗者是角色的情况下  
  529.     if @active_battler.is_a?(Game_Actor)
  530.     #   p "玩家角色发动特技"
  531.     # 在这里写你对游戏中角色使用特技的处理(682行)
  532.     # 获取特技   
  533.        [url=home.php?mod=space&uid=260100]@skill[/url] = $data_skills[@active_battler.current_action.skill_id]
  534.     # 行动方的战斗者是敌人的情况下
  535.     elsif @active_battler.is_a?(Game_Enemy)
  536.     #   p "敌人发动特技"
  537.     # 在这里写你对游戏中敌人使用特技的处理(520行开始)  
  538.     #########物理法术#########[敌人]
  539.     if @active_battler.current_action.skill_id == 1 or
  540.        @active_battler.current_action.skill_id == 2 or
  541.        @active_battler.current_action.skill_id == 3 or
  542.        @active_battler.current_action.skill_id == 274    #[善恶有报]
  543.        @active_battler.current_action.kind = 0
  544.     # 获取特技      
  545.        @skill = $data_skills[@active_battler.current_action.skill_id]
  546.      elsif
  547.     # 在这里写你对游戏中敌人使用特技的处理(520行)
  548.     #########远程法术#########[敌人]  
  549.        @skill = $data_skills[@active_battler.current_action.skill_id]  
  550.      end
  551.    end
  552.     # 如果不是强制行动
  553.     unless @active_battler.current_action.forcing
  554.       # 因为 SP 耗尽而无法使用的情况下
  555.       unless @active_battler.skill_can_use?(@skill.id)
  556.         # 清除强制行动对像的战斗者
  557.         $game_temp.forcing_battler = nil
  558.         # 移至步骤 1
  559.         @phase4_step = 1
  560.         return
  561.       end
  562.     end
  563.     # 消耗 SP
  564.     @active_battler.sp -= @skill.sp_cost
  565.     # 刷新状态窗口
  566.     @status_window.refresh
  567.     # 在帮助窗口显示特技名
  568.     #############加入的########################
  569.     @help_window.set_text(@active_battler.name + "使用了" + @skill.name, 1) #修改内容
  570.     # 设置动画 ID
  571.     # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  572.     #====攻击法术====================================================
  573.     if @active_battler.is_a?(Game_Actor)  #设置的ID要和682行的相同
  574.           #########物理法术#########[角色]
  575.     if @active_battler.current_action.skill_id == 1 or
  576.        @active_battler.current_action.skill_id == 2 or
  577.        @active_battler.current_action.skill_id == 3 or
  578.        @active_battler.current_action.skill_id == 274    #[善恶有报]
  579.        @animation1_id = @active_battler.animation1_id    #攻击动画
  580.        @animation2_id = @skill.animation2_id
  581.     elsif
  582.        @animation1_id = @active_battler.skill_animation_id
  583.        @animation2_id = @skill.animation2_id
  584.     end
  585.     elsif @active_battler.is_a?(Game_Enemy)  #设置的ID要和520行的相同
  586.           #########物理法术#########[敌人]
  587.     if @active_battler.current_action.skill_id == 1 or
  588.        @active_battler.current_action.skill_id == 2 or
  589.        @active_battler.current_action.skill_id == 3 or
  590.        @active_battler.current_action.skill_id == 274    #[善恶有报]
  591.        @animation1_id = @active_battler.animation1_id    #攻击动画
  592.        @animation2_id = @skill.animation2_id
  593.     elsif
  594.        @animation1_id = @active_battler.skill_animation_id
  595.        @animation2_id = @skill.animation2_id
  596.     end
  597.    end
  598.     #==============================================================
  599.     # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  600.     # 设置公共事件 ID
  601.     @common_event_id = @skill.common_event_id
  602.     # 设置对像侧战斗者
  603.     set_target_battlers(@skill.scope)
  604.     # 应用特技效果
  605.     for target in @target_battlers
  606.       target.skill_effect(@active_battler, @skill)
  607.     end
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ● 生成物品行动结果
  611.   #--------------------------------------------------------------------------
  612.   def make_item_action_result
  613.     # 获取物品
  614.     @item = $data_items[@active_battler.current_action.item_id]
  615.     # 因为物品耗尽而无法使用的情况下
  616.     unless $game_party.item_can_use?(@item.id)
  617.       # 移至步骤 1
  618.       @phase4_step = 1
  619.       return
  620.     end
  621.     # 消耗品的情况下
  622.     if @item.consumable
  623.       # 使用的物品减 1
  624.       $game_party.lose_item(@item.id, 1)
  625.     end
  626.     # 在帮助窗口显示物品名
  627.     #############加入的########################
  628.     @help_window.set_text(@active_battler.name + "使用了" + @item.name, 1) #修改内容
  629. #   @help_window.set_text(@item.name, 1)
  630.     # 设置动画 ID
  631.     @animation1_id = @item.animation1_id
  632.     @animation2_id = @item.animation2_id
  633.     # 设置公共事件 ID
  634.     @common_event_id = @item.common_event_id
  635.     # 确定对像
  636.     index = @active_battler.current_action.target_index
  637.     target = $game_party.smooth_target_actor(index)
  638.     # 设置对像侧战斗者
  639.     set_target_battlers(@item.scope)
  640.     # 应用物品效果
  641.     for target in @target_battlers
  642.       target.item_effect(@item)
  643.     end
  644.   end
  645.   #--------------------------------------------------------------------------
  646.   # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  647.   #--------------------------------------------------------------------------
  648.   def update_phase4_step3
  649.    
  650.     @someonehurt = 0


  651.    
  652.     #保护系统-保护效果显示-1
  653.      for kds in 0..$game_party.actors.size-1
  654.        if $game_party.actors[kds].baohu_dx != nil
  655.           $game_party.actors[$game_party.actors[kds].baohu_dx].animation_id
  656.        end
  657.        if $game_party.actors[kds].baohu_dxb != nil
  658.           $game_party.actors[$game_party.actors[kds].baohu_dxb].animation_id
  659.        end
  660.      end
  661.    
  662.      for kds in 0..$game_party.actors.size-1
  663.        if $game_party.actors[kds].baohu_dx != nil
  664.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_x = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_x
  665.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_y = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_y
  666.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_z = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_z
  667.          $game_party.actors[kds].baohu_time1 = 0
  668.          $game_party.actors[kds].baohu_donghua1 = 0
  669.        end
  670.        if $game_party.actors[kds].baohu_dxb != nil
  671.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_x = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_x
  672.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_y = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_y
  673.          $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_z = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_z
  674.          $game_party.actors[kds].baohu_time1b = 0
  675.          $game_party.actors[kds].baohu_donghua1b = 0
  676.        end
  677.      end
  678.    
  679.      if (@active_battler.is_a?(Game_Actor) and ((@active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0 ) or (@active_battler.current_action.kind == 1 and @skill.element_set.include?(13) ))) and (@active_battler.baohu_x != @active_battler.s_x or @active_battler.baohu_y != @active_battler.s_y)
  680.         @active_battler.s_x = @active_battler.screen_x
  681.         @active_battler.s_y = @active_battler.screen_y
  682.         @active_battler.s_z = @active_battler.screen_z
  683.      end
  684.    
  685.     #保护系统-更改保护者图片
  686.      for i in 0..$game_party.actors.size-1
  687.         if $game_party.actors[i].baohu_dx != nil
  688.               $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
  689.               $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★4"
  690.         end
  691.         if $game_party.actors[i].baohu_dxb != nil
  692.               $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
  693.               $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name + "★4"
  694.         end
  695.     end

  696. ####真移位#################   
  697.   #===================角色法术ID设置===============================  
  698.    if @active_battler.current_action.skill_id == 1 or
  699.       @active_battler.current_action.skill_id == 2 or
  700.       @active_battler.current_action.skill_id == 3 or
  701.       @active_battler.current_action.skill_id == 274
  702.    if @active_battler.is_a?(Game_Actor)   
  703.   #########物理法术#########[角色]   
  704.    if @active_battler.current_action.basic == 1 and
  705.       @active_battler.current_action.kind == 1
  706.       @active_battler.startactive = "移动"
  707.       @_move_duration = Move_Duration
  708.       ox,oy = @active_battler.screen_x,@active_battler.screen_y
  709.       @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
  710.       while @_move_duration > 0
  711.         Graphics.update
  712.         Input.update
  713.         @spriteset.update
  714.         @status_window.update
  715.         #@status_window.refresh
  716.         tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
  717.         move(@active_battler, tag, ox+68, oy+36)
  718.         @_move_duration -= 1
  719.       end
  720.       #@status_window.refresh
  721.       @active_battler.startactive = "待机"
  722.     end
  723.   end  
  724. else
  725.    if @active_battler.is_a?(Game_Actor)      
  726.   #########远程法术#########[角色]   
  727.    if @active_battler.current_action.basic == 1 and
  728.       @active_battler.current_action.kind == 1      
  729.         Graphics.update
  730.         Input.update
  731.         @spriteset.update
  732.         @status_window.update
  733.         #@status_window.refresh
  734.       @active_battler.startactive = "待机"
  735.     end
  736.   end
  737. end  
  738.   #===================角色攻击ID设置===============================
  739.    if @active_battler.id == 9  or
  740.       @active_battler.id == 10 or
  741.       @active_battler.id == 15 or     
  742.       @active_battler.id == 18 or
  743.       @active_battler.id == 20 or
  744.       @active_battler.id == 22 or
  745.       @active_battler.id == 25 or
  746.       @active_battler.id == 80 or
  747.       @active_battler.id == 84      
  748.    if @active_battler.is_a?(Game_Actor)
  749.   #########远程攻击#########[角色]
  750.    if @active_battler.current_action.basic == 0 and
  751.       @active_battler.current_action.kind == 0
  752.         Graphics.update
  753.         Input.update
  754.         @spriteset.update
  755.         @status_window.update
  756.         #@status_window.refresh
  757.       @active_battler.startactive = "待机"
  758.     end
  759.   end
  760. else
  761.    if @active_battler.is_a?(Game_Actor)  
  762.   #########真移位攻击#########[角色]
  763.    if @active_battler.current_action.basic == 0 and
  764.       @active_battler.current_action.kind == 0
  765.       @active_battler.startactive = "移动"
  766.       @_move_duration = Move_Duration
  767.       ox,oy = @active_battler.screen_x,@active_battler.screen_y
  768.       @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
  769.       while @_move_duration > 0
  770.         Graphics.update
  771.         Input.update
  772.         @spriteset.update
  773.         @status_window.update
  774.         #@status_window.refresh
  775.         tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
  776.         move(@active_battler, tag, ox+68, oy+36)
  777.         @_move_duration -= 1
  778.       end
  779.       #@status_window.refresh
  780.       @active_battler.startactive = "待机"
  781.     end
  782.   end
  783. end


  784.                       #以下为敌人类#


  785.   #===================敌人攻击ID设置===============================  
  786.    if @active_battler.id == 10 or
  787.       @active_battler.id == 11 or
  788.       @active_battler.id == 16 or
  789.       @active_battler.id == 19 or
  790.       @active_battler.id == 21 or
  791.       @active_battler.id == 23 or
  792.       @active_battler.id == 26 or
  793.       @active_battler.id == 40 or      
  794.       @active_battler.id == 64 or
  795.       @active_battler.id == 68 or
  796.       @active_battler.id == 84
  797.    if @active_battler.is_a?(Game_Enemy)      
  798.   #########远程攻击#########[敌人]     
  799.    if @active_battler.current_action.basic == 0 and
  800.       @active_battler.current_action.kind == 0
  801.         Graphics.update
  802.         Input.update
  803.         @spriteset.update
  804.         @status_window.update
  805.       @active_battler.startactive = "待机"
  806.     end
  807.   end
  808. else
  809.    if @active_battler.is_a?(Game_Enemy)  
  810.   ########真移位攻击#########[敌人]   
  811.    if @active_battler.current_action.basic == 0 and
  812.       @active_battler.current_action.kind == 0
  813.       @active_battler.startactive = "移动"
  814.       @_move_duration = Move_Duration_1
  815.       ox,oy = @active_battler.screen_x,@active_battler.screen_y
  816.       @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
  817.       while @_move_duration > 0
  818.         Graphics.update
  819.         Input.update
  820.         @spriteset.update
  821.         @status_window.update
  822.         tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
  823.         move(@active_battler, tag, ox-66, oy-39)
  824.         @_move_duration -= 1
  825.       end
  826.       @active_battler.startactive = "待机"
  827.     end
  828.   end
  829. end
  830. ####真移位#################

  831.    
  832.     # 行动方动画 (ID 为 0 的情况下是白色闪烁)   
  833.     if @animation1_id == 0
  834.       @active_battler.white_flash = true
  835.     else
  836.       @active_battler.animation_id = @animation1_id
  837.       @active_battler.animation_hit = true
  838.       
  839.     end
  840.     # 对像方动画
  841.     for target in @target_battlers
  842.       target.animation_id = @animation2_id
  843.       target.animation_hit = (target.damage != "Miss")

  844.   #====================================================  
  845.   # 受伤时战斗图移动
  846.   #====================================================
  847.   if @active_battler.is_a?(Game_Actor)  
  848.      @a = -5   #抖动幅度
  849.   else
  850.      @a = 5  #抖动幅度
  851.   end

  852.   if @target_battlers.size == 1
  853.      @target_battlers[0].movex = @a
  854.      @target_battlers[0].movey = @a
  855.   else
  856.   for target in @target_battlers
  857.       target.movex = @a
  858.       target.movey = @a
  859.     end
  860.   end
  861.   #====================================================  
  862.   # 受伤时战斗图移动
  863.   #====================================================      
  864.       
  865.       target.startactive = "待机"
  866.     if (target.current_action.kind == 0 and target.current_action.basic == 1) or target.damage == "Miss" or target.damage.to_i <= 0
  867.       target.startactive = "防御"
  868.     elsif target.damage > 0
  869.       @someonehurt = 15
  870.       target.startactive = "挨打"
  871.       end
  872.     end
  873.    
  874.     # 限制动画长度、最低 8 帧
  875.     # 移至步骤 5
  876.     @phase4_step = 4
  877.   end
  878.   
  879.   #=========================================================================
  880.   # 连击技能
  881.   #=========================================================================
  882.   
  883.     # 可以新定义一个方法,内容就是脚本部分。
  884.   def 被动连击应用
  885.     #=====★★★★★★★★★★★★★★★★★★★★★★★★★★
  886.     #设置方法同【吸血】
  887.    
  888.     # 汗 - - 那个老牛也太NB了吧。。。
  889.     if @active_battler.current_action.kind == 0 and
  890.         @active_battler.current_action.basic == 0
  891.     else
  892.       @phase4_step = 5
  893.       return
  894.     end
  895.    
  896.     lj1 = 37#【高级连击】特技的id
  897.     lj2 = 38#【连击】特技的id
  898.    
  899.     if @active_battler.is_a?(Game_Actor)
  900.       #============角色============
  901.       
  902.       #【高级连击】
  903.       if @active_battler.skills.include?(lj1)
  904.         概率 = [100, 50, 45, 40, 35]#理论上可以无限连(只要你设置无数多个概率)
  905.         for k in 概率
  906.           if rand(100) > k or !@target_battlers[0].exist?
  907.             @phase4_step = 5
  908.             return
  909.           end
  910.           # 应用通常攻击效果
  911.           for target in @target_battlers
  912.             target.attack_effect(@active_battler, 0.8)#80%的伤害
  913.           end
  914.           # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  915.           if @animation1_id == 0
  916.             @active_battler.white_flash = true
  917.           else
  918.             @active_battler.animation_id = @animation1_id
  919.             @active_battler.animation_hit = true
  920.           end
  921.           for target in @target_battlers
  922.            target.animation_id = @animation2_id
  923.            target.animation_hit = (target.damage != "Miss")
  924.           end
  925.           for i in 1..20
  926.             Graphics.update
  927.             Input.update
  928.             update
  929.           end
  930.           for target in @target_battlers
  931.             target.damage = "Miss" if target.damage.nil?
  932.             target.damage_pop = true
  933.           end
  934.         end
  935.       #【连击】
  936.       elsif @active_battler.skills.include?(lj2) and !@active_battler.skills.include?(lj1)
  937.         概率 = [100, 50, 45]#理论上可以无限连(只要你设置无数多个概率)
  938.         for k in 概率
  939.           if rand(100) > k or !@target_battlers[0].exist?
  940.             @phase4_step = 5
  941.             return
  942.           end
  943.           # 应用通常攻击效果
  944.           for target in @target_battlers
  945.             target.attack_effect(@active_battler, 0.75)#75%的伤害
  946.           end
  947.           # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  948.           if @animation1_id == 0
  949.             @active_battler.white_flash = true
  950.           else
  951.             @active_battler.animation_id = @animation1_id
  952.             @active_battler.animation_hit = true
  953.           end
  954.           for target in @target_battlers
  955.            target.animation_id = @animation2_id
  956.            target.animation_hit = (target.damage != "Miss")
  957.           end
  958.           for i in 1..20
  959.             Graphics.update
  960.             Input.update
  961.             update
  962.           end
  963.           for target in @target_battlers
  964.             target.damage = "Miss" if target.damage.nil?
  965.             target.damage_pop = true
  966.           end
  967.         end
  968.       end
  969.     else
  970.       #============敌人============
  971.       
  972.       
  973.       连击_ok = []
  974.       for i in @active_battler.actions
  975.         连击_ok << i.skill_id
  976.       end
  977.       #【高级连击】
  978.       if 连击_ok.include?(lj1)
  979.         概率 = [100, 50, 45, 40, 35]#理论上可以无限连(只要你设置无数多个概率)
  980.         for k in 概率
  981.           if rand(100) > k or !@target_battlers[0].exist?
  982.             @phase4_step = 5
  983.             return
  984.           end
  985.           # 应用通常攻击效果
  986.           for target in @target_battlers
  987.             target.attack_effect(@active_battler, 0.8)#80%的伤害
  988.           end
  989.           # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  990.           if @animation1_id == 0
  991.             @active_battler.white_flash = true
  992.           else
  993.             @active_battler.animation_id = @animation1_id
  994.             @active_battler.animation_hit = true
  995.           end
  996.           for target in @target_battlers
  997.            target.animation_id = @animation2_id
  998.            target.animation_hit = (target.damage != "Miss")
  999.           end
  1000.           for i in 1..20
  1001.             Graphics.update
  1002.             Input.update
  1003.             update
  1004.           end
  1005.           for target in @target_battlers
  1006.             target.damage = "Miss" if target.damage.nil?
  1007.             target.damage_pop = true
  1008.           end
  1009.         end
  1010.       #【连击】
  1011.       elsif 连击_ok.include?(lj2) and !连击_ok.include?(lj1)
  1012.         概率 = [100, 50, 45]#理论上可以无限连(只要你设置无数多个概率)
  1013.         for k in 概率
  1014.           if rand(100) > k or !@target_battlers[0].exist?
  1015.             @phase4_step = 5
  1016.             return
  1017.           end
  1018.           # 应用通常攻击效果
  1019.           for target in @target_battlers
  1020.             target.attack_effect(@active_battler, 0.75)#75%的伤害
  1021.           end
  1022.           # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  1023.           if @animation1_id == 0
  1024.             @active_battler.white_flash = true
  1025.           else
  1026.             @active_battler.animation_id = @animation1_id
  1027.             @active_battler.animation_hit = true
  1028.           end
  1029.           for target in @target_battlers
  1030.            target.animation_id = @animation2_id
  1031.            target.animation_hit = (target.damage != "Miss")
  1032.           end
  1033.           for i in 1..20
  1034.             Graphics.update
  1035.             Input.update
  1036.             update
  1037.           end
  1038.           for target in @target_battlers
  1039.             target.damage = "Miss" if target.damage.nil?
  1040.             target.damage_pop = true
  1041.           end
  1042.         end
  1043.       end
  1044.     end
  1045.     #=====★★★★★★★★★★★★★★★★★★★★★★★★★★
  1046.   end
  1047.   
  1048.   
  1049.   #--------------------------------------------------------------------------
  1050.   # ● 刷新画面 (主回合步骤 4 : 对像方动画) ★
  1051.   #--------------------------------------------------------------------------
  1052.   def update_phase4_step4

  1053.     #p 4
  1054.     if @someonehurt > 1
  1055.       #p @someonehurt
  1056.       @someonehurt -= 1
  1057.       return
  1058.     elsif @someonehurt == 1
  1059.       @someonehurt = 0
  1060.       
  1061.       for target in @target_battlers
  1062.           target.startactive = "待机"
  1063.            if (target.current_action.kind == 0 and target.current_action.basic == 1) or target.damage == "Miss" or target.damage.to_i <= 0
  1064.           target.startactive = "防御"
  1065.            elsif target.damage > 0
  1066.           target.startactive = "挨打"
  1067.            end
  1068.          end      
  1069.       被动连击应用   
  1070.       @phase4_step = 5
  1071.     else
  1072.       被动连击应用
  1073.       @phase4_step = 5
  1074.     end
  1075.   end
  1076. #--------------------------------------------------------------------------
  1077. # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  1078. #--------------------------------------------------------------------------
  1079. def update_phase4_step5
  1080.    #p 5
  1081.    # 隐藏帮助窗口
  1082.    @help_window.visible = false

  1083.    # 刷新状态窗口
  1084.    @status_window.refresh
  1085.    
  1086.    # 显示伤害
  1087.    for target in @target_battlers
  1088.      if target.damage != nil
  1089.         target.damage_pop = true
  1090.         
  1091.    #============================================
  1092.    # 【吸血】技能
  1093.         if $吸血_ok
  1094.           @active_battler.damage_pop = true
  1095.           $吸血_ok = false
  1096.         end
  1097.    #============================================
  1098.   end

  1099.        target.startactive = "待机"
  1100.      if target.hp < target.maxhp/3 and target.dead? == false
  1101.        target.startactive = "待机"
  1102.      end
  1103.    end
  1104.    
  1105. ####真移位####     
  1106.   #===================角色法术ID设置===============================
  1107.    if @active_battler.current_action.skill_id  == 1 or
  1108.       @active_battler.current_action.skill_id  == 2 or
  1109.       @active_battler.current_action.skill_id  == 3 or
  1110.       @active_battler.current_action.skill_id  == 274
  1111.    if @active_battler.is_a?(Game_Actor)   
  1112.   #########物理法术#########[角色]  
  1113.    if @active_battler.current_action.basic == 1 and
  1114.       @active_battler.current_action.kind == 1
  1115.       @active_battler.startactive = "返回"
  1116.       @_move_duration = Move_Duration
  1117.       ox,oy = @active_battler.screen_x - @active_battler.movex,\
  1118.       @active_battler.screen_y - @active_battler.movey
  1119.       while @_move_duration > 0
  1120.         Graphics.update
  1121.         Input.update
  1122.         @spriteset.update
  1123.         @status_window.update
  1124.         #@status_window.refresh
  1125.         move(@active_battler, @oldxy, ox, oy, true)
  1126.         @_move_duration -= 1
  1127.       end
  1128.       #@status_window.refresh
  1129.       @active_battler.startactive = "待机"
  1130.     end
  1131.   end
  1132. else  
  1133.    if @active_battler.is_a?(Game_Actor)   
  1134.   #########远程法术#########[角色]
  1135.    if @active_battler.current_action.basic == 1 and
  1136.       @active_battler.current_action.kind == 1
  1137.         Graphics.update
  1138.         Input.update
  1139.         @spriteset.update
  1140.         @status_window.update
  1141.         #@status_window.refresh
  1142.       @active_battler.startactive = "待机"
  1143.     end
  1144.   end
  1145. end  
  1146.   #===================角色攻击ID设置===============================  
  1147.    if @active_battler.id == 9  or
  1148.       @active_battler.id == 10 or
  1149.       @active_battler.id == 15 or
  1150.       @active_battler.id == 18 or
  1151.       @active_battler.id == 20 or
  1152.       @active_battler.id == 22 or
  1153.       @active_battler.id == 25 or
  1154.       @active_battler.id == 80 or
  1155.       @active_battler.id == 84      
  1156.    if @active_battler.is_a?(Game_Actor)
  1157.   #########远程攻击#########[角色]      
  1158.    if @active_battler.current_action.basic == 0 and
  1159.       @active_battler.current_action.kind == 0
  1160.         Graphics.update
  1161.         Input.update
  1162.         @spriteset.update
  1163.         @status_window.update
  1164.         #@status_window.refresh
  1165.       @active_battler.startactive = "待机"
  1166.     end
  1167.   end
  1168. else
  1169.    if @active_battler.is_a?(Game_Actor)
  1170.   #########真移位攻击#########[角色]   
  1171.    if @active_battler.current_action.basic == 0 and
  1172.       @active_battler.current_action.kind == 0
  1173.       @active_battler.startactive = "返回"
  1174.       @_move_duration = Move_Duration
  1175.       ox,oy = @active_battler.screen_x - @active_battler.movex,\
  1176.       @active_battler.screen_y - @active_battler.movey
  1177.       while @_move_duration > 0
  1178.         Graphics.update
  1179.         Input.update
  1180.         @spriteset.update
  1181.         @status_window.update
  1182.         #@status_window.refresh
  1183.         move(@active_battler, @oldxy, ox, oy, true)
  1184.         @_move_duration -= 1
  1185.       end
  1186.       #@status_window.refresh
  1187.       @active_battler.startactive = "待机"
  1188.     end
  1189.   end
  1190. end


  1191.                       #以下为敌人类#


  1192.   #===================敌人攻击ID设置===============================  
  1193.    if @active_battler.id == 10 or
  1194.       @active_battler.id == 11 or
  1195.       @active_battler.id == 16 or
  1196.       @active_battler.id == 19 or
  1197.       @active_battler.id == 21 or
  1198.       @active_battler.id == 23 or
  1199.       @active_battler.id == 26 or
  1200.       @active_battler.id == 40 or      
  1201.       @active_battler.id == 64 or      
  1202.       @active_battler.id == 68 or
  1203.       @active_battler.id == 84
  1204.    if @active_battler.is_a?(Game_Enemy)
  1205.   #########远程攻击#########[敌人]      
  1206.    if @active_battler.current_action.basic == 0 and
  1207.       @active_battler.current_action.kind == 0
  1208.         Graphics.update
  1209.         Input.update
  1210.         @spriteset.update
  1211.         @status_window.update
  1212.       @active_battler.startactive = "待机"
  1213.     end
  1214.   end
  1215. else
  1216.    if @active_battler.is_a?(Game_Enemy)
  1217.   #########真移位攻击#########[敌人]     
  1218.    if @active_battler.current_action.basic == 0 and
  1219.       @active_battler.current_action.kind == 0
  1220.       @active_battler.startactive = "返回"
  1221.       @_move_duration = Move_Duration_1
  1222.       ox,oy = @active_battler.screen_x - @active_battler.movex,\
  1223.       @active_battler.screen_y - @active_battler.movey
  1224.       while @_move_duration > 0
  1225.         Graphics.update
  1226.         Input.update
  1227.         @spriteset.update
  1228.         @status_window.update
  1229.         move(@active_battler, @oldxy, ox, oy, true)
  1230.         @_move_duration -= 1
  1231.       end
  1232.       @active_battler.startactive = "待机"
  1233.     end
  1234.   end   
  1235. end
  1236. ####真移位####  


  1237.    #保护系统-还原保护者图片
  1238.    for i in 0..$game_party.actors.size-1
  1239.         if $game_party.actors[i].baohu_dx != nil
  1240.               $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
  1241.             if $game_party.actors[$game_party.actors[i].baohu_dx].hp < $game_party.actors[$game_party.actors[i].baohu_dx].maxhp/3  and $game_party.actors[$game_party.actors[i].baohu_dx].dead? == false
  1242.                $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name #+ "★5"
  1243.             elsif $game_party.actors[$game_party.actors[i].baohu_dx].dead?
  1244.                $game_system.se_play($data_system.actor_collapse_se)

  1245.                $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★2"
  1246.             end
  1247.         end
  1248.         if $game_party.actors[i].baohu_dxb != nil
  1249.               $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name.split(/★/)[0]
  1250.             if $game_party.actors[$game_party.actors[i].baohu_dxb].hp < $game_party.actors[$game_party.actors[i].baohu_dxb].maxhp/3 and $game_party.actors[$game_party.actors[i].baohu_dxb].dead? == false
  1251.                $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name #+ "★5"
  1252.             elsif $game_party.actors[$game_party.actors[i].baohu_dx].dead?
  1253.                $game_system.se_play($data_system.actor_collapse_se)
  1254.                $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★2"
  1255.             end
  1256.         end
  1257.     end
  1258.   
  1259.   #====================================================  
  1260.   # 受伤时战斗图移动
  1261.   #====================================================
  1262.   if @target_battlers.size == 1
  1263.      @target_battlers[0].movex = 0
  1264.      @target_battlers[0].movey = 0
  1265.   else
  1266.   for target in @target_battlers
  1267.       target.movex = 0
  1268.       target.movey = 0
  1269.     end
  1270.   end
  1271.   #====================================================  
  1272.   # 受伤时战斗图移动
  1273.   #====================================================  
  1274.   
  1275.   # 移至步骤 6
  1276.   @someonehurt = 0
  1277.    @phase4_step = 6
  1278. end
  1279.   #--------------------------------------------------------------------------
  1280.   # ● 刷新画面 (主回合步骤 6 : 刷新)
  1281.   #--------------------------------------------------------------------------
  1282.   def update_phase4_step6
  1283.    
  1284. if @active_battler.is_a?(Game_Enemy)
  1285.   for kds in 0..$game_party.actors.size-1
  1286.     if $game_party.actors[kds].baohu_dx != nil
  1287.      if $game_party.actors[$game_party.actors[kds].baohu_dx].dead?
  1288.       #$game_party.actors[kds].baohu_dx = nil
  1289.       $fanhui_dx = $game_party.actors
  1290.       $game_party.actors[kds].bug = 1
  1291.       $game_party.actors[kds].baohu_time2 = 0
  1292.       $game_party.actors[kds].baohu_donghua2 = 0
  1293.      else
  1294.       $fanhui_dx = $game_party.actors
  1295.       $game_party.actors[kds].bug = 0
  1296.       $game_party.actors[kds].baohu_time2 = 0
  1297.       $game_party.actors[kds].baohu_donghua2 = 0
  1298.      end
  1299.     end
  1300.     if $game_party.actors[kds].baohu_dxb != nil
  1301.      if $game_party.actors[$game_party.actors[kds].baohu_dxb].dead?
  1302.       #$game_party.actors[kds].baohu_dxb = nil
  1303.       $fanhui_dx = $game_party.actors
  1304.       $game_party.actors[kds].bug = 1
  1305.       $game_party.actors[kds].baohu_time2b = 0
  1306.       $game_party.actors[kds].baohu_donghua2b = 0
  1307.      else
  1308.       $fanhui_dx = $game_party.actors
  1309.       $game_party.actors[kds].bug = 0
  1310.       $game_party.actors[kds].baohu_time2b = 0
  1311.       $game_party.actors[kds].baohu_donghua2b = 0
  1312.      end
  1313.     end
  1314.   end
  1315. end

  1316.     if @active_battler.current_action.kind == 3
  1317.       for kds in 0..$game_party.actors.size-1
  1318.                                     ##20##未改前####
  1319.        if $game_party.actors[kds].id > 50 and $game_party.actors[kds].zhuren == @active_battler.id
  1320.          $game_party.actors[kds].baohu.clear
  1321.          $game_party.actors.delete($game_party.actors[kds])
  1322.          break
  1323.        end
  1324.       end
  1325.       $game_party.actors.push($game_actors[@active_battler.kds_baby[@bb[@active_battler.index]]])  ##关于回合制宠物##########
  1326.       @active_battler.bbzh.push(@active_battler.kds_baby[@bb[@active_battler.index]])  ##关于回合制宠物##########
  1327.       @active_battler.kds_canzhan = @active_battler.kds_baby[@bb[@active_battler.index]]  ##关于回合制宠物##########
  1328.       for kds in 0..$game_party.actors.size-1
  1329.         $game_party.actors[kds].ac_id = kds
  1330.       end
  1331.       @status_window.refresh
  1332.       
  1333.       #  帮助窗口显示"召唤"
  1334.       @help_window.set_text(@active_battler.name + "召唤了" + $game_actors[@active_battler.kds_baby[@bb[@actor_index]]].name, 1)
  1335.       @wait_count = 30
  1336.     end
  1337.       
  1338.    #=============================================
  1339.    # Kaiser.DS 连击效果应用
  1340.    #=============================================
  1341.    if @kds_hit > 0
  1342.     @kds_count = 10
  1343.    
  1344.    for target in @target_battlers
  1345.      if target.dead? == false
  1346.        $lianji = 0
  1347.      end
  1348.    end

  1349.    
  1350.    
  1351.     @kds_hit -= 1
  1352.     if @active_battler.current_action.kind == 1
  1353.      @active_battler.sp += @skill.sp_cost
  1354.     end
  1355.    
  1356.    for target in @target_battlers
  1357.      if target.dead? == false
  1358.         @phase4_step = 3
  1359.      end
  1360.    end
  1361.     return
  1362.    end

  1363.     # 清除强制行动对像的战斗者
  1364.     $game_temp.forcing_battler = nil
  1365.    
  1366.     @active_battler.movex = 0
  1367.     @active_battler.movey = 0
  1368.    
  1369.     # 公共事件 ID 有效的情况下
  1370.     if @common_event_id > 0
  1371.       # 设置事件
  1372.       common_event = $data_common_events[@common_event_id]
  1373.       $game_system.battle_interpreter.setup(common_event.list, 0)
  1374.     end
  1375.     if @phase != 5
  1376.       # 刷新状态窗口
  1377. #      @status_window.refresh
  1378.     end
  1379.     # 移至步骤 1
  1380.     @phase4_step = 1
  1381.   end
  1382.   #--------------------------------------------------------------------------
  1383.   # ● 移动 (攻击者) (被攻击者)#(active_battler.width / 2)
  1384.   #--------------------------------------------------------------------------
  1385.   def move(active_battler, target, ox, oy, 返回标记 = false)
  1386.     ta_x = target[0]
  1387.     ta_y = target[1]
  1388.     if 返回标记
  1389.       active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox) / @_move_duration
  1390.       active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy) / @_move_duration
  1391.     else
  1392.       if @active_battler.is_a?(Game_Enemy)
  1393.         active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox - (active_battler.width / 2.5)) / @_move_duration
  1394.         active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy - (active_battler.height / 5.5)) / @_move_duration
  1395.       else
  1396.         active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox + (active_battler.width / 2.5)) / @_move_duration
  1397.         active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy + (active_battler.height / 5.5)) / @_move_duration
  1398.       end
  1399.     end
  1400.   end
  1401. end
复制代码

点评

Game_Battler 3做了修改,如果没有移植过去就会报错  发表于 2014-8-29 21:07
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3526
在线时间
1887 小时
注册时间
2010-6-19
帖子
1210
13
 楼主| 发表于 2014-8-29 21:51:30 | 只看该作者
恐惧剑刃 发表于 2014-8-29 19:30
测试的时候可以防御一下因为老牛也会鹰击~

帮我看下,头都大了

技能问题.rar

209.23 KB, 下载次数: 25

回复 支持 反对

使用道具 举报

Lv1.梦旅人

薄凉看客

梦石
0
星屑
50
在线时间
1269 小时
注册时间
2010-6-20
帖子
1316
14
发表于 2014-8-29 22:23:01 | 只看该作者
没有测试 - -.............

技能问题.rar

235.91 KB, 下载次数: 20

点评

貌似还是不行  发表于 2014-8-30 06:48
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-21 19:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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