Project1

标题: 好吧……还是问问技能连击好了 [打印本页]

作者: MLRPG    时间: 2016-10-11 23:30
标题: 好吧……还是问问技能连击好了
本帖最后由 MLRPG 于 2016-10-12 15:00 编辑

试了彩虹神剑 虽然看起来像是连击但并不是真正意义的连击 RTAB效果太多了我只想要连击 所以我就是想问问:
有没有那种可以产生多次攻击判定但是又不会重复播放技能动画的脚本?RTAB就算了……冲突
具体效果就是 使用者只放一次动画但是会产生多次伤害判定 不是分段显示 比如打一个回避高的敌人 用5连击可能会有MISS可能会有打中的那种
技能连击完美版也算了 符号已经冲突了 总不能让玩家看到XXX,1这种技能名字吧
作者: jiushiainilip19    时间: 2016-10-12 17:26
在RB的教程中有过一个这个的说明你可以看看
我顺便也把我的连击写给你吧 下面脚本看到$game_variables[51] = 0 那里之后就别抄了 我动了下面的一些东西
你可以参照原本的技能连击完美版本去弄
传送门:https://rpg.blue/forum.php?mod=v ... amp;_dsign=823e22cc
RUBY 代码复制
  1. module RPG
  2. #class Skill
  3. #  def name
  4. #    name = @name.split(/,/)[0]
  5. #    return name != nil ? name : ""
  6. #  end
  7. #  def hit_count
  8. #    name = @name.split(/,/)[1]
  9. #    return name != nil ? name.to_i.abs : 0
  10. #  end
  11. #end
  12.  
  13.   class Skill
  14.     Regex_LJ = /%lj\[(\d+)\]/
  15.     unless method_defined? :mhy_description_20161012
  16.       alias mhy_description_20161012 description
  17.       def description
  18.         mhy_description_20161012.gsub(Regex_LJ){ "" }
  19.       end
  20.     end
  21.     def hit_count
  22.       Regex_LJ =~ @description
  23.       return $1.to_i
  24.     end
  25.   end
  26.  
  27.  
  28. class Sprite < ::Sprite
  29.    def effect?
  30.      @_whiten_duration > 0 or
  31.      @_appear_duration > 0 or
  32.      @_escape_duration > 0 or
  33.      @_animation_duration > 0
  34.    end
  35.    def damage_effect?
  36.      @_damage_duration > 0 or
  37.      @_collapse_duration > 0
  38.    end
  39. end
  40. end
  41. class Spriteset_Battle
  42. def damage_effect?
  43.    for sprite in @enemy_sprites + @actor_sprites
  44.      return true if sprite.damage_effect?
  45.    end
  46.    return false
  47. end
  48. end   
  49. class Scene_Battle
  50. alias sailcat_update_phase4_step1 update_phase4_step1
  51. alias sailcat_make_skill_action_result make_skill_action_result
  52. alias sailcat_update_phase4_step5 update_phase4_step5
  53. def update_phase4_step1
  54.    @hit_count = 0
  55.    $game_variables[51] = 0
  56.    sailcat_update_phase4_step1
  57. end
  58. def make_skill_action_result
  59.    sailcat_make_skill_action_result
  60.    @hit_count = @skill.hit_count
  61.  
  62. end
  63. def update_phase4_step5
  64.    sailcat_update_phase4_step5
  65.    if @hit_count > 0
  66.      $game_variables[51]+= 1
  67.      for target in @target_battlers.clone
  68.          if @target_battlers.size > 1
  69.            @target_battlers.delete(target)
  70.          else
  71.            @target_battlers.delete(target)
  72.            if @skill.element_set.include?(50)
  73.              if target.is_a?(Game_Enemy)
  74.                 target = $game_troop.random_target_enemy
  75.              else
  76.                target = $game_party.random_target_actor
  77.              end
  78.            else  
  79.              if target.is_a?(Game_Enemy)
  80.                 target = $game_troop.smooth_target_enemy(target.index)
  81.              else
  82.                target = $game_party.smooth_target_actor(target.index)
  83.              end
  84.            end
  85.            if target.is_a?(Game_Battler)
  86.              @target_battlers.push(target)
  87.            end
  88.        end
  89.      end
  90.  
  91.      if @target_battlers.size == 0
  92.        return
  93.      end
  94.      for target in @target_battlers
  95.        if target.damage != nil
  96.          @phase4_step = 5
  97.          return
  98.        end
  99.        target.skill_effect(@active_battler, @skill)
  100.      end
  101.      # 如果你应用了23种战斗特效的公共事件版脚本请去掉下面几行的注释
  102.      if @common_event_id > 0
  103.  
  104.     common_event = $data_common_events[@common_event_id]
  105.        $game_system.battle_interpreter.setup(common_event.list, 0)
  106.       end
  107.      @hit_count -= 1
  108.     # $game_temp.enemy_hpsp_refresh = false
  109.      @phase4_step = 4
  110.    end
  111. end
  112. end


然后在Scene_Battle 4  409行
RUBY 代码复制
  1. def update_phase4_step4
  2.     # 对像方动画
  3.     for target in @target_battlers
  4.       if $game_variables[51]==0
  5.       target.animation_id = @animation2_id
  6.       target.animation_hit = (target.damage != "Miss")
  7.     end;end
  8.     # 限制动画长度、最低 8 帧
  9.     @wait_count = 8
  10.     # 移至步骤 5
  11.     @phase4_step = 5
  12.   end


范例下载!

连击.rar

191.53 KB, 下载次数: 50






欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1