Project1

标题: 多秒技能 [打印本页]

作者: qq524780013    时间: 2015-6-28 00:26
标题: 多秒技能
求多秒技能的脚本
作者: 邪月长啸    时间: 2015-6-29 12:39
  1. # ▽△▽ XRXS.付加属性名称判定 ▽△▽  built 091221
  2. # by 桜雅 在土

  3. #==============================================================================
  4. # --- XRXS. 付加属性名称判定モジュール ---
  5. #==============================================================================
  6. module XRXS
  7.   #--------------------------------------------------------------------------
  8.   # ○ 配列が指定名の属性を持つか判定
  9.   #--------------------------------------------------------------------------
  10.   def XRXS.element_check(set, element_name)
  11.     returnar = [false, 0, 0, []] # 存在したか?, 固定値の合計、%値の合計
  12.     return returnar if !set.is_a?(Array) or set.size == 0 or element_name == ""
  13.     for i in set
  14.       if $data_system.elements[i] =~ /^#{element_name}([+-]?[0-9]+)?(%)?/
  15.         returnar[0] = true
  16.         if $2 == nil
  17.           returnar[1] += $1.to_i
  18.           returnar[3].push($1.to_i)
  19.         else
  20.           returnar[2] += $1.to_i
  21.         end
  22.       end
  23.     end
  24.     return returnar
  25.   end
  26.   def XRXS.element_include?(set, element_name)
  27.     return element_check(set, element_name)[0]
  28.   end
  29.   def XRXS.element_amount(set, element_name)
  30.     return element_check(set, element_name)[1]
  31.   end
  32.   def XRXS.element_percent(set, element_name)
  33.     return element_check(set, element_name)[2]
  34.   end
  35.   def XRXS.element_numbers(set, element_name)
  36.     return element_check(set, element_name)[3]
  37.   end
  38. end
复制代码
  1. # ▽△▽ XRXS. 装備属性取得機構 ▽△▽ built 221114
  2. # by 桜雅 在土

  3. #==============================================================================
  4. # --- XRXS. 装備属性取得機構 ---
  5. #==============================================================================
  6. class Game_Battler
  7.   #--------------------------------------------------------------------------
  8.   # ○ スキルの属性取得
  9.   #--------------------------------------------------------------------------
  10.   def skill_element_set(skill)
  11.     return skill.nil? ? [] : skill.element_set
  12.   end
  13.   #--------------------------------------------------------------------------
  14.   # ○ 全装備の属性取得
  15.   #--------------------------------------------------------------------------
  16.   def equip_element_set
  17.     return self.element_set + self.guard_element_set
  18.   end
  19.   #--------------------------------------------------------------------------
  20.   # ○ 全防具の属性取得
  21.   #--------------------------------------------------------------------------
  22.   def guard_element_set
  23.     return []
  24.   end
  25. end
  26. class Game_Actor < Game_Battler
  27.   def guard_element_set
  28.     set = []
  29.     for id in self.armor_ids
  30.       next if id.nil?
  31.       armor = $data_armors[id]
  32.       set += (armor != nil ? armor.guard_element_set : [])
  33.     end
  34.     return set
  35.   end
  36.   #--------------------------------------------------------------------------
  37.   # ○ 武器 ID配列
  38.   #--------------------------------------------------------------------------
  39.   def weapon_ids
  40.     @weapon_ids = [] if @weapon_ids == nil
  41.     @weapon_ids[0] = @weapon_id
  42.     return @weapon_ids
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ○ 防具 ID配列
  46.   #--------------------------------------------------------------------------
  47.   def armor_ids
  48.     @armor_ids = [] if @armor_ids == nil
  49.     @armor_ids[0] = @armor1_id
  50.     @armor_ids[1] = @armor2_id
  51.     @armor_ids[2] = @armor3_id
  52.     @armor_ids[3] = @armor4_id
  53.     return @armor_ids
  54.   end
  55.   #--------------------------------------------------------------------------
  56.   # ○ 装備配列の取得
  57.   #--------------------------------------------------------------------------
  58.   def equipments
  59.     equipments = []
  60.     self.weapon_ids.each {|id| equipments.push($data_weapons[id])}
  61.     self.armor_ids.each {|id| equipments.push($data_armors[id])}
  62.     return equipments
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # ○ 装備中?
  66.   #--------------------------------------------------------------------------
  67.   def equiping?(item)
  68.     case item
  69.     when RPG::Weapon
  70.       return self.weapon_ids.include?(item.id)
  71.     when RPG::Armor
  72.       return self.armor_ids.include?(item.id)
  73.     else
  74.       return false
  75.     end   
  76.   end
  77. end
