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

Project1

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

[已经过期] 麻烦大佬帮我看看这2个脚本怎么才不冲突

[复制链接]

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
跳转到指定楼层
1
发表于 2021-8-14 07:02:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
第一个


#==============================================================================
# ☆技能熟练度,等级☆
#------------------------------------------------------------------------------
#  by -> 芯☆淡茹水
#==============================================================================
#  复制该脚本,插入到 main 前。
#==============================================================================
#  要手动增加角色某技能的熟练度,需先指定角色,如 :actor = $game_party.actors[0]
#或:actor = $game_actors[1].  然后再:actor.skill_proficiency[技能ID] = 熟练度。
#注意:技能ID 须是该角色已经习得的技能。手动增加可制作成增加技能熟练度的物品,
#或是增加获得技能熟练度的武器。
#==============================================================================
# 击中对象一次,技能所增加的熟练度。
P_PLUS = 1
# 技能熟练度及其对应的等级。
#             1级 2级 3级 4级  5级  6级  7级  8级  9级  10级
SKILL_LEVEL = [0, 50, 200, 300, 400, 700, 900, 1000, 1200, 5000]
#==============================================================================
class Game_Actor < Game_Battler
  attr_accessor :skill_proficiency        # 技能熟练度
  #--------------------------------------------------------------------------
  alias add_setup_xdrs setup
  def setup(actor_id)
    @skill_proficiency = {}
    add_setup_xdrs(actor_id)
  end
  #--------------------------------------------------------------------------
  def learn_skill(skill_id)
    if skill_id > 0 and not skill_learn?(skill_id)
      @skills.push(skill_id)
      @skills.sort!
      @skill_proficiency[skill_id] = 0
    end
  end
  #--------------------------------------------------------------------------
  def forget_skill(skill_id)
    @skills.delete(skill_id)
    @skill_proficiency.delete[skill_id]
  end
  #--------------------------------------------------------------------------
  def skill_level(skill_id)
    skill = $data_skills[skill_id]
    n = @skill_proficiency[skill_id]
    date = []
    for i in 0...SKILL_LEVEL.size
      c = n - SKILL_LEVEL[i]
      date.push(c) if c >= 0
    end
    date.sort!
    for i in 0...SKILL_LEVEL.size
      c = n - SKILL_LEVEL[i]
      if c == date[0]
        return i + 1
      end
    end
  end
end
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  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
end
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # 清除会心一击标志
    self.critical = false
    # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
    # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
      # 过程结束
      return false
    end
    # 清除有效标志
    effective = false
    # 公共事件 ID 是有效的情况下,设置为有效标志
    effective |= skill.common_event_id > 0
    # 第一命中判定
    hit = skill.hit
    if skill.atk_f > 0
      hit *= user.hit / 100
    end
    hit_result = (rand(100) < hit)
    # 不确定的特技的情况下设置为有效标志
    effective |= hit < 100
    # 命中的情况下
    if hit_result == true
      # 计算威力
      power = skill.power + user.atk * skill.atk_f / 100
      if power > 0
        power -= self.pdef * skill.pdef_f / 200
        power -= self.mdef * skill.mdef_f / 200
        power = [power, 0].max
      end
      #######################################################
      # 威力再加上 熟练度 的 1/10 。
      if user.is_a?(Game_Actor)
        if power > 0
          power += user.skill_proficiency[skill.id] / 10
        elsif power < 0
          power -= user.skill_proficiency[skill.id] / 10
        end
      end
      #######################################################
      # 计算倍率
      rate = 20
      rate += (user.str * skill.str_f / 100)
      rate += (user.dex * skill.dex_f / 100)
      rate += (user.agi * skill.agi_f / 100)
      rate += (user.int * skill.int_f / 100)
      #########################################################
      # 倍率再加上 技能等级 减 1 的 5 倍。
      if user.is_a?(Game_Actor)
        rate += ($game_actors[user.id].skill_level(skill.id) - 1) * 5
      end
      #########################################################
      # 计算基本伤害
      self.damage = power * rate / 20
      # 属性修正
      self.damage *= elements_correct(skill.element_set)
      self.damage /= 100
      # 伤害符号正确的情况下
      if self.damage > 0
        # 防御修正
        if self.guarding?
          self.damage /= 2
        end
      end
      # 分散
      if skill.variance > 0 and self.damage.abs > 0
        amp = [self.damage.abs * skill.variance / 100, 1].max
        self.damage += rand(amp+1) + rand(amp+1) - amp
      end
      # 第二命中判定
      eva = 8 * self.agi / user.dex + self.eva
      hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
      # 不确定的特技的情况下设置为有效标志
      effective |= hit < 100
    end
    # 命中的情况下
    if hit_result == true
      # 威力 0 以外的物理攻击的情况下
      if skill.power != 0 and skill.atk_f > 0
        # 状态冲击解除
        remove_states_shock
        # 设置有效标志
        effective = true
      end
      # HP 的伤害减法运算
      last_hp = self.hp
      self.hp -= self.damage
      effective |= self.hp != last_hp
      # 状态变化
      @state_changed = false
      effective |= states_plus(skill.plus_state_set)
      effective |= states_minus(skill.minus_state_set)
      # 威力为 0 的场合
      if skill.power == 0
        # 伤害设置为空的字串
        self.damage = ""
        # 状态没有变化的情况下
        unless @state_changed
          # 伤害设置为 "Miss"
          self.damage = "Miss"
        end
      end
    # Miss 的情况下
    else
      # 伤害设置为 "Miss"
      self.damage = "Miss"
    end
    # 不在战斗中的情况下
    unless $game_temp.in_battle
      # 伤害设置为 nil
      self.damage = nil
    end
    # 过程结束
    return effective
  end
