查看: 7147|回复: 45

[已经解决] 请教在状态50下使用攻击技能100结束后几率使用技能101再次...

[复制链接]
梦石
0
星屑
9160
在线时间
466 小时
注册时间
2015-5-8
回帖
704
发表于 2019-6-29 20:08:22 | 显示全部楼层 |阅读模式

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

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

×
我是这么想的:

条件1:装备第50号状态
条件2:已经学会第100号技能和第101号技能

结果:
当使用第100号技能攻击结束时自动触发第101号技能再次攻击


然后我发现我不知道要在哪个phase或者哪个step下写了。。。

求大神指点下思路,感激不尽!

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-6-29 20:22:05 | 显示全部楼层
技能调用公共事件强制行动就可以了吧?

点评

那个强制行动里角色1人2人3人4人时什么意思啊?对应游戏队伍里的第1位置第2位置第3位置第4位置吗?  发表于 2019-6-29 20:41
那个强制行动里角色1人2人3人4人时什么意思啊?对应游戏队伍里的第1位置第2位置第3位置吗?  发表于 2019-6-29 20:39

评分

参与人数 1赞 +1 收起 理由
taeckle + 1 我很赞同

查看全部评分

回复

使用道具 举报

梦石
0
星屑
9160
在线时间
466 小时
注册时间
2015-5-8
回帖
704
 楼主| 发表于 2019-7-17 10:50:00 | 显示全部楼层
soulsaga 发表于 2019-6-29 20:22
技能调用公共事件强制行动就可以了吧?

那要是用下面猫大的连击脚本该怎么改呢?

这个是猫大的连击脚本:

# ===================================================================
# 连击效果(完美版) v1.2 by SailCat
# ===================================================================
# 数据库设定(特技):
#   名称:技能名称,连击次数(要用半角逗号)
#   例如:超究舞神霸斩,11
#         狮子心,16
#         陨石,9
# 注意这是连击次数,实际攻击的回数是这个回数+1回。
# 省略逗号连同后面的参数的话,连击次数默认为零。
# 连击次数是负数的话,将取绝对值处理。
# 视觉效果是发动动画只放1回,击中动画放N回,伤害值显示N次,
# 所以,如使用了齐时战斗的话,要修改倒数第四行,该行内容为:
#     @phase4_step = 4
# 改为@phase4_step = 3
# 其他:RTAB不适用
# ===================================================================
module RPG
class Skill
   def name
     name = @name.split(/,/)[0]
     return name != nil ? name : ""
   end
   def hit_count
     name = @name.split(/,/)[1]
     return name != nil ? name.to_i.abs : 0
   end
end
class Sprite < ::Sprite
   def effect?
     @_whiten_duration > 0 or
     @_appear_duration > 0 or
     @_escape_duration > 0 or
     @_animation_duration > 0
   end
   def damage_effect?
     @_damage_duration > 0 or
     @_collapse_duration > 0
   end
end
end
class Spriteset_Battle
def damage_effect?
   for sprite in @enemy_sprites + @actor_sprites
     return true if sprite.damage_effect?
   end
   return false
end
end  
class Scene_Battle
alias sailcat_update_phase4_step1 update_phase4_step1
alias sailcat_make_skill_action_result make_skill_action_result
alias sailcat_update_phase4_step5 update_phase4_step5
def update_phase4_step1
   @hit_count = 0
   sailcat_update_phase4_step1
end
def make_skill_action_result
   sailcat_make_skill_action_result
   @hit_count = @skill.hit_count
end
def update_phase4_step5
   sailcat_update_phase4_step5
   if @hit_count > 0
     for target in @target_battlers.clone
       if target.dead?
         if @target_battlers.size > 1
           @target_battlers.delete(target)
         else
           @target_battlers.delete(target)
           if target.is_a?(Game_Enemy)
             target = $game_troop.smooth_target_enemy(target.index)
           else
             target = $game_party.smooth_target_actor(target.index)
           end
           if target.is_a?(Game_Battler)
             @target_battlers.push(target)
           end
         end
       end
     end
     if @target_battlers.size == 0
       return
     end
     for target in @target_battlers
       if target.damage != nil
         @phase4_step = 5
         return
       end
       target.skill_effect(@active_battler, @skill)
     end
     # 如果你应用了23种战斗特效的公共事件版脚本请去掉下面几行的注释
      if @common_event_id > 0
        common_event = $data_common_events[@common_event_id]
        $game_system.battle_interpreter.setup(common_event.list, 0)
      end
     @hit_count -= 1
     @phase4_step = 3
   end