复制代码
  1. # ▼▲▼ XRXS38. 属性修正计算数限制 ▼▲▼ built 081012
  2. # by 桜雅 在土 (原作)
  3. #    Tetra-Z   (強化)
  4. #==============================================================================
  5. # 简介:此脚本会将“系统默认的属性修正”和“战斗特殊效果属性”分开计算;
  6. #       插入此脚本后,“战斗特殊效果属性”将“不计算属性有效度”。
  7. #==============================================================================
  8. # □ カスタマイズポイント
  9. #==============================================================================
  10. module XRXS38
  11.   # 属性的限制数量
  12.   ELEMENTS_NUMBER_LIMIT = 16
  13.   # 属性修正的计算方法
  14.   #        0 : 最大(默认的计算方法)
  15.   #        1 : 乘法
  16.   #        2 : 平均
  17.   #        3 : 最小
  18.   ELEMENT_CORRECT_METHOD = 1
  19. end
  20. #==============================================================================
  21. # ■ Game_Battler
  22. #==============================================================================
  23. class Game_Battler
  24. #--------------------------------------------------------------------------
  25. # ● 属性修正的计算 + 倍率计算公式
  26. #--------------------------------------------------------------------------
  27.   alias xrxs38_elements_correct elements_correct
  28.   def elements_correct(element_set)
  29.     elements = element_set.dup
  30.     # 属性数量的限制
  31.     for element_id in element_set
  32.       if element_id >XRXS38:: ELEMENTS_NUMBER_LIMIT
  33.         elements.delete(element_id)
  34.       end
  35.     end
  36.     #无属性的场合返回100
  37.     return 100 if elements.size == 0
  38.     #
  39.     case XRXS38::ELEMENT_CORRECT_METHOD
  40.     when 0 # 最大
  41.       return xrxs38_elements_correct(elements)
  42.     when 1 # 乘法
  43.       result = 100.0
  44.       minus_enable = false
  45.       for i in elements
  46.         n = self.element_rate(i)
  47.         minus_enable |= (n < 0)
  48.         result *= n / 100.0
  49.       end
  50.       result = -1 * result.abs if minus_enable
  51.       return result.to_i
  52.     when 2 # 平均
  53.       rates = []
  54.       result = 0
  55.       for i in elements
  56.         rates.push(self.element_rate(i))
  57.       end
  58.       for rate in rates
  59.         result += rate
  60.       end
  61.       return result / rates.size
  62.     when 3 # 最小
  63.       for i in elements
  64.         n = self.element_rate(i)
  65.         result = n if result.nil? or result > n
  66.       end
  67.       return result
  68.     end
  69.   end  
  70. end