end
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  alias add_update_phase4_step4_xdrs update_phase4_step4
  def update_phase4_step4
    if @active_battler.is_a?(Game_Actor) and
     @active_battler.current_action.kind == 1
      for target in @target_battlers
        if target.damage != "Miss"
          @active_battler.skill_proficiency[@skill.id] += P_PLUS
          break
        end
      end
    end
    add_update_phase4_step4_xdrs
  end
end






第二个

#==============================================================================
# ★【  自动战斗  】★
#==============================================================================
#  by -> 芯☆淡如水
#==============================================================================
# ● 使用方法:复制该脚本,插入到 main 前。
#==============================================================================
# ● 说明:
#         自动战斗,顾名思义,就是角色选择“自动战斗”后,无需玩家给角色下达
#      指令,角色仍可自己行动。
#        
#         该自动战斗有 2 个模式:普通自动战斗 和 AI自动战斗。2 种模式的切换
#       使用下面设置项的开关。
#
#         角色在 普通自动战斗 时,只是普通攻击敌人。选择的敌人目标偏向血较少
#      者。
#
#         角色在 AI自动战斗 时,判断角色行动类型的流程为:复活同伴 --》 恢复
#      同伴(HP和SP)--》攻击。
#         如果队伍中有同伴死亡,有很大几率复活同伴(具体多大几率就不透露),
#      死亡的同伴个数越多,几率越大。复活同伴的前提条件是有复活类药品或特技。
#         跳过复活同伴是恢复同伴,恢复同伴的几率以整体的剩余HP/SP的百分比来
#      算,百分比越小,几率越高。单体恢复同伴HP/SP的恢复对象,偏向HP/SP较少
#      者。恢复同伴的前提条件是有恢复类药品或特技。
#         最后是攻击,攻击判断之前有一定的几率对同伴使用 增益特技。攻击分为
#      普通攻击和使用特技,几率以角色的不同而不同,如果是战士类型的角色,普通
#      攻击的几率高于使用特技的几率;法师类型的角色则相反。使用特技时有一定的
#      几率使用不良状态特技。所有使用特技都是以角色已习得的特技为基础。普通攻
#      击和使用单体攻击特技的对象目标,也是偏向血较少者。
#
#
#   ■ 恢复:     自动战斗者在恢复同伴时,首先确定恢复对象,根据对象需要恢复的
#               HP/SP 的多少,来确定使用的物品或特技。需要恢复的对象越多,使用
#               “己方全体”的物品或特技的几率越大,单个的恢复对象是不会使用
#               “己方全体”的物品或特技。
#              
#                比如确定了某个恢复对象,该对象需要回复 HP 100 ,所能使用的物品
#               或特技有 3 种:回复 HP 60 ;回复 HP 110 ;回复 HP 220 。那么自动
#               战斗者会选择 “回复 HP 110” 的这个物品或特技来恢复该对象。
#
#
#   ■ 特技攻击:  如果自动战斗者能够使用“敌全体”特技,并且敌人的数量是 2 个
#               或以上时,自动战斗者有几率使用“敌全体”特技,敌人数量越多,几
#               率越大。
#
#                  如果是单个攻击对象,首先确定对象,根据该对象剩余的 HP 来选择
#               特技。在这之前会先判断普通攻击能否打倒该对象,如果能打倒该对象,
#               就使用普通攻击,而不使用特技了。
#
#               比如:例1:攻击对象剩余HP:160 ,自动战斗者可使用的特技有:对该
#                          对象伤害 HP 180 和 伤害 HP 260 两个特技,但自动战斗者
#                          对该对象的普通攻击伤害为:HP 200 ,那么自动战斗者会
#                          选择普通攻击而不使用特技。
#
#                     例2:攻击对象剩余HP:2000 ,自动战斗者可使用的特技有:对该
#                          对象伤害 HP 200 ; 伤害 HP 600 ;伤害 HP 1000 三种,
#                          那么自动战斗者会选择 伤害 HP 1000 的这个特技来攻击该
#                          对象。
#==============================================================================
# ● 设置:
#------------------------------------------------------------------------------
# 打开或关闭 自动战斗功能 的开关 ID。
AUTO_SWEITCHE = 1
#------------------------------------------------------------------------------
# 是否 AI自动战斗 的开关 ID。该开关打开为 AI自动;关闭为 普通自动。
AI_AUTO_SWEITCHE = 2
#------------------------------------------------------------------------------
# 角色自动战斗时,自动提示的等待时间(帧)。
WAIT_TIME = 50
#------------------------------------------------------------------------------
# 增益状态 特技 ID 。
UP_PLUS_SKILLS = [53, 54]
#------------------------------------------------------------------------------
# 不良状态 特技 ID 。
DOWN_PLUS_SKILLS = [41, 46]
#=============================================================================
##############################################################################
#=============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  attr_accessor :auto_battle
  attr_accessor :auto_battle_targets
  #--------------------------------------------------------------------------
  alias add_setup_xdrs setup
  def setup(actor_id)
    @auto_battle = false
    @auto_battle_targets = []
    add_setup_xdrs(actor_id)
  end