end
end
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-7-17 11:39:39 | 显示全部楼层
taeckle 发表于 2019-7-17 10:50
那要是用下面猫大的连击脚本该怎么改呢?

这个是猫大的连击脚本:

这个脚本只是单个技能的连击数..和你要求的无关..建议换脚本...

点评

好吧,,,那请问大神让@active_battler使用第101号攻击技能的命令在update_phase4_step2的哪里写啊?看下面一楼  发表于 2019-7-17 16:15
不需要保证..都是执行的当前行动者..  发表于 2019-7-17 16:10
视觉效果是发动动画只放1回,击中动画放N回,伤害值显示N次  发表于 2019-7-17 16:08
1. 没有重复的话是怎么出连击效果的啊? 2. 如果有多人满足此技能的连击条件的话,怎么保证这第2次技能释放(连击)是同一个人?  发表于 2019-7-17 16:07
並没有重复使用技能..2:我不懂你这问题..  发表于 2019-7-17 16:02

评分

参与人数 1赞 +1 收起 理由
taeckle + 1 大神的指点!

查看全部评分

回复

使用道具 举报

梦石
0
星屑
9160
在线时间
466 小时
注册时间
2015-5-8
回帖
704
 楼主| 发表于 2019-7-17 16:19:09 | 显示全部楼层
本帖最后由 taeckle 于 2019-7-17 16:20 编辑
soulsaga 发表于 2019-7-17 11:39
这个脚本只是单个技能的连击数..和你要求的无关..建议换脚本...