复制代码
  1. #==============================================================================
  2. #[仿大话梦幻]多体攻击(俗称秒2~秒7,非全体攻击)Ver0.03b
  3. #
  4. #by SixRice = 66fan
  5. #==============================================================================
  6. #适用战斗系统:默认回合制,CP半即时;RTAB不适用
  7. #
  8. #很简单的脚本,不推荐作为外挂脚本来用。希望大家能看懂之后添加近自己的游戏中去。
  9. #
  10. #重定义部分:set_target_battlers,其余为新定义。
  11. #
  12. #上面三个XRXS的脚本不要删除,请尊重别人的版权。
  13. #
  14. #Ver0.03根据玩家的建议,追加范围变成按照对象的速度排序。
  15. #
  16. #Ver0.02新增随机范围
  17. #       修正0.01中,如果什么范围都不选,会变成全体攻击的BUG
  18. #
  19. #==============================================================================
  20. # 使用说明:
  21. #1,单体目标的情况下,以下秒几的效果为追加范围
  22. #2,全体目标的情况下,以下秒几的效果为固定范围
  23. #3,如果附加了“随机”属性,
  24. #   单体攻击追加范围变成 0 到 X,
  25. #   全体攻击固定范围变成 1 到 X,
  26. #   举例:单体攻击,追加范围“秒7”,“随机”,实际范围是 1 +(0 ~ 7)
  27. #         全体攻击,固定范围“秒8”,“随机”,实际范围是 1 ~ 8
  28. #
  29. # 如有其他特殊要求,请看懂脚本自行设置。
  30. #==============================================================================
  31. module SXR
  32. #==============================================================================
  33. #属性名(同时存在的话,取最大值;同时包括多体范围和随机范围的话,取随机范围。)
  34. #==============================================================================
  35. ADD_TARGET2 = "秒2"#1体目标,追加1体序列
  36. ADD_TARGET3 = "秒3"#1体目标,追加2体序列
  37. ADD_TARGET4 = "秒4"#1体目标,追加3体序列
  38. ADD_TARGET5 = "秒5"#1体目标,追加4体序列
  39. ADD_TARGET6 = "秒6"#1体目标,追加5体序列
  40. ADD_TARGET7 = "秒7"#1体目标,追加6体序列
  41. ADD_TARGET8 = "秒8"#1体目标,追加7体序列
  42. ARA_TARGET = "随机"#单选无效,配合上面才能产生效果,将追加改为随机追加
  43. end
  44. #==============================================================================
  45. # ■ Game_BattleAction
  46. #==============================================================================
  47. class Game_BattleAction
  48. attr_accessor :add_target
  49. attr_accessor :ara_target
  50. #------------------------------------------------------------------------------
  51. # ○ clear
  52. #------------------------------------------------------------------------------
  53.   alias sxr_clear clear
  54.   def clear
  55.     sxr_clear
  56.     clear_sxr_add_target
  57.   end
  58. #------------------------------------------------------------------------------
  59. # ○ 特殊效果clear
  60. #------------------------------------------------------------------------------
  61. def clear_sxr_add_target
  62.     self.add_target = 0
  63.     self.ara_target = 0
  64.   end  
  65. #------------------------------------------------------------------------------
  66. # ○ 无效化特殊效果
  67. #------------------------------------------------------------------------------
  68.   def nillize_sxr_add_target
  69.     self.add_target = nil
  70.     self.ara_target = nil
  71.   end
  72. end   
  73. #==============================================================================
  74. # ■ Game_Battler
  75. #==============================================================================
  76. class Game_Battler
  77. #------------------------------------------------------------------------------
  78. # ○追加目标范围设定
  79. #------------------------------------------------------------------------------
  80. def set_sxr_add_target(set)
  81. # 追加/固定目标范围强制值
  82. self.current_action.add_target =
  83. XRXS.element_include?(set, SXR::ADD_TARGET8) ? 8 :
  84. XRXS.element_include?(set, SXR::ADD_TARGET7) ? 7 :
  85. XRXS.element_include?(set, SXR::ADD_TARGET6) ? 6 :
  86. XRXS.element_include?(set, SXR::ADD_TARGET5) ? 5 :
  87. XRXS.element_include?(set, SXR::ADD_TARGET4) ? 4 :
  88. XRXS.element_include?(set, SXR::ADD_TARGET3) ? 3 :
  89. XRXS.element_include?(set, SXR::ADD_TARGET2) ? 2 :
  90. 0
  91. # 是否随机目标范围
  92. self.current_action.ara_target =
  93. XRXS.element_include?(set, SXR::ARA_TARGET) ? 1 :
  94. 0
  95. end
  96. end
  97. #==============================================================================
  98. # ■ Scene_Battle
  99. #==============================================================================
  100. class Scene_Battle
  101. #--------------------------------------------------------------------------
  102. # ● 主处理
  103. #--------------------------------------------------------------------------
  104.   alias sxr_main main
  105.   def main
  106.     # recall
  107.     sxr_main
  108.     # 清空角色的特殊效果设置
  109.     for actor in $game_party.actors
  110.       actor.current_action.clear_sxr_add_target
  111.       actor.current_action.nillize_sxr_add_target
  112.     end
  113.   end  
  114.   #--------------------------------------------------------------------------
  115.   # ● 设置物品或特技对像方的战斗者
  116.   #     scope : 特技或者是物品的范围
  117.   #--------------------------------------------------------------------------
  118.   def set_target_battlers(scope)
  119.     # 行动方的战斗者是敌人的情况下
  120.     if @active_battler.is_a?(Game_Enemy)
  121.       # 效果范围分支
  122.       case scope
  123.       when 1  # 敌单体
  124.       
  125.         for actor in $game_party.actors
  126.           if actor.exist?
  127.             @target_battlers.push(actor)
  128.           end
  129.         end
  130. index = @active_battler.current_action.target_index
  131. @target_battlers.push($game_party.smooth_target_actor(index))        
  132. @target_battlers.delete($game_party.smooth_target_actor(index))
  133. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)
  134. @target_battlers = @target_battlers[0, 0] if @active_battler.current_action.add_target == 0
  135. @target_battlers = @target_battlers[0, 1] if @active_battler.current_action.add_target == 2
  136. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 3
  137. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 4
  138. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 5
  139. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 6
  140. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 7
  141. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 8
  142. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2
  143. @target_battlers.push($game_party.smooth_target_actor(index))
  144.         
  145.       when 2  # 敌全体
  146.         for actor in $game_party.actors
  147.           if actor.exist?
  148.             @target_battlers.push(actor)
  149. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)            
  150. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  151. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  152. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  153. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  154. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  155. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  156. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  157. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  158.           end
  159.         end
  160.       when 3  # 我方单体
  161.       
  162.           for enemy in $game_troop.enemies
  163.           if enemy.exist?
  164.             @target_battlers.push(enemy)
  165.           end
  166.         end
  167. index = @active_battler.current_action.target_index
  168. @target_battlers.push($game_troop.smooth_target_enemy(index))        
  169. @target_battlers.delete($game_troop.smooth_target_enemy(index))
  170. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)
  171. @target_battlers = @target_battlers[0, 0] if @active_battler.current_action.add_target == 0
  172. @target_battlers = @target_battlers[0, 1] if @active_battler.current_action.add_target == 2
  173. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 3
  174. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 4
  175. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 5
  176. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 6
  177. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 7
  178. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 8
  179. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2
  180. @target_battlers.push($game_troop.smooth_target_enemy(index))

  181.       when 4  # 我方全体
  182.         for enemy in $game_troop.enemies
  183.           if enemy.exist?
  184.             @target_battlers.push(enemy)
  185. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)            
  186. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  187. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  188. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  189. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  190. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  191. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  192. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  193. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  194.           end
  195.         end
  196.       when 5  # 我方单体 (HP 0)
  197.         index = @active_battler.current_action.target_index
  198.         enemy = $game_troop.enemies[index]
  199.         if enemy != nil and enemy.hp0?
  200.           @target_battlers.push(enemy)
  201.         end
  202.       when 6  # 我方全体 (HP 0)
  203.         for enemy in $game_troop.enemies
  204.           if enemy != nil and enemy.hp0?
  205.             @target_battlers.push(enemy)
  206. @target_battlers.sort! {|a,b| b.agi - a.agi }  #(0.03)         
  207. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  208. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  209. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  210. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  211. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  212. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  213. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  214. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  215.           end
  216.         end
  217.       when 7  # 使用者
  218.         @target_battlers.push(@active_battler)
  219.       end
  220.     end
  221.     # 行动方的战斗者是角色的情况下
  222.     if @active_battler.is_a?(Game_Actor)      
  223. @active_battler.set_sxr_add_target(@active_battler.skill_element_set(@skill))
  224.       # 效果范围分支
  225.       case scope
  226.       when 1  # 敌单体
  227.         
  228.           for enemy in $game_troop.enemies
  229.           if enemy.exist?
  230.             @target_battlers.push(enemy)
  231.           end
  232.         end
  233. index = @active_battler.current_action.target_index
  234. @target_battlers.push($game_troop.smooth_target_enemy(index))        
  235. @target_battlers.delete($game_troop.smooth_target_enemy(index))
  236. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)
  237. @target_battlers = @target_battlers[0, 0] if @active_battler.current_action.add_target == 0
  238. @target_battlers = @target_battlers[0, 1] if @active_battler.current_action.add_target == 2
  239. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 3
  240. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 4
  241. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 5
  242. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 6
  243. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 7
  244. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 8
  245. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2
  246. @target_battlers.push($game_troop.smooth_target_enemy(index))

  247.       when 2  # 敌全体
  248.         for enemy in $game_troop.enemies
  249.           if enemy.exist?
  250.             @target_battlers.push(enemy)
  251. @target_battlers.sort! {|a,b| b.agi - a.agi } #(0.03)           
  252. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  253. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  254. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  255. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  256. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  257. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  258. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  259. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  260.           end
  261.         end
  262.       when 3  # 我方单体
  263.       
  264.         for actor in $game_party.actors
  265.           if actor.exist?
  266.             @target_battlers.push(actor)
  267.           end
  268.         end
  269. index = @active_battler.current_action.target_index
  270. @target_battlers.push($game_party.smooth_target_actor(index))        
  271. @target_battlers.delete($game_party.smooth_target_actor(index))
  272. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)
  273. @target_battlers = @target_battlers[0, 0] if @active_battler.current_action.add_target == 0
  274. @target_battlers = @target_battlers[0, 1] if @active_battler.current_action.add_target == 2
  275. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 3
  276. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 4
  277. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 5
  278. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 6
  279. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 7
  280. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 8
  281. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2
  282. @target_battlers.push($game_party.smooth_target_actor(index))

  283.       when 4  # 我方全体
  284.         for actor in $game_party.actors
  285.           if actor.exist?
  286.             @target_battlers.push(actor)
  287. @target_battlers.sort! {|a,b| b.agi - a.agi }#(0.03)            
  288. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  289. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  290. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  291. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  292. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  293. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  294. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  295. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  296.           end
  297.         end
  298.       when 5  # 我方单体 (HP 0)
  299.         index = @active_battler.current_action.target_index
  300.         actor = $game_party.actors[index]
  301.         if actor != nil and actor.hp0?
  302.           @target_battlers.push(actor)
  303.         end
  304.       when 6  # 我方全体 (HP 0)
  305.         for actor in $game_party.actors
  306.           if actor != nil and actor.hp0?
  307.             @target_battlers.push(actor)
  308. @target_battlers.sort! {|a,b| b.agi - a.agi }  #(0.03)         
  309. @target_battlers = @target_battlers[0, 2] if @active_battler.current_action.add_target == 2
  310. @target_battlers = @target_battlers[0, 3] if @active_battler.current_action.add_target == 3
  311. @target_battlers = @target_battlers[0, 4] if @active_battler.current_action.add_target == 4
  312. @target_battlers = @target_battlers[0, 5] if @active_battler.current_action.add_target == 5
  313. @target_battlers = @target_battlers[0, 6] if @active_battler.current_action.add_target == 6
  314. @target_battlers = @target_battlers[0, 7] if @active_battler.current_action.add_target == 7
  315. @target_battlers = @target_battlers[0, 8] if @active_battler.current_action.add_target == 8
  316. @target_battlers = @target_battlers[0, rand(@active_battler.current_action.add_target)+1] if @active_battler.current_action.ara_target == 1 and @active_battler.current_action.add_target >= 2            
  317.           end
  318.         end
  319.       when 7  # 使用者
  320.         @target_battlers.push(@active_battler)
  321.       end
  322.     end
  323.   end
  324. #--------------------------------------------------------------------------
  325. # ● 生成特技行动结果
  326. #--------------------------------------------------------------------------
  327.   alias sxr_make_skill_action_result make_skill_action_result
  328.     def make_skill_action_result
  329.     # 获取特技
  330.     @skill = $data_skills[@active_battler.current_action.skill_id]
  331.     # 获取行动者特技附加的战斗特效
  332.     @active_battler.set_sxr_add_target(@active_battler.skill_element_set(@skill))
  333.     # recall
  334.    sxr_make_skill_action_result
  335.   end
  336. end
复制代码
感觉有点多、、、、
4个要一起用才可以~
作者: 白鬼    时间: 2015-7-1 23:44
本帖最后由 白鬼 于 2015-7-1 23:45 编辑

楼上手快。有一个简化的版本,一个独立脚本。在脚本中设置,不用占用数据库了
楼主可以尝试一下
多秒技能脚本





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