end
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  def main
    # 初始化战斗用的各种暂时数据
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # 初始化战斗用事件解释器
    $game_system.battle_interpreter.setup(nil, 0)
    # 准备队伍
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    # 生成角色命令窗口
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    s5 = "自动"
    s6 = "逃跑"
    if $game_switches[AUTO_SWEITCHE]
      @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
      @actor_command_window.y = 96
    else
      @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, s6])
      @actor_command_window.y = 128
    end
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # 生成其它窗口
    #
    @auto_top = Window_Base.new(0, 256, 160, 64)
    @auto_top.contents = Bitmap.new(@auto_top.width - 32, @auto_top.height - 32)
    @auto_top.contents.draw_text(0, 0, 138, 32,"确定键:取消自动")
    @auto_top.back_opacity = 160
    @auto_top.visible = false
    #
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # 生成活动块
    @spriteset = Spriteset_Battle.new
    # 初始化等待计数
    @wait_count = 0
    @auto_wait_count = 0
    # 执行过渡
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # 开始自由战斗回合
    start_phase1
    # 主循环
    loop do
      # 刷新游戏画面
      Graphics.update
      # 刷新输入信息
      Input.update
      # 刷新画面
      update
      # 如果画面切换的话就中断循环
      if $scene != self
        break
      end
    end
    # 刷新地图
    $game_map.refresh
    # 准备过渡
    Graphics.freeze
    # 释放窗口
    @auto_top.dispose
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    if @skill_window != nil
      @skill_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    # 释放活动块
    @spriteset.dispose
    # 标题画面切换中的情况
    if $scene.is_a?(Scene_Title)
      # 淡入淡出画面
      Graphics.transition
      Graphics.freeze
    end
    # 战斗测试或者游戏结束以外的画面切换中的情况
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  def start_phase2
    # 转移到回合 2
    @phase = 2
    # 设置角色为非选择状态
    @actor_index = -1
    @active_battler = nil
    unless $game_party.inputable?
      # 开始主回合
      start_phase4
      return
    end
    start_phase3
  end
  #--------------------------------------------------------------------------
  def phase3_prior_actor
    # 循环
    begin
      # 角色的明灭效果 OFF
      if @active_battler != nil
        @active_battler.blink = false
      end
      # 最初的角色的情况下
      if @actor_index == 0
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 返回角色索引
      @actor_index -= 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # 如果角色是在无法接受指令的状态就再试
    end until @active_battler.inputable?
    # 设置角色的命令窗口
    phase3_setup_command_window
  end