这是默认的phase4:

  # ● 刷新画面 (主回合步骤 2 : 开始行动)
  #--------------------------------------------------------------------------
  def update_phase4_step2
    # 如果不是强制行动
    unless @active_battler.current_action.forcing
      # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下
      if @active_battler.restriction == 2 or @active_battler.restriction == 3
        # 设置行动为攻击
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
      end
      # 限制为 [不能行动] 的情况下
      if @active_battler.restriction == 4
        # 清除行动强制对像的战斗者
        $game_temp.forcing_battler = nil
        # 移至步骤 1
        @phase4_step = 1
        return
      end
    end
    # 清除对像战斗者
    @target_battlers = []
    # 行动种类分支
    case @active_battler.current_action.kind
    when 0  # 基本
      make_basic_action_result
    when 1  # 特技
      make_skill_action_result
    when 2  # 物品
      make_item_action_result
    end
    # 移至步骤 3
    if @phase4_step == 2
      @phase4_step = 3
    end
  end
  #--------------------------------------------------------------------------
  # ● 生成基本行动结果
  #--------------------------------------------------------------------------
  def make_basic_action_result
    # 攻击的情况下
    if @active_battler.current_action.basic == 0
      # 设置攻击 ID
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      # 行动方的战斗者是敌人的情况下
      if @active_battler.is_a?(Game_Enemy)
        if @active_battler.restriction == 3
          target = $game_troop.random_target_enemy
        elsif @active_battler.restriction == 2
          target = $game_party.random_target_actor
        else
          index = @active_battler.current_action.target_index
          target = $game_party.smooth_target_actor(index)
        end
      end
      # 行动方的战斗者是角色的情况下
      if @active_battler.is_a?(Game_Actor)
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          index = @active_battler.current_action.target_index
          target = $game_troop.smooth_target_enemy(index)
        end
      end
      # 设置对像方的战斗者序列
      @target_battlers = [target]
      # 应用通常攻击效果
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end
    # 防御的情况下
    if @active_battler.current_action.basic == 1
      # 帮助窗口显示"防御"
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
    # 逃跑的情况下
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      #  帮助窗口显示"逃跑"
      @help_window.set_text("逃跑", 1)
      # 逃跑
      @active_battler.escape
      return
    end
    # 什么也不做的情况下
    if @active_battler.current_action.basic == 3
      # 清除强制行动对像的战斗者
      $game_temp.forcing_battler = nil
      # 移至步骤 1
      @phase4_step = 1
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 设置物品或特技对像方的战斗者
  #     scope : 特技或者是物品的范围
  #--------------------------------------------------------------------------
  def set_target_battlers(scope)
    # 行动方的战斗者是敌人的情况下
    if @active_battler.is_a?(Game_Enemy)
      # 效果范围分支
      case scope
      when 1  # 敌单体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 2  # 敌全体
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 3  # 我方单体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 4  # 我方全体
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 5  # 我方单体 (HP 0)
        index = @active_battler.current_action.target_index
        enemy = $game_troop.enemies[index]
        if enemy != nil and enemy.hp0?
          @target_battlers.push(enemy)
        end
      when 6  # 我方全体 (HP 0)
        for enemy in $game_troop.enemies
          if enemy != nil and enemy.hp0?
            @target_battlers.push(enemy)
          end
        end
      when 7  # 使用者
        @target_battlers.push(@active_battler)
      end
    end
    # 行动方的战斗者是角色的情况下
    if @active_battler.is_a?(Game_Actor)
      # 效果范围分支
      case scope
      when 1  # 敌单体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 2  # 敌全体
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 3  # 我方单体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 4  # 我方全体
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 5  # 我方单体 (HP 0)
        index = @active_battler.current_action.target_index
        actor = $game_party.actors[index]
        if actor != nil and actor.hp0?
          @target_battlers.push(actor)
        end
      when 6  # 我方全体 (HP 0)
        for actor in $game_party.actors
          if actor != nil and actor.hp0?
            @target_battlers.push(actor)
          end
        end
      when 7  # 使用者
        @target_battlers.push(@active_battler)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 生成特技行动结果
  #--------------------------------------------------------------------------
  def make_skill_action_result
    # 获取特技
    @skill = $data_skills[@active_battler.current_action.skill_id]
    # 如果不是强制行动
    unless @active_battler.current_action.forcing
      # 因为 SP 耗尽而无法使用的情况下
      unless @active_battler.skill_can_use?(@skill.id)
        # 清除强制行动对像的战斗者
        $game_temp.forcing_battler = nil
        # 移至步骤 1
        @phase4_step = 1
        return
      end
    end
    # 消耗 SP
    @active_battler.sp -= @skill.sp_cost
    # 刷新状态窗口
    @status_window.refresh
    # 在帮助窗口显示特技名
    @help_window.set_text(@skill.name, 1)
    # 设置动画 ID
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    # 设置公共事件 ID
    @common_event_id = @skill.common_event_id
    # 设置对像侧战斗者
    set_target_battlers(@skill.scope)
    # 应用特技效果
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
  #--------------------------------------------------------------------------
  # ● 生成物品行动结果
  #--------------------------------------------------------------------------
  def make_item_action_result
    # 获取物品
    @item = $data_items[@active_battler.current_action.item_id]
    # 因为物品耗尽而无法使用的情况下
    unless $game_party.item_can_use?(@item.id)
      # 移至步骤 1
      @phase4_step = 1
      return
    end
    # 消耗品的情况下
    if @item.consumable
      # 使用的物品减 1
      $game_party.lose_item(@item.id, 1)
    end
    # 在帮助窗口显示物品名
    @help_window.set_text(@item.name, 1)
    # 设置动画 ID
    @animation1_id = @item.animation1_id
    @animation2_id = @item.animation2_id
    # 设置公共事件 ID
    @common_event_id = @item.common_event_id
    # 确定对像
    index = @active_battler.current_action.target_index
    target = $game_party.smooth_target_actor(index)
    # 设置对像侧战斗者
    set_target_battlers(@item.scope)
    # 应用物品效果
    for target in @target_battlers
      target.item_effect(@item)
    end
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # 行动方动画 (ID 为 0 的情况下是白色闪烁)
    if @animation1_id == 0
      @active_battler.white_flash = true
    else
      @active_battler.animation_id = @animation1_id
      @active_battler.animation_hit = true
    end
    # 移至步骤 4
    @phase4_step = 4
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step4
    # 对像方动画
    for target in @target_battlers
      target.animation_id = @animation2_id
      target.animation_hit = (target.damage != "Miss")
    end
    # 限制动画长度、最低 8 帧
    @wait_count = 8
    # 移至步骤 5
    @phase4_step = 5
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  #--------------------------------------------------------------------------
  def update_phase4_step5
    # 隐藏帮助窗口
    @help_window.visible = false
    # 刷新状态窗口
    @status_window.refresh
    # 显示伤害
    for target in @target_battlers
      if target.damage != nil
        target.damage_pop = true
      end
    end
    # 移至步骤 6
    @phase4_step = 6
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 6 : 刷新)
  #--------------------------------------------------------------------------
  def update_phase4_step6
    # 清除强制行动对像的战斗者
    $game_temp.forcing_battler = nil
    # 公共事件 ID 有效的情况下
    if @common_event_id > 0
      # 设置事件
      common_event = $data_common_events[@common_event_id]
      $game_system.battle_interpreter.setup(common_event.list, 0)
    end
    # 移至步骤 1
    @phase4_step = 1
  end