#--------------------------------------------------------------------------
  def update_phase3_basic_command
    # 按下 B 键的情况下
    if Input.trigger?(Input::B)
      # 演奏取消 SE
      $game_system.se_play($data_system.cancel_se)
      # 转向前一个角色的指令输入
      phase3_prior_actor
      return
    end
    # 按下 C 键的情况下
    if Input.trigger?(Input::C)
      # 角色指令窗口光标位置分之
      case @actor_command_window.index
      when 0  # 攻击
        # 演奏确定 SE
        $game_system.se_play($data_system.decision_se)
        # 设置行动
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
        # 开始选择敌人
        start_enemy_select
      when 1  # 特技
        # 演奏确定 SE
        $game_system.se_play($data_system.decision_se)
        # 设置行动
        @active_battler.current_action.kind = 1
        # 开始选择特技
        start_skill_select
      when 2  # 防御
        # 演奏确定 SE
        $game_system.se_play($data_system.decision_se)
        # 设置行动
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        # 转向下一位角色的指令输入
        phase3_next_actor
      when 3  # 物品
        # 演奏确定 SE
        $game_system.se_play($data_system.decision_se)
        # 设置行动
        @active_battler.current_action.kind = 2
        # 开始选择物品
        start_item_select
      when 4  # 自动
        if $game_switches[AUTO_SWEITCHE]
          # 演奏确定 SE
          $game_system.se_play($data_system.decision_se)
          @actor_command_window.active = false
          @actor_command_window.visible = false
          @active_battler.auto_battle = true
          phase3_next_actor
        else
           # 演奏确定 SE
          $game_system.se_play($data_system.decision_se)
          # 逃走处理
          update_phase2_escape
        end        
      when 5  # 逃跑
        # 不能逃跑的情况下
        if $game_temp.battle_can_escape == false
          # 演奏冻结 SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 演奏确定 SE
        $game_system.se_play($data_system.decision_se)
        # 逃走处理
        update_phase2_escape
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  alias add_phase3_setup_command_window_xdrs phase3_setup_command_window
  def phase3_setup_command_window
    if @active_battler.auto_battle
      @auto_wait_count = WAIT_TIME
      @actor_command_window.active = false
      @actor_command_window.visible = false
      @auto_top.visible = true
      @auto_top.x = @actor_index * 160
      return
    end
    add_phase3_setup_command_window_xdrs
  end
  #--------------------------------------------------------------------------
  alias add_update_phase3_xdrs update_phase3
  def update_phase3
    if @auto_wait_count > 0
      update_wait_at
      return
    end
    add_update_phase3_xdrs
  end
  #--------------------------------------------------------------------------
  def update_wait_at
    @auto_wait_count -= 1
    if @auto_wait_count == 0
      $game_system.se_play($data_system.decision_se)
      @auto_top.visible = false
      phase3_next_actor
      return
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @auto_wait_count = 0
      phase3_prior_actor
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @auto_wait_count = 0
      @active_battler.auto_battle = false
      @auto_top.visible = false
      @actor_index -= 1
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  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 = []
    if @active_battler.is_a?(Game_Actor)
      if @active_battler.auto_battle and not @active_battler.dead?
        set_auto_battle
        case @active_battler.current_action.kind
        when 0  
          make_basic_auto
        when 1  
          make_skill_auto
        when 2  
          make_item_auto
        end
        if @phase4_step == 2
          @phase4_step = 3
        end
        return
      end
    end
    # 行动种类分支
    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_auto
    case @active_battler.current_action.basic
    when 0
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      if @active_battler.restriction == 3
        target = $game_party.random_target_actor
        @active_battler.auto_battle_targets = []
        @active_battler.auto_battle_targets.push(target)
      elsif @active_battler.restriction == 2
        target = $game_troop.random_target_enemy
        @active_battler.auto_battle_targets = []
        @active_battler.auto_battle_targets.push(target)
      end
      @target_battlers = @active_battler.auto_battle_targets
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    when 1
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
  end
  #--------------------------------------------------------------------------
  def make_skill_auto
    @skill = $data_skills[@active_battler.current_action.skill_id]
    unless @active_battler.current_action.forcing
      unless @active_battler.skill_can_use?(@skill.id)
        $game_temp.forcing_battler = nil
        @phase4_step = 1
        return
      end
    end
    @active_battler.sp -= @skill.sp_cost
    @status_window.refresh
    @help_window.set_text(@skill.name, 1)
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    @common_event_id = @skill.common_event_id
    @target_battlers = @active_battler.auto_battle_targets
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
  #--------------------------------------------------------------------------
  def make_item_auto
    @item = $data_items[@active_battler.current_action.item_id]
    unless $game_party.item_can_use?(@item.id)
      @phase4_step = 1
      return
    end
    if @item.consumable
      $game_party.lose_item(@item.id, 1)
    end
    @help_window.set_text(@item.name, 1)
    @animation1_id = @item.animation1_id
    @animation2_id = @item.animation2_id
    @common_event_id = @item.common_event_id
    @target_battlers = @active_battler.auto_battle_targets
    for target in @target_battlers
      target.item_effect(@item)
    end
  end
  #--------------------------------------------------------------------------
  alias add_update_phase4_step6_xdrs update_phase4_step6
  def update_phase4_step6
    @active_battler.auto_battle_targets = [] if @active_battler.is_a?(Game_Actor)
    add_update_phase4_step6_xdrs
  end
  #==============================================================================
  #==============================================================================
  def set_auto_battle
    if $game_switches[AI_AUTO_SWEITCHE]
      ai_auto_battle
    else
      base_atk
    end
  end
  #----------------------------------------------------------------------------
  def ai_auto_battle
    set_probability
    if rand (100) < @f_probability
      f_actor
      return
    end
    judge_r_actor
  end
  #----------------------------------------------------------------------------
  def set_probability
    @f_probability = 0
    h = mh = s = ms = 0.0
    if dead_actors != []
      @f_probability = 70
      @f_probability += (dead_actors.size - 1) * 20
    end
    for actor in all_actors
      h += actor.hp
      mh += actor.maxhp
      s += actor.sp
      ms += actor.maxsp
    end
    @rh_probability = 100 - (h / mh * 100).ceil
    @rh_probability += pressing_actor_hp.size * 30
    @rs_probability = 100 - (s / ms * 100).ceil
    @rs_probability += pressing_actor_sp.size * 30
  end
  #----------------------------------------------------------------------------
  def f_actor
    @f_skills = @f_items = []
    for id in @active_battler.skills
      skill = $data_skills[id]
      if @active_battler.skill_can_use?(id) and [5, 6].include?(skill.scope)
        @f_skills.push(skill)
      end
    end
    for id in 1...$data_items.size
      item = $data_items[id]
      if $game_party.item_number(id) > 0 and [5, 6].include?(item.scope)
        @f_items.push(item)
      end
    end
    if @f_skills != [] or @f_items != []
      if rand (2) == 0
        if @f_skills != []
          f_actor_skill
          return
        end
        f_actor_item
        return
      else
        if @f_items != []
          f_actor_item
          return
        end
        f_actor_skill
        return
      end
    end
    judge_r_actor
  end
  #----------------------------------------------------------------------------
  def f_actor_skill
    @active_battler.current_action.kind = 1
    skill = @f_skills[rand (@f_skills.size)]
    @active_battler.current_action.skill_id = skill.id
    set_autobattler_targets
  end
  #----------------------------------------------------------------------------
  def f_actor_item
    @active_battler.current_action.kind = 2
    item = @f_items[rand (@f_items.size)]
    @active_battler.current_action.item_id = item.id
    set_autobattler_targets
  end
  #----------------------------------------------------------------------------
  def judge_r_actor
    if @rh_probability >= 30 and rand (120) < @rh_probability
      r_actor_hp
      return
    end
    if @rs_probability >= 50 and rand (150) < @rs_probability
      r_actor_sp
      return
    end
    judge_battle
  end
  #----------------------------------------------------------------------------
  def r_actor_hp
    if recover_hp_items != [] or recover_hp_skills != []   
      if rand (2) == 0
        if recover_hp_items != []
          r_hp_item
          return
        end
        r_hp_skill
        return
      else
        if recover_hp_skills != []
          r_hp_skill
          return
        end
        r_hp_item
        return
      end
    end
    if @rs_probability >= 50 and rand (150) < @rs_probability
      r_actor_sp
      return
    end
    judge_battle
  end
  #----------------------------------------------------------------------------
  def r_actor_sp
    if recover_sp_items != []   
      r_sp_item
      return
    end
    judge_battle
  end
  #----------------------------------------------------------------------------
  def r_hp_item
    @active_battler.current_action.kind = 2
    date = []
    items = []
    for actor in all_actors
      if actor.hp * 100 < actor.maxhp * 90
        date.push(actor)
      end
    end
    for item in recover_hp_items
      items.push(item) if item.scope == 4
    end
    if ! items.empty? and date.size >= 2
      n = 10
      n += (date.size - 1) * 20
      if rand (100) < n
        item = items[rand (items.size)]
        @active_battler.current_action.item_id = item.id
        @active_battler.auto_battle_targets = all_actors
        return
      end
    end
    now_items = recover_hp_items - items
    if now_items.empty?
      judge_battle
      return
    end
    @active_battler.auto_battle_targets.push(targets_actor_hp)
    target = @active_battler.auto_battle_targets[0]
    set_use_item(now_items, target, 0)
  end
  #----------------------------------------------------------------------------
  def r_sp_item
    @active_battler.current_action.kind = 2
    date = []
    items = []
    for actor in all_actors
      if actor.sp * 100 < actor.maxsp * 60
        date.push(actor)
      end
    end
    for item in recover_sp_items
      items.push(item) if item.scope == 4
    end
    if ! items.empty? and date.size >= 2
      n = 10
      n += (date.size - 1) * 20
      if rand (100) < n
        item = items[rand (items.size)]
        @active_battler.current_action.item_id = item.id
        @active_battler.auto_battle_targets = all_actors
        return
      end
    end
    now_items = recover_sp_items - items
    if now_items.empty?
      judge_battle
      return
    end
    @active_battler.auto_battle_targets.push(targets_actor_sp)
    target = @active_battler.auto_battle_targets[0]
    set_use_item(now_items, target, 1)
  end
  #----------------------------------------------------------------------------
  def r_hp_skill
    date = []
    skills = []
    for actor in all_actors
      if actor.hp * 100 < actor.maxhp * 90
        date.push(actor)
      end
    end
    for skill in recover_hp_skills
      skills.push(skill) if skill.scope == 4
    end
    if ! skills.empty? and date.size >= 2
      n = 20
      n += (date.size - 1) * 20
      if rand (100) < n
        @active_battler.current_action.kind = 1
        skill = skills[rand(skills.size)]
        @active_battler.current_action.skill_id = skill.id
        @active_battler.auto_battle_targets = all_actors
        return
      end
    end
    now_skills = recover_hp_skills - skills
    if now_skills.empty?
      judge_battle
      return
    end
    @active_battler.current_action.kind = 1
    @active_battler.auto_battle_targets.push(targets_actor_hp)
    target = @active_battler.auto_battle_targets[0]
    set_use_skill(now_skills, target)
  end
  #---------------------------------------------------------------------------
  def judge_battle
    if up_plus_skills != []
      if rand (100) < 20
        use_up_skill
        return
      end
    end
    battle
  end
  #---------------------------------------------------------------------------
  def battle
    n = 100 - @active_battler.hp * 100 / @active_battler.maxhp
    if n > 80
      if rand (150) < n
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        return
      end
    end
    if @active_battler.int > @active_battler.str
      n = 80
    elsif @active_battler.int == @active_battler.str
      n = 60
    else
      n = 40
    end
    if rand (100) < n
      use_skill
    else
      base_atk
    end
  end
  #---------------------------------------------------------------------------
  def use_skill
    if down_plus_skills != []
      if rand (100) < 20
        use_down_skill
        return
      end
    end
    if att_skills != []
      use_att_skill
      return
    end
    base_atk
  end
  #---------------------------------------------------------------------------
  def use_up_skill
    @active_battler.current_action.kind = 1
    skill = up_plus_skills[rand (up_plus_skills.size)]
    @active_battler.current_action.skill_id = skill.id
    set_autobattler_targets
  end
  #--------------------------------------------------------------------------
  def use_down_skill
    @active_battler.current_action.kind = 1
    skill = down_plus_skills[rand (down_plus_skills.size)]
    @active_battler.current_action.skill_id = skill.id
    set_autobattler_targets
  end
  #--------------------------------------------------------------------------
  def use_att_skill
    @active_battler.current_action.kind = 1
    date = []
    for skill in att_skills
      date.push(skill) if skill.scope == 2
    end
    if all_enemys.size >= 2
      n = 10
      n += (all_enemys.size - 1) * 10
      n = [n, 80].min
      if rand (100) < n and ! date.empty?
        skill = date[rand (date.size)]
        @active_battler.current_action.skill_id = skill.id
        @active_battler.auto_battle_targets = all_enemys
        return
      end
    end
    now_skills = att_skills - date
    if now_skills.empty?
      base_atk
      return
    end
    @active_battler.auto_battle_targets.push(targets_enemy_hp)
    target = @active_battler.auto_battle_targets[0]
    if use_base_atk?(target)
      base_atk
      return
    end
    set_use_skill(now_skills, target)
  end
  #----------------------------------------------------------------------------
  def base_atk
    @active_battler.current_action.kind = 0
    @active_battler.current_action.basic = 0
    if @active_battler.auto_battle_targets.empty?
      @active_battler.auto_battle_targets.push(targets_enemy_hp)
    end
  end
  ############################################################################
  #----------------------------------------------------------------------------
  def rand_actors
    date = []
    while date.size != $game_party.actors.size
      actor = $game_party.actors[rand ($game_party.actors.size)]
      date.push(actor) if not date.include?(actor)
    end
    return date
  end
  #----------------------------------------------------------------------------
  def dead_actors
    date = []
    for actor in rand_actors
      date.push(actor) if actor.dead?
    end
    return date
  end
  #----------------------------------------------------------------------------
  def all_actors
    date = []
    for actor in rand_actors
      date.push(actor) if actor.exist?
    end
    return date
  end
  #----------------------------------------------------------------------------
  def targets_actor_hp
    if pressing_actor_hp != []      
      target = pressing_actor_hp[rand (pressing_actor_hp.size)]
      return target
    end
    date = []
    for actor in all_actors
      if actor.hp * 100 < actor.maxhp * 90
        date.push(actor)
      end
    end
    target = nil
    if date != []
      for actor in date
        hn = 100 - actor.hp * 100 / actor.maxhp
        if rand (100) < hn
          target = actor
          break
        end
      end
      target = date[rand (date.size)] if target == nil
    end
    target = all_actors[rand (all_actors.size)] if target == nil
    return target
  end
  #----------------------------------------------------------------------------
  def targets_actor_sp
    if pressing_actor_sp != []      
      target = pressing_actor_sp[rand (pressing_actor_sp.size)]
      return target
    end
    date = []
    for actor in all_actors
      if actor.sp * 100 < actor.maxsp * 80
        date.push(actor)
      end
    end
    target = nil
    if date != []
      for actor in date
        sn = 100 - actor.sp * 100 / actor.maxsp
        if rand (100) < sn
          target = actor
          break
        end
      end
      target = date[rand (date.size)] if target == nil
    end
    target = all_actors[rand (all_actors.size)] if target == nil
    return target
  end
  #----------------------------------------------------------------------------
  def pressing_actor_hp
    date = []
    for actor in all_actors
      if actor.hp * 100 <= actor.maxhp * 30
        date.push(actor)
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def pressing_actor_sp
    date = []
    for actor in all_actors
      if actor.sp * 100 <= actor.maxsp * 10
        date.push(actor)
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def recover_hp_items
    date = []
    for i in 1...$data_items.size
      item = $data_items[i]
      if $game_party.item_number(i) > 0 and [0, 1].include?(item.occasion)
        if not [5, 6].include?(item.scope)
          date.push(item) if item.recover_hp_rate > 0 or item.recover_hp > 0
        end
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def recover_sp_items
    date = []
    for i in 1...$data_items.size
      item = $data_items[i]
      if $game_party.item_number(i) > 0 and [0, 1].include?(item.occasion)
        date.push(item) if item.recover_sp_rate > 0 or item.recover_sp > 0
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def all_enemys
    date = []
    for enemy in $game_troop.enemies
      date.push(enemy) if enemy.exist?
    end
    return date
  end
  #----------------------------------------------------------------------------
  def targets_enemy_hp
    date = []
    for enemy in all_enemys
      if enemy.hp < enemy.maxhp
        date.push(enemy)
      end
    end
    target = nil
    if date != []
      for enemy in date
        hn = 100 - enemy.hp * 100 / enemy.maxhp
        if rand (100) < hn
          target = enemy
          break
        end
      end
    end
    target = all_enemys[rand (all_enemys.size)] if target == nil
    return target
  end
  #----------------------------------------------------------------------------
  def recover_hp_skills
    date = []
    for id in @active_battler.skills
      skill = $data_skills[id]
      if @active_battler.skill_can_use?(id) and skill.power < 0
        date.push(skill)
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def att_skills
    date = []
    for id in @active_battler.skills
      skill = $data_skills[id]
      if @active_battler.skill_can_use?(id) and skill.power > 0
        date.push(skill)
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def up_plus_skills
    date = []
    for id in @active_battler.skills
      skill = $data_skills[id]
      if @active_battler.skill_can_use?(id) and UP_PLUS_SKILLS.include?(id)
        date.push(skill)
      end
    end
    return date
  end
  #----------------------------------------------------------------------------
  def down_plus_skills
    date = []
    for id in @active_battler.skills
      skill = $data_skills[id]
      if @active_battler.skill_can_use?(id) and DOWN_PLUS_SKILLS.include?(id)
        date.push(skill)
      end
    end
    return date
  end
  #---------------------------------------------------------------------------
  def set_use_item(items, target, toyp)
    @item = nil
    case toyp
    when 0
      date = []
      for item in items
        recover = item.recover_hp + item.recover_hp_rate * target.maxhp
        n = (recover - (target.maxhp - target.hp)).abs
        date.push(n)
      end
      date.sort!
      for item in items
        recover = item.recover_hp + item.recover_hp_rate * target.maxhp
        n = (recover - (target.maxhp - target.hp)).abs
        if n == date[0]
          @item = item
          break
        end
      end
    when 1
      date = []
      for item in items
        recover = item.recover_sp + item.recover_sp_rate * target.maxsp
        n = (recover - (target.maxsp - target.sp)).abs
        date.push(n)
      end
      date.sort!
      for item in items
        recover = item.recover_sp + item.recover_sp_rate * target.maxsp
        n = (recover - (target.maxsp - target.sp)).abs
        if n == date[0]
          @item = item
          break
        end
      end
    end
    @item = items[rand(items.size)] if @item == nil
    @active_battler.current_action.item_id = @item.id
  end
  #---------------------------------------------------------------------------
  def set_use_skill(skills, target)
    r_skills = []
    a_skills = []
    skill = nil
    for i in skills
      damage = count_skill_damage(i, target)
      if damage < 0
        n = (target.maxhp - target.hp + damage).abs
        r_skills.push(n)
      else
        n = (target.hp - damage).abs
        a_skills.push(n)
      end
    end
    r_skills.sort!
    a_skills.sort!
    for i in skills
      damage = count_skill_damage(i, target)
      if damage < 0
        n = (target.maxhp - target.hp + damage).abs
        skill = i if n == r_skills[0]
      else
        n = (target.hp - damage).abs
        skill = i if n == a_skills[0]
      end
    end
    skill = skills[rand (skills.sizs)] if skill == nil
    @active_battler.current_action.skill_id = skill.id
  end
  #----------------------------------------------------------------------------
  def count_skill_damage(skill, target)
    power = skill.power + @active_battler.atk * skill.atk_f / 100
    if power > 0
      power -= target.pdef * skill.pdef_f / 200
      power -= target.mdef * skill.mdef_f / 200
      power = [power, 0].max
    end
    rate = 20
    rate += (target.str * skill.str_f / 100)
    rate += (target.dex * skill.dex_f / 100)
    rate += (target.agi * skill.agi_f / 100)
    rate += (target.int * skill.int_f / 100)
    damage = power * rate / 20
    if skill.element_set == []
      rn = 100
    else
      rn = -100
      for i in skill.element_set
        rn = [rn, target.element_rate(i)].max
      end
    end
    damage = damage * rn / 100
    return damage
  end
  #----------------------------------------------------------------------------
  def use_base_atk?(target)
    atk = [@active_battler.atk - target.pdef / 2, 0].max
    damage = atk * (20 + @active_battler.str) / 20
    if @active_battler.element_set == []
      rn = 100
    else
      rn = -100
      for i in skill.element_set
        rn = [rn, target.element_rate(i)].max
      end
    end
    damage = damage * rn / 100
    n = target.hp - damage
    return true if n <= 0
    return false
  end
  #--------------------------------------------------------------------------
  def set_autobattler_targets
    case @active_battler.current_action.kind
    when 0
      @active_battler.auto_battle_targets.push(targets_enemy_hp)
    when 1
      skill = $data_skills[@active_battler.current_action.skill_id]
      if [5, 6].include?(skill.scope) and dead_actors != []
        if skill.scope == 5
          target = dead_actors[rand (dead_actors.size)]
          @active_battler.auto_battle_targets.push(target)
        else
          @active_battler.auto_battle_targets = dead_actors
        end
        return
      end
      if UP_PLUS_SKILLS.include?(skill.id)
        if skill.scope == 3
          target = all_actors[rand (all_actors.size)]
          @active_battler.auto_battle_targets.push(target)
        elsif skill.scope == 4
          @active_battler.auto_battle_targets = all_actors
        elsif skill.scope == 7
          @active_battler.auto_battle_targets.push(@active_battler)
        end
        return
      end
      if DOWN_PLUS_SKILLS.include?(skill.id)
        if skill.scope == 1
          target = all_enemys[rand (all_enemys.size)]
          @active_battler.auto_battle_targets.push(target)
        elsif skill.scope == 2
          @active_battler.auto_battle_targets = all_enemys
        end
        return
      end
      if skill.power > 0
        if skill.scope == 1
          @active_battler.auto_battle_targets.push(targets_enemy_hp)
        elsif skill.scope == 2
          @active_battler.auto_battle_targets = all_enemys
        end
      elsif skill.power < 0
        if skill.scope == 3
          @active_battler.auto_battle_targets.push(targets_actor_hp)
        elsif skill.scope == 4
          @active_battler.auto_battle_targets = all_actors
        end
      end
    when 2
      item = $data_items[@active_battler.current_action.item_id]
      case item.scope
      when 1
        @active_battler.auto_battle_targets.push(targets_enemy_hp)
      when 2
        @active_battler.auto_battle_targets = all_enemys
      when 3
        if (item.recover_sp_rate > 0 or item.recover_sp > 0) and
          (item.recover_hp_rate > 0 or item.recover_hp > 0)
          if rand (100) < 50
            @active_battler.auto_battle_targets.push(targets_actor_sp)
          else
            @active_battler.auto_battle_targets.push(targets_actor_hp)
          end
          return
        end
        if item.recover_hp_rate > 0 or item.recover_hp > 0
          @active_battler.auto_battle_targets.push(targets_actor_hp)
          return
        end
        if item.recover_sp_rate > 0 or item.recover_sp > 0
          @active_battler.auto_battle_targets.push(targets_actor_sp)
          return
        end
      when 4
        @active_battler.auto_battle_targets = all_actors
      when 5
        target = dead_actors[rand (dead_actors.size)]
        @active_battler.auto_battle_targets.push(target)
      when 6
        @active_battler.auto_battle_targets = dead_actors
      when 7
        @active_battler.auto_battle_targets.push(@active_battler)
      end
    end
  end
end
#==============================================================================
###############################################################################
#==============================================================================



由于才建号什么星 不好意思了

Lv5.捕梦者

梦石
0
星屑
33163
在线时间
10488 小时
注册时间
2009-3-15
帖子
4756
2
发表于 2021-8-14 09:29:38 | 只看该作者
有冲突吗..需要芯大的前置核心脚本...
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
3
 楼主| 发表于 2021-8-14 14:51:02 | 只看该作者
soulsaga 发表于 2021-8-14 09:29
有冲突吗..需要芯大的前置核心脚本...

有呢~反正2个在一起就错误了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
4
 楼主| 发表于 2021-8-14 14:56:27 | 只看该作者
#==============================================================================
# ☆技能熟练度,等级☆
#------------------------------------------------------------------------------
#  by -> 芯☆淡茹水
#==============================================================================
#  复制该脚本,插入到 main 前。
#==============================================================================
#  要手动增加角色某技能的熟练度,需先指定角色,如 :actor = $game_party.actors[0]
#或:actor = $game_actors[1].  然后再:actor.skill_proficiency[技能ID] = 熟练度。
#注意:技能ID 须是该角色已经习得的技能。手动增加可制作成增加技能熟练度的物品,
#或是增加获得技能熟练度的武器。
#==============================================================================
# 击中对象一次,技能所增加的熟练度。
P_PLUS = 1
# 技能熟练度及其对应的等级。
#             1级 2级 3级 4级  5级  6级  7级  8级  9级  10级
SKILL_LEVEL = [0, 50, 200, 300, 400, 700, 900, 1000, 1200, 5000]
#==============================================================================
class Game_Actor < Game_Battler
  attr_accessor :skill_proficiency        # 技能熟练度
  #--------------------------------------------------------------------------
  alias add_setup_xdrs setup
  def setup(actor_id)
    @skill_proficiency = {}
    add_setup_xdrs(actor_id)
  end
  #--------------------------------------------------------------------------
  def learn_skill(skill_id)
    if skill_id > 0 and not skill_learn?(skill_id)
      @skills.push(skill_id)
      @skills.sort!
      @skill_proficiency[skill_id] = 0
    end
  end
  #--------------------------------------------------------------------------
  def forget_skill(skill_id)
    @skills.delete(skill_id)
    @skill_proficiency.delete[skill_id]
  end
  #--------------------------------------------------------------------------
  def skill_level(skill_id)
    skill = $data_skills[skill_id]
    n = @skill_proficiency[skill_id]
    date = []
    for i in 0...SKILL_LEVEL.size
      c = n - SKILL_LEVEL[i]
      date.push(c) if c >= 0
    end
    date.sort!
    for i in 0...SKILL_LEVEL.size
      c = n - SKILL_LEVEL[i]
      if c == date[0]
        return i + 1
      end
    end
  end