end
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-7-17 16:32:56 | 显示全部楼层
  1. #==============================================================================
  2. # ■ XP-RGSS-13 スキル連撃 [Ver.3.3.0]    by Claimh
  3. #------------------------------------------------------------------------------
  4. # ・スキル攻撃時にタイミング良くキーを入力することで、追加攻撃が発動する。
  5. # ・オート発動、連続追加攻撃回数も設定可能
  6. # ・追加攻撃を発動させるキー入力のタイミング
  7. #      対象側のアニメーションが表示される直前
  8. # ・スキルアップデートと併用することで、スキルレベル制が導入できる。
  9. #   その際、連続回数は設定した連続回数+スキルレベルとなる
  10. #==============================================================================

  11. module ExtraSkill
  12.   SKILL_CHASE = []
  13. #==============================================================================
  14. # □ カスタマイズSTART
  15. #==============================================================================
  16.   # 追加攻撃発動キー
  17.   SKILL_CHASE_KEY = Input::C

  18.   # スキルレベル制を導入する
  19.   USE_SKILL_LEVEL = false      # 不要ならfalse

  20.   # ダメージ一括表示
  21.   SKILL_CHASE_DMG_ALL = true          # 不要ならfalse
  22.   # 対象側アニメーションの間にウェイトを入れる
  23.   SKILL_CHASE_WAIT = 4                # 数値はフレーム数、不要ならnil

  24.   # ミスなら追加攻撃しない
  25.   SKILL_CHASE_MISS = true               # 不要ならfalse
  26.   # クリティカル発生時にアニメーションを変化させる
  27.   SKILL_CHASE_CRITICAL = true           # 不要ならfalse

  28.   # 物理攻撃系スキルの属性ID
  29.   CHASE_WEAPON = 19
  30.   # 魔法攻撃系スキルの属性ID
  31.   CHASE_MAGIC = 20

  32.   # 成功時に鳴らすSE
  33.   SKILL_CHASE_SE = "020-Teleport03"     # 不要ならnil

  34.   # 設定例
  35.   # SKILL_CHASE[スキルID] = [追加攻撃の攻撃力(%), 連鎖アニメID, オート発動フラグ,
  36.   #  成功率, 連続回数,クリティカル時アニメ]]
  37.   SKILL_CHASE[57] = [100, 31, false, 100, 5, 32]
  38.   SKILL_CHASE[61] = [100, 42, false, 100, 4, 43]

  39. #==============================================================================
  40. # □ カスタマイズEND
  41. #==============================================================================
  42. end

  43. class Scene_Battle
  44.   include ExtraSkill
  45.   attr_accessor   :skill_chase_exercise       # 追加攻撃実行中
  46.   attr_accessor   :skill_chase_end            # 追加攻撃終了
  47.   attr_accessor   :skill_chase_first          # 追加攻撃 第1攻撃[スキル]
  48.   attr_accessor   :skill_chase_set            # 追加攻撃 設定値
  49.   attr_accessor   :skill_atk_f                # 追加攻撃 威力
  50.   attr_accessor   :chase_skill_type           # 追加攻撃 スキルタイプ
  51.   #--------------------------------------------------------------------------
  52.   # ● 追尾判定用データ初期化
  53.   #--------------------------------------------------------------------------
  54.   def init_chase
  55.     @skill_chase_flg = false          # 追加攻撃開始
  56.     self.skill_chase_exercise = false # 追加攻撃実行中
  57.     self.skill_chase_end = false      # 追加攻撃終了
  58.     @skill_chase_check_key = false    # 追加攻撃判定実行中
  59.     @skill_chase_success = false      # 追加攻撃成功
  60.     @skill_chase_count = 0            # 追加攻撃数カウント
  61.     self.skill_chase_first = true     # 初期フラグ
  62.     self.skill_chase_set = []
  63.     self.skill_atk_f = 0
  64.     self.chase_skill_type = 0
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  68.   #--------------------------------------------------------------------------
  69.   alias update_phase4_step1_skill_chase update_phase4_step1
  70.   def update_phase4_step1
  71.     update_phase4_step1_skill_chase
  72.     init_chase
  73.   end

  74.   #--------------------------------------------------------------------------
  75.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  76.   #--------------------------------------------------------------------------
  77.   alias update_phase4_step3_skill_chase update_phase4_step3
  78.   def update_phase4_step3
  79.     # 追加攻撃実行中ならステップ4に強制移行
  80.     if self.skill_chase_exercise
  81.       # ステップ 4 に移行
  82.       @phase4_step = 4
  83.       return
  84.     elsif @active_battler.current_action.kind == 1
  85.       if @active_battler.is_a?(Game_Actor)
  86.         # 追加攻撃チェック
  87.         skill_chase_check(@skill)
  88.       end
  89.     end
  90.     update_phase4_step3_skill_chase       # 原物
  91.   end


  92.   #--------------------------------------------------------------------------
  93.   # ● 判定・設定
  94.   #--------------------------------------------------------------------------
  95.   def skill_chase_check(skill)
  96.     unless SKILL_CHASE[skill.id].nil?
  97.       self.skill_chase_set = SKILL_CHASE[skill.id]
  98.       @skill_chase_flg = true
  99.     end
  100.   end

  101.   #--------------------------------------------------------------------------
  102.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  103.   #--------------------------------------------------------------------------
  104.   alias update_phase4_step4_skill_chase update_phase4_step4
  105.   def update_phase4_step4
  106.     # 追加攻撃
  107.     if @skill_chase_flg
  108.       # キーチェックを開始する
  109.       @skill_chase_check_key = true
  110.       # 追加攻撃実行中ならアニメーション再セット
  111.       if self.skill_chase_exercise
  112.         @animation2_id = self.skill_chase_set[1]
  113.       end
  114.       # 対象側アニメーション
  115.       for target in @target_battlers
  116.         # クリティカルでアニメーション変化
  117.         if SKILL_CHASE_CRITICAL and target.critical and self.skill_chase_first
  118.           target.animation_id = self.skill_chase_set[5]
  119.         else
  120.           # 一度でもクリティカルがあった
  121.           if target.once_critical and SKILL_CHASE_DMG_ALL
  122.             target.critical = true
  123.           end
  124.           target.animation_id = @animation2_id
  125.         end
  126.         target.animation_hit = (target.damage != "Miss")
  127.       end
  128.       # ウェイトを入れる
  129.       if SKILL_CHASE_WAIT != nil
  130.         @wait_count = SKILL_CHASE_WAIT
  131.       end
  132.       # ステップ 5 に移行
  133.       @phase4_step = 5
  134.       return
  135.     end
  136.     update_phase4_step4_skill_chase     # 原物
  137.   end

  138.   #--------------------------------------------------------------------------
  139.   # ● 追加攻撃力設定
  140.   #--------------------------------------------------------------------------
  141.   def skill_chase_atk
  142.     # 物理攻撃系
  143.     if @skill.element_set.include?(CHASE_WEAPON)
  144.       self.chase_skill_type = 1
  145.       self.skill_atk_f = @skill.atk_f/100
  146.     # 魔法攻撃系
  147.     elsif @skill.element_set.include?(CHASE_MAGIC)
  148.       self.chase_skill_type = 2
  149.       self.skill_atk_f = @skill.int_f/100
  150.     else
  151.       p "設定ミス"
  152.     end
  153.     self.skill_chase_set[0] = @skill.power * self.skill_chase_set[0]/100
  154.   end

  155.   #--------------------------------------------------------------------------
  156.   # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示)
  157.   #--------------------------------------------------------------------------
  158.   alias update_phase4_step5_skill_chase update_phase4_step5
  159.   def update_phase4_step5
  160.     # キーチェック終了
  161.     @skill_chase_check_key = false
  162.     # 追加攻撃成功
  163.     if @skill_chase_success
  164.       skill_chase_atk
  165.       # 追加攻撃実行中に移行
  166.       self.skill_chase_exercise = true
  167.     end
  168.     # ダメージ一括表示
  169.     if SKILL_CHASE_DMG_ALL and self.skill_chase_exercise
  170.       # 追加攻撃終了or追加攻撃失敗
  171.       if self.skill_chase_end or !@skill_chase_success
  172.         self.skill_chase_exercise = false
  173.         @skill_chase_flg = false
  174.         self.skill_chase_end = false
  175.         # ヘルプウィンドウを隠す
  176.         @help_window.visible = false
  177.         # ステータスウィンドウをリフレッシュ
  178.         @status_window.refresh
  179.         # 積算ダメージの描写
  180.         for target in @target_battlers
  181.           if target.skill_chase_all_dmg != nil
  182.             target.damage = target.skill_chase_all_dmg
  183.             target.damage_pop = true
  184.             target.skill_chase_all_dmg = nil
  185.             # 途中で死んでたらトドメをさす
  186.             if target.skill_chase_dead_end
  187.               target.hp = 0
  188.               target.skill_chase_dead_end = false
  189.             end
  190.             # クリティカルが発生している
  191.             if target.once_critical
  192.               target.critical = true
  193.               target.once_critical = false
  194.             end
  195.           end
  196.         end
  197.         # ステップ 6 に移行
  198.         @phase4_step = 6
  199.         return
  200.       end
  201.     else
  202.       update_phase4_step5_skill_chase       # 原物
  203.     end
  204.     # 追加攻撃終了or追加攻撃失敗
  205.     if self.skill_chase_end or !@skill_chase_success
  206.       self.skill_chase_exercise = false
  207.       @skill_chase_flg = false
  208.       self.skill_chase_end = false
  209.       if SKILL_CHASE_DMG_ALL
  210.         for target in @target_battlers
  211.           target.skill_chase_all_dmg = nil
  212.           if target.skill_chase_dead_end
  213.             target.hp = 0
  214.             target.skill_chase_dead_end = false
  215.           end
  216.         end
  217.       end
  218.     end
  219.     if self.skill_chase_exercise
  220.       @skill_chase_success = false
  221.       # 追加攻撃開始
  222.       @phase4_step = 2
  223.       @active_battler.current_action.kind = 0
  224.       @active_battler.current_action.basic = 0
  225.     end
  226.   end

  227.   #--------------------------------------------------------------------------
  228.   # ● フレーム更新
  229.   #--------------------------------------------------------------------------
  230.   alias update_skill_chase update
  231.   def update
  232.     if @skill_chase_check_key and @skill_chase_flg
  233.       # 追加攻撃発動チェック
  234.       if (Input.trigger?(SKILL_CHASE_KEY) or self.skill_chase_set[2])
  235.         # 確率チェック
  236.         if rand(100) <= self.skill_chase_set[3]
  237.           @skill_chase_success = true
  238.           @skill_chase_check_key = false
  239.           @skill_chase_count += 1
  240.           # 追加攻撃回数チェック
  241.           if @skill_chase_count >= self.skill_chase_set[4] or self.skill_chase_end
  242.             self.skill_chase_end = true
  243.           else
  244.             # 追加攻撃成功SEを鳴らしてみる
  245.             if SKILL_CHASE_SE != nil and !self.skill_chase_end
  246.               Audio.se_play("Audio/SE/" + SKILL_CHASE_SE)
  247.             end
  248.           end
  249.         end
  250.       end
  251.     end
  252.     update_skill_chase              # 原物
  253.   end
  254.   #--------------------------------------------------------------------------
  255.   # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  256.   #--------------------------------------------------------------------------
  257.   alias update_phase4_step6_add_atk update_phase4_step6
  258.   def update_phase4_step6
  259.     init_chase
  260.     for target in @target_battlers
  261.       target.skill_chase_all_dmg = nil
  262.       target.skill_chase_dead_end = false
  263.       target.once_critical = false
  264.     end
  265.     update_phase4_step6_add_atk
  266.   end
  267. end


  268. #==============================================================================
  269. # ■ Game_Battler
  270. #==============================================================================
  271. class Game_Battler
  272.   include ExtraSkill
  273.   attr_accessor :skill_chase_all_dmg           # 積算ダメージ
  274.   attr_accessor :skill_chase_dead_end          # 死亡フラグ
  275.   attr_accessor :once_critical           # クリティカルフラグ(一括表示用)
  276.   #--------------------------------------------------------------------------
  277.   # ● オブジェクト初期化
  278.   #--------------------------------------------------------------------------
  279.   alias initialize_skill_chase initialize
  280.   def initialize
  281.     initialize_skill_chase
  282.     @skill_chase_all_dmg = nil
  283.     @skill_chase_dead_end = false
  284.     @once_critical = false
  285.   end

  286.   #--------------------------------------------------------------------------
  287.   # ● 通常攻撃の効果適用
  288.   #     attacker : 攻撃者 (バトラー)
  289.   #--------------------------------------------------------------------------
  290.   alias attack_effect_skill_chase attack_effect
  291.   def attack_effect(attacker)
  292.     if $scene.skill_chase_exercise
  293.       # クリティカルフラグをクリア
  294.       self.critical = false
  295.       # 基本ダメージを計算
  296.       if $scene.chase_skill_type == 1
  297.         atk_skill = (attacker.atk * $scene.skill_atk_f + $scene.skill_chase_set[0])/1.2
  298.       elsif $scene.chase_skill_type == 2
  299.         atk_skill = (attacker.int * $scene.skill_atk_f + $scene.skill_chase_set[0])/1.2
  300.       else
  301.         p "設定ミス2"
  302.       end
  303.       atk = [atk_skill.to_int - self.pdef / 2, 0].max
  304.       self.damage = atk * (20 + attacker.str) / 20
  305.       # 属性修正
  306.       self.damage *= elements_correct(attacker.element_set)
  307.       self.damage /= 100
  308.       # ダメージの符号が正の場合
  309.       if self.damage > 0
  310.         # クリティカル修正
  311.         if rand(100) < 4 * attacker.dex / self.agi
  312.           self.damage *= 2
  313.           self.critical = true
  314.           self.once_critical = true
  315.         end
  316.         # 防御修正
  317.         if self.guarding?
  318.           self.damage /= 2
  319.         end
  320.       end
  321.       # 分散
  322.       if self.damage.abs > 0
  323.         amp = [self.damage.abs * 15 / 100, 1].max
  324.         self.damage += rand(amp+1) + rand(amp+1) - amp
  325.       end
  326.       # 第二命中判定
  327.       eva = 8 * self.agi / attacker.dex + self.eva
  328.       hit = self.damage < 0 ? 100 : 100 - eva
  329.       hit = self.cant_evade? ? 100 : hit
  330.       hit_result = (rand(100) < hit)
  331.       # 命中の場合
  332.       if hit_result == true
  333.         # ステート衝撃解除
  334.         remove_states_shock
  335.         # HP からダメージを減算
  336.         self.hp -= self.damage
  337.         # ステート変化
  338.         @state_changed = false
  339.         states_plus(attacker.plus_state_set)
  340.         states_minus(attacker.minus_state_set)
  341.       # ミスの場合
  342.       else
  343.         # ダメージに "Miss" を設定
  344.         self.damage = "Miss"
  345.         # クリティカルフラグをクリア
  346.         self.critical = false
  347.       end
  348.     else
  349.       attack_effect_skill_chase(attacker)      # 原物
  350.     end
  351.     if self.dead?
  352.       # こいつはもう死んでいる
  353.       @skill_chase_dead_end = true
  354.       # ダメージ一括表示
  355.       if SKILL_CHASE_DMG_ALL and $scene.skill_chase_exercise
  356.         # とりあえず生かしておく
  357.         self.hp = 1
  358.       else
  359.         $scene.skill_chase_end = true
  360.       end
  361.     end
  362.     # ダメージ一括表示ならダメージの蓄積
  363.     if SKILL_CHASE_DMG_ALL and self.damage != "Miss" and $scene.skill_chase_exercise
  364.       @skill_chase_all_dmg = (@skill_chase_all_dmg == nil ? 0 : @skill_chase_all_dmg)
  365.       @skill_chase_all_dmg += self.damage
  366.       self.damage = nil
  367.     elsif SKILL_CHASE_DMG_ALL and self.damage != "Miss" and $scene.skill_chase_first
  368.       @skill_chase_all_dmg = (@skill_chase_all_dmg == nil ? 0 : @skill_chase_all_dmg)
  369.       @skill_chase_all_dmg += self.damage
  370.       $scene.skill_chase_first = false
  371.     else
  372.       # ダメージミスなら終了
  373.       if SKILL_CHASE_MISS and self.damage == "Miss"
  374.         $scene.skill_chase_end = true
  375.         if SKILL_CHASE_DMG_ALL and @skill_chase_all_dmg == nil
  376.           @skill_chase_all_dmg = "Miss"
  377.         end
  378.       end
  379.     end
  380.     # メソッド終了
  381.     return true
  382.   end

  383.   #--------------------------------------------------------------------------
  384.   # ● スキルの効果適用
  385.   #     user  : スキルの使用者 (バトラー)
  386.   #     skill : スキル
  387.   #--------------------------------------------------------------------------
  388.   alias skill_effect_skill_chase skill_effect
  389.   def skill_effect(user, skill)
  390.     ret = skill_effect_skill_chase(user, skill)
  391.     if self.dead?
  392.       # こいつはもう死んでいる
  393.       @skill_chase_dead_end = true
  394.       # ダメージ一括表示
  395.       if SKILL_CHASE_DMG_ALL and ($scene.skill_chase_exercise or $scene.skill_chase_first)
  396.         # とりあえず生かしておく
  397.         self.hp = 1
  398.       else
  399.         $scene.skill_chase_end = true
  400.       end
  401.     end
  402.     # ダメージ一括表示ならダメージの蓄積
  403.     if SKILL_CHASE_DMG_ALL and self.damage != "Miss" and $scene.skill_chase_exercise
  404.       @skill_chase_all_dmg = (@skill_chase_all_dmg == nil ? 0 : @skill_chase_all_dmg)
  405.       @skill_chase_all_dmg += self.damage
  406.       self.damage = nil
  407.     elsif SKILL_CHASE_DMG_ALL and self.damage != "Miss" and $scene.skill_chase_first
  408.       @skill_chase_all_dmg = (@skill_chase_all_dmg == nil ? 0 : @skill_chase_all_dmg)
  409.       @skill_chase_all_dmg = self.damage
  410.       $scene.skill_chase_first = false
  411.     else
  412.       # ダメージミスなら終了
  413.       if SKILL_CHASE_MISS and self.damage == "Miss"
  414.         $scene.skill_chase_end = true
  415.         if SKILL_CHASE_DMG_ALL and @skill_chase_all_dmg == nil
  416.           @skill_chase_all_dmg = "Miss"
  417.         end
  418.       end
  419.     end
  420.     return ret
  421.   end
  422. end