end
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  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
end
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # 清除会心一击标志
    self.critical = false
    # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
    # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
      # 过程结束
      return false
    end
    # 清除有效标志
    effective = false
    # 公共事件 ID 是有效的情况下,设置为有效标志
    effective |= skill.common_event_id > 0
    # 第一命中判定
    hit = skill.hit
    if skill.atk_f > 0
      hit *= user.hit / 100
    end
    hit_result = (rand(100) < hit)
    # 不确定的特技的情况下设置为有效标志
    effective |= hit < 100
    # 命中的情况下
    if hit_result == true
      # 计算威力
      power = skill.power + user.atk * skill.atk_f / 100
      if power > 0
        power -= self.pdef * skill.pdef_f / 200
        power -= self.mdef * skill.mdef_f / 200
        power = [power, 0].max
      end
      #######################################################
      # 威力再加上 熟练度 的 1/10 。
      if user.is_a?(Game_Actor)
        if power > 0
          power += user.skill_proficiency[skill.id] / 10
        elsif power < 0
          power -= user.skill_proficiency[skill.id] / 10
        end
      end
      #######################################################
      # 计算倍率
      rate = 20
      rate += (user.str * skill.str_f / 100)
      rate += (user.dex * skill.dex_f / 100)
      rate += (user.agi * skill.agi_f / 100)
      rate += (user.int * skill.int_f / 100)
      #########################################################
      # 倍率再加上 技能等级 减 1 的 5 倍。
      if user.is_a?(Game_Actor)
        rate += ($game_actors[user.id].skill_level(skill.id) - 1) * 5
      end
      #########################################################
      # 计算基本伤害
      self.damage = power * rate / 20
      # 属性修正
      self.damage *= elements_correct(skill.element_set)
      self.damage /= 100
      # 伤害符号正确的情况下
      if self.damage > 0
        # 防御修正
        if self.guarding?
          self.damage /= 2
        end
      end
      # 分散
      if skill.variance > 0 and self.damage.abs > 0
        amp = [self.damage.abs * skill.variance / 100, 1].max
        self.damage += rand(amp+1) + rand(amp+1) - amp
      end
      # 第二命中判定
      eva = 8 * self.agi / user.dex + self.eva
      hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
      # 不确定的特技的情况下设置为有效标志
      effective |= hit < 100
    end
    # 命中的情况下
    if hit_result == true
      # 威力 0 以外的物理攻击的情况下
      if skill.power != 0 and skill.atk_f > 0
        # 状态冲击解除
        remove_states_shock
        # 设置有效标志
        effective = true
      end
      # HP 的伤害减法运算
      last_hp = self.hp
      self.hp -= self.damage
      effective |= self.hp != last_hp
      # 状态变化
      @state_changed = false
      effective |= states_plus(skill.plus_state_set)
      effective |= states_minus(skill.minus_state_set)
      # 威力为 0 的场合
      if skill.power == 0
        # 伤害设置为空的字串
        self.damage = ""
        # 状态没有变化的情况下
        unless @state_changed
          # 伤害设置为 "Miss"
          self.damage = "Miss"
        end
      end
    # Miss 的情况下
    else
      # 伤害设置为 "Miss"
      self.damage = "Miss"
    end
    # 不在战斗中的情况下
    unless $game_temp.in_battle
      # 伤害设置为 nil
      self.damage = nil
    end
    # 过程结束
    return effective
  end
end
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  alias add_update_phase4_step4_xdrs update_phase4_step4
  def update_phase4_step4
    if @active_battler.is_a?(Game_Actor) and
     @active_battler.current_action.kind == 1
      for target in @target_battlers
        if target.damage != "Miss"
          @active_battler.skill_proficiency[@skill.id] += P_PLUS
          break
        end
      end
    end
    add_update_phase4_step4_xdrs
  end
end
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
5
 楼主| 发表于 2021-8-14 15:01:13 | 只看该作者
和下面25行错了
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33163
在线时间
10488 小时
注册时间
2009-3-15
帖子
4756
6
发表于 2021-8-14 15:29:40 | 只看该作者

发脚本用代码标签..直接发不好看行数..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
7
 楼主| 发表于 2021-8-14 22:02:24 | 只看该作者
soulsaga 发表于 2021-8-14 15:29
发脚本用代码标签..直接发不好看行数..

    add_setup_xdrs(actor_id)
  end

就是这里
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33163
在线时间
10488 小时
注册时间
2009-3-15
帖子
4756
8
发表于 2021-8-14 22:17:02 | 只看该作者
萌萌乖喵兔兔萌 发表于 2021-8-14 22:02
add_setup_xdrs(actor_id)
  end

两个脚本的别名重名了..不知有没问题?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
129
在线时间
16 小时
注册时间
2021-8-10
帖子
8
9
 楼主| 发表于 2021-8-14 22:33:38 | 只看该作者
soulsaga 发表于 2021-8-14 22:17
两个脚本的别名重名了..不知有没问题?

不知道 是不是技能升级了自动战斗不识别了
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-23 20:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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