复制代码

点评

还有大神能不能搞简单一点,我就想把在第50号状态下(不论敌我)释放第100号攻击技能后50%几率释放第101号攻击技能这个脚本弄出来就行啦。。  发表于 2019-7-17 16:44
大神那个100号技能和101号技能塞到这个脚本的哪里啊?  发表于 2019-7-17 16:40

评分

参与人数 1赞 +1 收起 理由
taeckle + 1 六脉神剑!

查看全部评分

回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-7-17 16:42:32 | 显示全部楼层
soulsaga 发表于 2019-7-17 16:32
#==============================================================================
# ■ XP-RGSS-13 スキ ...

# 設定例
  # SKILL_CHASE[スキルID] = [追加攻撃の攻撃力(%), 連鎖アニメID, オート発動フラグ,
  #  成功率, 連続回数,クリティカル時アニメ]]
  SKILL_CHASE[57] = [100, 31, false, 100, 5, 32]
  SKILL_CHASE[61] = [100, 42, false, 100, 4, 43]

点评

我还是想学用脚本做这个不同技能的连击设定,,,  发表于 2019-7-17 23:25
技能调用公共事件强制行动里那个“战斗者”设定看不懂啥意思啊。。  发表于 2019-7-17 23:24
召唤大神  发表于 2019-7-17 23:22
还是技能调用公共事件强制行动简单得多..你会的吧  发表于 2019-7-17 18:15
你技能调用公共事件强制行动不更好?简单方便快捷..  发表于 2019-7-17 16:59

评分

参与人数 1赞 +1 收起 理由
taeckle + 1 有点明白了!

查看全部评分

回复

使用道具 举报

梦石
0
星屑
9160
在线时间
466 小时
注册时间
2015-5-8
回帖
704
 楼主| 发表于 2019-7-17 23:29:17 | 显示全部楼层
soulsaga 发表于 2019-7-17 16:42
# 設定例
  # SKILL_CHASE[スキルID] = [追加攻撃の攻撃力(%), 連鎖アニメID, オート発動フラグ,
  #   ...

还有为什么有时候每楼的点评一栏我看不到。。

点评

比如现在又看不到了  发表于 2019-7-18 22:34
刷新一下就看不到点评了,必须再在点评栏里输入几个字才能再次看到  发表于 2019-7-17 23:30
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-7-18 10:14:00 | 显示全部楼层
taeckle 发表于 2019-7-17 23:29
还有为什么有时候每楼的点评一栏我看不到。。

在那楼再点评就看到了..
另外我是叫你还不如用技能调用公用事件强制行动做好过..
回复

使用道具 举报

梦石
0
星屑
9160
在线时间
466 小时
注册时间
2015-5-8
回帖
704
 楼主| 发表于 2019-7-18 23:24:38 | 显示全部楼层
soulsaga 发表于 2019-7-18 10:14
在那楼再点评就看到了..
另外我是叫你还不如用技能调用公用事件强制行动做好过.. ...

那个公共事件强制行动里的“战斗者”设定是神马意思啊?
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部