查看: 5132|回复: 16

[已经解决] 如何让指定武器攻击敌全体且不与横版冲突?

[复制链接]

送快递的水表员

梦石
10
星屑
5264
在线时间
3305 小时
注册时间
2012-6-27
回帖
7028

开拓者贵宾

发表于 2013-1-27 16:06:16 | 显示全部楼层 |阅读模式
悬赏2星屑已解决
本帖最后由 Password 于 2013-1-30 18:21 编辑

想设置一个类似霰弹枪一样的武器,普攻即可攻击敌全体,但是都知道,数据库中并未此项,
且本人使用SBS3.4d+ATB1.2c 的横版战斗,翻遍了横版的设置似乎并未找到这样的设置。

求教如何让指定武器攻击敌全体且不与横版冲突。

横版链接:http://rpg.blue/forum.php?mod=viewthread&tid=160512

最佳答案

查看完整内容

目前的确是有这种成品脚本存在的,之前我有用过,不过后来我丢掉了,然后找不到了。不过主站里的《六道·体验版》好像保留有这个脚本的,不嫌麻烦你去下载看看吧。果真有的话,2V就收回去吧。 #======================================================================== 你的运气是多好了,我突然想起之前保留的一个Scripts-副本 [pre lang="ruby" line="1"]#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ ...

点评

2333  发表于 2013-1-27 18:18
梦石
0
星屑
97
在线时间
2462 小时
注册时间
2011-12-18
回帖
1419
发表于 2013-1-27 16:06:17 | 显示全部楼层
本帖最后由 a364774426 于 2013-1-27 17:12 编辑

目前的确是有这种成品脚本存在的,之前我有用过,不过后来我丢掉了,然后找不到了。不过主站里的《六道·体验版》好像保留有这个脚本的,不嫌麻烦你去下载看看吧。果真有的话,2V就收回去吧。
#========================================================================
你的运气是多好了,我突然想起之前保留的一个Scripts-副本
  1. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2. #_/    ◆ 200x/XP 機能再現 - KGC_ReproduceFunctions ◆ VX ◆
  3. #_/    ◇ Last update : 2009/01/18 ◇
  4. #_/----------------------------------------------------------------------------
  5. #_/  200x/XP の機能を再現します。
  6. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  7. #==============================================================================
  8. # ★ カスタマイズ項目 - Customize BEGIN ★
  9. #==============================================================================

  10. module KGC
  11. module ReproduceFunctions
  12.   # ◆ MP 消費武器使用時、消費した MP を表示する
  13.   SHOW_WEAPON_MP_COST_ON_ATTACK = true

  14.   # ◆ 「武器属性」と見なす属性の範囲
  15.   #  この属性を持つスキルは、同じ属性を持つ武器を装備していないと
  16.   #  使用できなくなります。
  17.   #   ※素手は 1(格闘)扱いです。
  18.   #  範囲オブジェクト(1..6 など)または整数の配列で指定します。
  19.   WEAPON_ELEMENTS = [21..22]
  20.   # [1..6] は [1, 2, 3, 4, 5, 6] と書いてもOK。
  21.   # [1..4, 5, 6] のように、両方が混ざってもOK。
  22. end
  23. end

  24. #==============================================================================
  25. # ☆ カスタマイズ項目終了 - Customize END ☆
  26. #==============================================================================

  27. $imported = {} if $imported == nil
  28. $imported["ReproduceFunctions"] = true

  29. module KGC::ReproduceFunctions
  30.   #--------------------------------------------------------------------------
  31.   # ○ 武器属性を整数配列に変換
  32.   #--------------------------------------------------------------------------
  33.   def self.create_weapon_element_list
  34.     result = []
  35.     WEAPON_ELEMENTS.each { |e|
  36.       if e.is_a?(Range)
  37.         result |= e.to_a
  38.       elsif e.is_a?(Integer)
  39.         result |= [e]
  40.       end
  41.     }
  42.     return result.sort
  43.   end

  44.   # 武器属性配列
  45.   WEAPON_ELEMENT_ID_LIST = create_weapon_element_list

  46.   module Regexp
  47.     module BaseItem
  48.       # オートステート
  49.       AUTO_STATE = /<(?:AUTO_STATE|オートステート)\s*(\d+(?:\s*,\s*\d+)*)>/i
  50.       # 全体攻撃
  51.       WHOLE_ATTACK = /<(?:WHOLE_ATTACK|全体攻撃)>/i
  52.       # 回避率無視
  53.       IGNORE_EVA = /<(?:IGNORE_EVA|回避率?無視)>/i
  54.       # 消費MP
  55.       MP_COST = /<(?:MP_COST|消費MP)\s*([\-]?\d+)>/i
  56.       # クリティカル率
  57.       CRITICAL = /<(?:CRITICAL|クリティカル率)\s*(\-?\d+)>/i
  58.     end

  59.     module Item
  60.       # アイテム使用回数
  61.       MULTI_USABLE = /<(?:MULTI_USABLE|使用回数)\s*(\d+)>/i
  62.       # スキル発動アイテム
  63.       EXEC_SKILL = /<(?:EXEC_SKILL|スキル発動)\s*(\d+)>/i
  64.     end

  65.     module Enemy
  66.       # 半透明
  67.       TRANSLUCENT = /<(?:TRANSLUCENT|半透明)>/i
  68.       # クリティカル率
  69.       CRITICAL = /<(?:CRITICAL|クリティカル率)\s*(\d+)>/i
  70.     end

  71.     module State
  72.       # パラメータ名
  73.       PARAMETER_NAME = {
  74.         "maxhp"=>"MAXHP_RATE|最大HP",
  75.         "maxmp"=>"MAXMP_RATE|最大MP"
  76.       }
  77.       # 打撃関係度で封印 (日本語)
  78.       SEAL_ATK_F_JP = /<打撃関係度\s*(\d+)\s*以上封印>/
  79.       # 打撃関係度で封印 (英語)
  80.       SEAL_ATK_F_EN = /<SEAL_ATK_F\s*(\d+)>/i
  81.       # 精神関係度で封印 (日本語)
  82.       SEAL_SPI_F_JP = /<精神関係度\s*(\d+)\s*以上封印>/
  83.       # 精神関係度で封印 (英語)
  84.       SEAL_SPI_F_EN = /<SEAL_SPI_F\s*(\d+)>/i
  85.       # 付加ステート
  86.       PLUS_STATE = /<(?:PLUS_STATE|付加ステート)\s*(\d+(?:\s*,\s*\d+)*)>/i
  87.     end
  88.   end
  89. end

  90. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  91. #==============================================================================
  92. # ■ RPG::BaseItem
  93. #==============================================================================

  94. class RPG::BaseItem
  95.   #--------------------------------------------------------------------------
  96.   # ○ 再現機能のキャッシュ生成
  97.   #--------------------------------------------------------------------------
  98.   def create_reproduce_functions_cache
  99.     @__whole_attack = false
  100.     @__ignore_eva = false
  101.     @__mp_cost = 0
  102.     @__cri = 0

  103.     self.note.each_line { |line|
  104.       case line
  105.       when KGC::ReproduceFunctions::Regexp::BaseItem::WHOLE_ATTACK
  106.         # 全体攻撃
  107.         @__whole_attack = true
  108.       when KGC::ReproduceFunctions::Regexp::BaseItem::IGNORE_EVA
  109.         # 回避率無視
  110.         @__ignore_eva = true
  111.       when KGC::ReproduceFunctions::Regexp::BaseItem::MP_COST
  112.         # 通常攻撃消費 MP
  113.         @__mp_cost += $1.to_i
  114.       when KGC::ReproduceFunctions::Regexp::BaseItem::CRITICAL
  115.         # クリティカル修正
  116.         @__cri += $1.to_i
  117.       end
  118.     }

  119.     create_auto_state_cache
  120.   end
  121.   #--------------------------------------------------------------------------
  122.   # ○ オートステートのキャッシュ生成
  123.   #--------------------------------------------------------------------------
  124.   def create_auto_state_cache
  125.     # ID のキャッシュ生成
  126.     @__auto_state_ids = []
  127.     @__auto_state_ids_battle = []
  128.     self.note.each_line { |line|
  129.       next unless line =~ KGC::ReproduceFunctions::Regexp::BaseItem::AUTO_STATE
  130.       $1.scan(/\d+/).each { |num|
  131.         if (state = $data_states[num.to_i]) != nil
  132.           @__auto_state_ids_battle << state.id
  133.           unless state.battle_only
  134.             @__auto_state_ids << state.id
  135.           end
  136.         end
  137.       }
  138.     }

  139.     # オブジェクトのキャッシュ作成
  140.     @__auto_states = []
  141.     @__auto_state_ids.each { |i|
  142.       @__auto_states << $data_states[i]
  143.     }
  144.     @__auto_states_battle = []
  145.     @__auto_state_ids_battle.each { |i|
  146.       @__auto_states_battle << $data_states[i]
  147.     }
  148.   end
  149.   #--------------------------------------------------------------------------
  150.   # ○ 全体攻撃判定
  151.   #--------------------------------------------------------------------------
  152.   def whole_attack
  153.     create_reproduce_functions_cache if @__whole_attack == nil
  154.     return @__whole_attack
  155.   end
  156.   #--------------------------------------------------------------------------
  157.   # ○ 回避無視判定
  158.   #--------------------------------------------------------------------------
  159.   def ignore_eva
  160.     create_reproduce_functions_cache if @__ignore_eva == nil
  161.     return @__ignore_eva
  162.   end
  163.   #--------------------------------------------------------------------------
  164.   # ○ 通常攻撃消費 MP
  165.   #--------------------------------------------------------------------------
  166.   def mp_cost
  167.     create_reproduce_functions_cache if @__mp_cost == nil
  168.     return @__mp_cost
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ○ クリティカル修正
  172.   #--------------------------------------------------------------------------
  173.   def cri
  174.     create_reproduce_functions_cache if @__cri == nil
  175.     return @__cri
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # ○ オートステート ID
  179.   #--------------------------------------------------------------------------
  180.   def auto_state_ids
  181.     return ($game_temp.in_battle ? auto_state_ids_battle : auto_state_ids_always)
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ○ オートステート ID (常時)
  185.   #--------------------------------------------------------------------------
  186.   def auto_state_ids_always
  187.     create_reproduce_functions_cache if @__auto_state_ids == nil
  188.     return @__auto_state_ids
  189.   end
  190.   #--------------------------------------------------------------------------
  191.   # ○ オートステート ID (戦闘時)
  192.   #--------------------------------------------------------------------------
  193.   def auto_state_ids_battle
  194.     create_reproduce_functions_cache if @__auto_state_ids_battle == nil
  195.     return @__auto_state_ids_battle
  196.   end
  197.   #--------------------------------------------------------------------------
  198.   # ○ オートステート
  199.   #--------------------------------------------------------------------------
  200.   def auto_states
  201.     return ($game_temp.in_battle ? auto_states_battle : auto_states_always)
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ○ オートステート (常時)
  205.   #--------------------------------------------------------------------------
  206.   def auto_states_always
  207.     create_reproduce_functions_cache if @__auto_states == nil
  208.     return @__auto_states
  209.   end
  210.   #--------------------------------------------------------------------------
  211.   # ○ オートステート (戦闘時)
  212.   #--------------------------------------------------------------------------
  213.   def auto_states_battle
  214.     create_reproduce_functions_cache if @__auto_states_battle == nil
  215.     return @__auto_states_battle
  216.   end
  217. end

  218. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  219. #==============================================================================
  220. # ■ RPG::Item
  221. #==============================================================================

  222. class RPG::Item < RPG::UsableItem
  223.   #--------------------------------------------------------------------------
  224.   # ○ 再現機能のキャッシュ生成
  225.   #--------------------------------------------------------------------------
  226.   def create_reproduce_functions_cache
  227.     super
  228.     @__usable_count = 1
  229.     @__skill_id = 0

  230.     self.note.each_line { |line|
  231.       case line
  232.       when KGC::ReproduceFunctions::Regexp::Item::MULTI_USABLE
  233.         # 使用可能回数
  234.         @__usable_count = $1.to_i
  235.       when KGC::ReproduceFunctions::Regexp::Item::EXEC_SKILL
  236.         # 発動スキル ID
  237.         @__skill_id = $1.to_i
  238.       end
  239.     }
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● アニメーション ID
  243.   #--------------------------------------------------------------------------
  244.   def animation_id
  245.     if exec_skill?
  246.       return $data_skills[skill_id].animation_id
  247.     else
  248.       return @animation_id
  249.     end
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ○ 使用可能回数
  253.   #--------------------------------------------------------------------------
  254.   def usable_count
  255.     create_reproduce_functions_cache if @__usable_count == nil
  256.     return @__usable_count
  257.   end
  258.   #--------------------------------------------------------------------------
  259.   # ○ スキル発動判定
  260.   #--------------------------------------------------------------------------
  261.   def exec_skill?
  262.     return (skill_id > 0)
  263.   end
  264.   #--------------------------------------------------------------------------
  265.   # ○ 発動スキル ID
  266.   #--------------------------------------------------------------------------
  267.   def skill_id
  268.     create_reproduce_functions_cache if @__skill_id == nil
  269.     return @__skill_id
  270.   end
  271. end

  272. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  273. #==============================================================================
  274. # ■ RPG::Skill
  275. #==============================================================================

  276. class RPG::Skill < RPG::UsableItem
  277.   #--------------------------------------------------------------------------
  278.   # ○ 再現機能のキャッシュ生成
  279.   #--------------------------------------------------------------------------
  280.   def create_reproduce_functions_cache
  281.     super

  282.     @__weapon_element_set =
  283.       self.element_set & KGC::ReproduceFunctions::WEAPON_ELEMENT_ID_LIST
  284.   end
  285.   #--------------------------------------------------------------------------
  286.   # ○ 使用時に必要な武器属性を取得
  287.   #--------------------------------------------------------------------------
  288.   def weapon_element_set
  289.     create_reproduce_functions_cache if @__weapon_element_set == nil
  290.     return @__weapon_element_set
  291.   end
  292. end

  293. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  294. #==============================================================================
  295. # ■ RPG::Enemy
  296. #==============================================================================

  297. class RPG::Enemy
  298.   #--------------------------------------------------------------------------
  299.   # ○ 再現機能のキャッシュ生成
  300.   #--------------------------------------------------------------------------
  301.   def create_reproduce_functions_cache
  302.     @__translucent = false
  303.     @__cri = 0

  304.     self.note.each_line { |line|
  305.       case line
  306.       when KGC::ReproduceFunctions::Regexp::Enemy::TRANSLUCENT
  307.         # 半透明
  308.         @__translucent = true
  309.       when KGC::ReproduceFunctions::Regexp::Enemy::CRITICAL
  310.         # クリティカル修正
  311.         @__cri += $1.to_i
  312.       end
  313.     }
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ○ 半透明
  317.   #--------------------------------------------------------------------------
  318.   def translucent?
  319.     create_reproduce_functions_cache if @__translucent == nil
  320.     return @__translucent
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ○ クリティカル修正
  324.   #--------------------------------------------------------------------------
  325.   def cri
  326.     create_reproduce_functions_cache if @__cri == nil
  327.     return @__cri
  328.   end
  329. end

  330. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  331. #==============================================================================
  332. # ■ RPG::State
  333. #==============================================================================

  334. class RPG::State
  335.   #--------------------------------------------------------------------------
  336.   # ○ 再現機能のキャッシュ生成
  337.   #--------------------------------------------------------------------------
  338.   def create_reproduce_functions_cache
  339.     @__seal_atk_f = 999
  340.     @__seal_spi_f = 999
  341.     @__plus_state_set = []

  342.     self.note.each_line { |line|
  343.       case line
  344.       when KGC::ReproduceFunctions::Regexp::State::SEAL_ATK_F_JP,
  345.            KGC::ReproduceFunctions::Regexp::State::SEAL_ATK_F_EN
  346.         # 封印するスキルの打撃関係度
  347.         @__seal_atk_f = $1.to_i
  348.       when KGC::ReproduceFunctions::Regexp::State::SEAL_SPI_F_JP,
  349.            KGC::ReproduceFunctions::Regexp::State::SEAL_SPI_F_EN
  350.         # 封印するスキルの精神関係度
  351.         @__seal_spi_f = $1.to_i
  352.       when KGC::ReproduceFunctions::Regexp::State::PLUS_STATE
  353.         # 付加ステート
  354.         $1.scan(/\d+/).each { |num|
  355.           if (state = $data_states[num.to_i]) != nil
  356.             @__plus_state_set << state.id
  357.           end
  358.         }
  359.       end
  360.     }

  361.     create_parameter_rate_cache
  362.   end
  363.   #--------------------------------------------------------------------------
  364.   # ○ パラメータ修正値のキャッシュ生成
  365.   #--------------------------------------------------------------------------
  366.   def create_parameter_rate_cache
  367.     @__parameter_rate = {}
  368.     # 初期化
  369.     KGC::ReproduceFunctions::Regexp::State::PARAMETER_NAME.each_key { |k|
  370.       @__parameter_rate[k] = 100
  371.     }
  372.     # メモ反映
  373.     self.note.each_line { |line|
  374.       KGC::ReproduceFunctions::Regexp::State::PARAMETER_NAME.each { |k, v|
  375.         if line =~ /<(?:#{v})[ ]*(\d+)[%%]>/i
  376.           @__parameter_rate[k] = @__parameter_rate[k] * $1.to_i / 100
  377.           break
  378.         end
  379.       }
  380.     }
  381.   end
  382.   #--------------------------------------------------------------------------
  383.   # ○ MaxHP 修正
  384.   #--------------------------------------------------------------------------
  385.   def maxhp_rate
  386.     create_reproduce_functions_cache if @__parameter_rate == nil
  387.     return @__parameter_rate["maxhp"]
  388.   end
  389.   #--------------------------------------------------------------------------
  390.   # ○ MaxMP 修正
  391.   #--------------------------------------------------------------------------
  392.   def maxmp_rate
  393.     create_reproduce_functions_cache if @__parameter_rate == nil
  394.     return @__parameter_rate["maxmp"]
  395.   end
  396.   #--------------------------------------------------------------------------
  397.   # ○ 封印するスキルの打撃関係度
  398.   #--------------------------------------------------------------------------
  399.   def seal_atk_f
  400.     create_reproduce_functions_cache if @__seal_atk_f == nil
  401.     return @__seal_atk_f
  402.   end
  403.   #--------------------------------------------------------------------------
  404.   # ○ 封印するスキルの精神関係度
  405.   #--------------------------------------------------------------------------
  406.   def seal_spi_f
  407.     create_reproduce_functions_cache if @__seal_spi_f == nil
  408.     return @__seal_spi_f
  409.   end
  410.   #--------------------------------------------------------------------------
  411.   # ○ 付加ステート
  412.   #--------------------------------------------------------------------------
  413.   def plus_state_set
  414.     create_reproduce_functions_cache if @__plus_state_set == nil
  415.     return @__plus_state_set
  416.   end
  417. end

  418. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  419. #==============================================================================
  420. # ■ Game_Temp
  421. #==============================================================================

  422. class Game_Temp
  423.   #--------------------------------------------------------------------------
  424.   # ● 公開インスタンス変数
  425.   #--------------------------------------------------------------------------
  426.   attr_accessor :exec_skill_on_item       # アイテムによるスキル発動フラグ
  427.   #--------------------------------------------------------------------------
  428.   # ● オブジェクト初期化
  429.   #--------------------------------------------------------------------------
  430.   alias initialize_KGC_ReproduceFunctions initialize
  431.   def initialize
  432.     initialize_KGC_ReproduceFunctions

  433.     @exec_skill_on_item = false
  434.   end
  435. end

  436. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  437. #==============================================================================
  438. # ■ Game_Battler
  439. #==============================================================================

  440. class Game_Battler
  441.   #--------------------------------------------------------------------------
  442.   # ● 現在のステートをオブジェクトの配列で取得
  443.   #--------------------------------------------------------------------------
  444.   alias states_KGC_ReproduceFunctions states
  445.   def states
  446.     result = states_KGC_ReproduceFunctions + auto_states
  447.     result.sort! { |a, b| b.priority <=> a.priority }
  448.     return result
  449.   end
  450.   #--------------------------------------------------------------------------
  451.   # ● MaxHP の取得
  452.   #--------------------------------------------------------------------------
  453.   alias maxhp_KGC_ReproduceFunctions maxhp
  454.   def maxhp
  455.     n = maxhp_KGC_ReproduceFunctions
  456.     states.each { |state| n *= state.maxhp_rate / 100.0 }
  457.     return [[Integer(n), 1].max, maxhp_limit].min
  458.   end
  459.   #--------------------------------------------------------------------------
  460.   # ● MaxMP の取得
  461.   #--------------------------------------------------------------------------
  462.   alias maxmp_KGC_ReproduceFunctions maxmp
  463.   def maxmp
  464.     n = maxmp_KGC_ReproduceFunctions
  465.     states.each { |state| n *= state.maxmp_rate / 100.0 }
  466.     limit = (defined?(maxmp_limit) ? maxmp_limit : 9999)
  467.     return [[Integer(n), 0].max, limit].min
  468.   end
  469.   #--------------------------------------------------------------------------
  470.   # ● HP の取得
  471.   #--------------------------------------------------------------------------
  472.   alias hp_KGC_ReproduceFunctions_Battler hp
  473.   def hp
  474.     @hp = maxhp if @hp > maxhp
  475.     return hp_KGC_ReproduceFunctions_Battler
  476.   end
  477.   #--------------------------------------------------------------------------
  478.   # ● MP の取得
  479.   #--------------------------------------------------------------------------
  480.   alias mp_KGC_ReproduceFunctions_Battler mp
  481.   def mp
  482.     @mp = maxmp if @mp > maxmp
  483.     return mp_KGC_ReproduceFunctions_Battler
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ○ オートステートの ID を取得
  487.   #--------------------------------------------------------------------------
  488.   def auto_state_ids
  489.     return auto_states(true)
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # ○ オートステートの配列を取得
  493.   #     id_only : ID のみを取得
  494.   #--------------------------------------------------------------------------
  495.   def auto_states(id_only = false)
  496.     return []
  497.   end
  498.   #--------------------------------------------------------------------------
  499.   # ● ステートの検査
  500.   #     state_id : ステート ID
  501.   #    該当するステートが付加されていれば true を返す。
  502.   #--------------------------------------------------------------------------
  503.   alias state_KGC_ReproduceFunctions? state?
  504.   def state?(state_id)
  505.     return (state_KGC_ReproduceFunctions?(state_id) || auto_state?(state_id))
  506.   end
  507.   #--------------------------------------------------------------------------
  508.   # ● ステートの付加
  509.   #     state_id : ステート ID
  510.   #--------------------------------------------------------------------------
  511.   alias add_state_KGC_ReproduceFunctions add_state
  512.   def add_state(state_id)
  513.     last_states = @states.dup

  514.     add_state_KGC_ReproduceFunctions(state_id)

  515.     if (@states - last_states).include?(state_id)  # ステートが付加された場合
  516.       state = $data_states[state_id]
  517.       # [付加するステート] を適用
  518.       state.plus_state_set.each { |i|
  519.         add_state(i)
  520.       }
  521.     end
  522.   end
  523.   #--------------------------------------------------------------------------
  524.   # ○ オートステートの検査
  525.   #     state_id : ステート ID
  526.   #    該当するステートが付加されていれば true を返す。
  527.   #--------------------------------------------------------------------------
  528.   def auto_state?(state_id)
  529.     return auto_state_ids.include?(state_id)
  530.   end
  531.   #--------------------------------------------------------------------------
  532.   # ● ステートの解除
  533.   #     state_id : ステート ID
  534.   #--------------------------------------------------------------------------
  535.   alias remove_state_KGC_ReproduceFunctions remove_state
  536.   def remove_state(state_id)
  537.     if auto_state?(state_id)  # オートステートは解除しない
  538.       return
  539.     end

  540.     remove_state_KGC_ReproduceFunctions(state_id)
  541.   end
  542.   #--------------------------------------------------------------------------
  543.   # ○ 半透明化判定
  544.   #--------------------------------------------------------------------------
  545.   def translucent?
  546.     # エネミーの場合は Game_Enemy で再定義
  547.     return false
  548.   end
  549.   #--------------------------------------------------------------------------
  550.   # ○ 装備オプション [全体攻撃] の取得
  551.   #--------------------------------------------------------------------------
  552.   def whole_attack
  553.     return false
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ○ 装備オプション [回避無視] の取得
  557.   #--------------------------------------------------------------------------
  558.   def ignore_eva
  559.     return false
  560.   end
  561.   #--------------------------------------------------------------------------
  562.   # ○ MP ダメージ加算
  563.   #     value : 加算する値
  564.   #--------------------------------------------------------------------------
  565.   def add_mp_damage(value)
  566.     @mp_damage += value
  567.   end
  568.   #--------------------------------------------------------------------------
  569.   # ○ 通常攻撃の消費 MP 計算
  570.   #--------------------------------------------------------------------------
  571.   def calc_attack_mp_cost
  572.     return 0
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ● スキルの使用可能判定
  576.   #     skill : スキル
  577.   #--------------------------------------------------------------------------
  578.   alias skill_can_use_KGC_ReproduceFunctions? skill_can_use?
  579.   def skill_can_use?(skill)
  580.     return false unless skill.is_a?(RPG::Skill)
  581.     unless $imported["CooperationSkill"] && $game_temp.judging_cooperation_skill
  582.       return false if skill_seal?(skill)
  583.       return false unless skill_satisfied_weapon_element?(skill)
  584.     end

  585.     return skill_can_use_KGC_ReproduceFunctions?(skill)
  586.   end
  587.   #--------------------------------------------------------------------------
  588.   # ○ スキル封印判定
  589.   #--------------------------------------------------------------------------
  590.   def skill_seal?(skill)
  591.     return (seal_atk_f <= skill.atk_f || seal_spi_f <= skill.spi_f)
  592.   end
  593.   #--------------------------------------------------------------------------
  594.   # ○ 封印する打撃関係度を取得
  595.   #--------------------------------------------------------------------------
  596.   def seal_atk_f
  597.     n = 999
  598.     states.each { |state| n = [n, state.seal_atk_f].min }
  599.     return n
  600.   end
  601.   #--------------------------------------------------------------------------
  602.   # ○ 封印する精神関係度を取得
  603.   #--------------------------------------------------------------------------
  604.   def seal_spi_f
  605.     n = 999
  606.     states.each { |state| n = [n, state.seal_spi_f].min }
  607.     return n
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ○ 必要な武器属性を満たしているか判定
  611.   #--------------------------------------------------------------------------
  612.   def skill_satisfied_weapon_element?(skill)
  613.     return true
  614.   end
  615.   #--------------------------------------------------------------------------
  616.   # ● 最終回避率の計算
  617.   #     user : 攻撃者、スキルまたはアイテムの使用者
  618.   #     obj  : スキルまたはアイテム (通常攻撃の場合は nil)
  619.   #--------------------------------------------------------------------------
  620.   alias calc_eva_KGC_ReproduceFunctions calc_eva
  621.   def calc_eva(user, obj = nil)
  622.     eva = calc_eva_KGC_ReproduceFunctions(user, obj)

  623.     physical = (obj == nil || obj.physical_attack)
  624.     if physical && user.ignore_eva  # 物理攻撃かつ回避無視の場合
  625.       eva = 0
  626.     end
  627.     return eva
  628.   end
  629.   #--------------------------------------------------------------------------
  630.   # ● アイテムの効果適用
  631.   #     user : アイテムの使用者
  632.   #     item : アイテム
  633.   #--------------------------------------------------------------------------
  634.   alias item_effect_KGC_ReproduceFunctions item_effect
  635.   def item_effect(user, item)
  636.     # スキル発動判定
  637.     if item.exec_skill?
  638.       $game_temp.exec_skill_on_item = true
  639.       skill_effect(user, $data_skills[item.skill_id])
  640.       $game_temp.exec_skill_on_item = false
  641.     else
  642.       item_effect_KGC_ReproduceFunctions(user, item)
  643.     end
  644.   end
  645. end

  646. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  647. #==============================================================================
  648. # ■ Game_BattleAction
  649. #==============================================================================

  650. class Game_BattleAction
  651.   #--------------------------------------------------------------------------
  652.   # ● 通常攻撃のターゲット作成
  653.   #--------------------------------------------------------------------------
  654.   alias make_attack_targets_KGC_ReproduceFunctions make_attack_targets
  655.   def make_attack_targets
  656.     unless battler.whole_attack  # 全体攻撃でない
  657.       return make_attack_targets_KGC_ReproduceFunctions
  658.     end

  659.     targets = []
  660.     if battler.confusion?
  661.       targets += friends_unit.existing_members
  662.     else
  663.       targets += opponents_unit.existing_members
  664.     end
  665.     if battler.dual_attack      # 連続攻撃
  666.       targets += targets
  667.     end
  668.     return targets.compact
  669.   end
  670. end

  671. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  672. #==============================================================================
  673. # ■ Game_Actor
  674. #==============================================================================

  675. class Game_Actor < Game_Battler
  676.   #--------------------------------------------------------------------------
  677.   # ● クリティカル率の取得
  678.   #--------------------------------------------------------------------------
  679.   alias cri_KGC_ReproduceFunctions cri
  680.   def cri
  681.     n = cri_KGC_ReproduceFunctions

  682.     equips.compact.each { |item| n += item.cri }
  683.     return n
  684.   end
  685.   #--------------------------------------------------------------------------
  686.   # ○ オートステートの配列を取得
  687.   #     id_only : ID のみを取得
  688.   #--------------------------------------------------------------------------
  689.   def auto_states(id_only = false)
  690.     result = []
  691.     equips.compact.each { |item|
  692.       result |= (id_only ? item.auto_state_ids : item.auto_states)
  693.     }
  694.     return result
  695.   end
  696.   #--------------------------------------------------------------------------
  697.   # ○ 装備オプション [全体攻撃] の取得
  698.   #--------------------------------------------------------------------------
  699.   def whole_attack
  700.     equips.compact.each { |item|
  701.       return true if item.whole_attack
  702.     }
  703.     return false
  704.   end
  705.   #--------------------------------------------------------------------------
  706.   # ○ 装備オプション [回避無視] の取得
  707.   #--------------------------------------------------------------------------
  708.   def ignore_eva
  709.     equips.compact.each { |item|
  710.       return true if item.ignore_eva
  711.     }
  712.     return false
  713.   end
  714.   #--------------------------------------------------------------------------
  715.   # ○ 通常攻撃の消費 MP 計算
  716.   #--------------------------------------------------------------------------
  717.   def calc_attack_mp_cost
  718.     n = 0
  719.     equips.compact.each { |item|
  720.       n += item.mp_cost
  721.     }
  722.     return n
  723.   end
  724.   #--------------------------------------------------------------------------
  725.   # ○ 必要な武器属性を満たしているか判定
  726.   #--------------------------------------------------------------------------
  727.   def skill_satisfied_weapon_element?(skill)
  728.     elements = skill.weapon_element_set
  729.     return (self.element_set & elements) == elements
  730.   end
  731. end

  732. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  733. #==============================================================================
  734. # ■ Game_Enemy
  735. #==============================================================================

  736. class Game_Enemy < Game_Battler
  737.   #--------------------------------------------------------------------------
  738.   # ○ 半透明化判定
  739.   #--------------------------------------------------------------------------
  740.   def translucent?
  741.     return enemy.translucent?
  742.   end
  743.   #--------------------------------------------------------------------------
  744.   # ● クリティカル率の取得
  745.   #--------------------------------------------------------------------------
  746.   alias cri_KGC_ReproduceFunctions cri
  747.   def cri
  748.     n = cri_KGC_ReproduceFunctions
  749.     if enemy.has_critical && enemy.cri != 0
  750.       n += enemy.cri - 10
  751.     end
  752.     return n
  753.   end
  754. end

  755. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  756. #==============================================================================
  757. # ■ Game_Party
  758. #==============================================================================

  759. class Game_Party < Game_Unit
  760.   #--------------------------------------------------------------------------
  761.   # ● オブジェクト初期化
  762.   #--------------------------------------------------------------------------
  763.   alias initialize_KGC_ReproduceFunctions initialize
  764.   def initialize
  765.     initialize_KGC_ReproduceFunctions

  766.     @item_use_count = {}  # 所持品使用回数ハッシュ (アイテム ID)
  767.   end
  768.   #--------------------------------------------------------------------------
  769.   # ● アイテムの減少
  770.   #     item          : アイテム
  771.   #     n             : 個数
  772.   #     include_equip : 装備品も含める
  773.   #--------------------------------------------------------------------------
  774.   alias lose_item_KGC_ReproduceFunctions lose_item
  775.   def lose_item(item, n, include_equip = false)
  776.     lose_item_KGC_ReproduceFunctions(item, n, include_equip)

  777.     # アイテムが無くなったら使用回数をリセット
  778.     if item.is_a?(RPG::Item) && item.consumable && item_number(item) == 0
  779.       @item_use_count[item.id] = 0
  780.     end
  781.   end
  782.   #--------------------------------------------------------------------------
  783.   # ● アイテムの消耗
  784.   #     item : アイテム
  785.   #--------------------------------------------------------------------------
  786.   alias consume_item_KGC_ReproduceFunctions consume_item
  787.   def consume_item(item)
  788.     if item.is_a?(RPG::Item) && item.consumable
  789.       update_use_count(item)

  790.       # 使用回数が 0 の場合のみ消耗
  791.       if @item_use_count[item.id] == 0
  792.         consume_item_KGC_ReproduceFunctions(item)
  793.       end
  794.     else
  795.       consume_item_KGC_ReproduceFunctions(item)
  796.     end
  797.   end
  798.   #--------------------------------------------------------------------------
  799.   # ○ 使用回数の更新
  800.   #     item : アイテム
  801.   #    指定アイテムの使用回数を 1 増やす。
  802.   #    使用後に消耗する場合は、使用回数を 0 にする。
  803.   #--------------------------------------------------------------------------
  804.   def update_use_count(item)
  805.     if @item_use_count == nil
  806.       @item_use_count = {}
  807.     end

  808.     unless @item_use_count.has_key?(item.id)
  809.       @item_use_count[item.id] = 0
  810.     end
  811.     @item_use_count[item.id] += 1
  812.     # 使用可能回数に達したら、使用回数を 0 にする
  813.     if @item_use_count[item.id] >= item.usable_count
  814.       @item_use_count[item.id] = 0
  815.     end
  816.   end
  817. end

  818. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  819. #==============================================================================
  820. # ■ Sprite_Battler
  821. #==============================================================================

  822. class Sprite_Battler < Sprite_Base
  823.   #--------------------------------------------------------------------------
  824.   # ● エフェクトの更新
  825.   #--------------------------------------------------------------------------
  826.   alias update_effect_KGC_ReproduceFunctions update_effect
  827.   def update_effect
  828.     # エフェクト実行前に半透明化判定をしておく
  829.     trans_flag = (@effect_duration > 0 && @battler.translucent?)

  830.     update_effect_KGC_ReproduceFunctions

  831.     if trans_flag
  832.       self.opacity /= 2
  833.     end
  834.   end
  835. end

  836. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  837. #==============================================================================
  838. # ■ Scene_Battle
  839. #==============================================================================

  840. class Scene_Battle < Scene_Base
  841.   #--------------------------------------------------------------------------
  842.   # ● 対象敵キャラ選択の開始
  843.   #--------------------------------------------------------------------------
  844.   alias start_target_enemy_selection_KGC_ReproduceFunctions start_target_enemy_selection
  845.   def start_target_enemy_selection
  846.     # 全体通常攻撃なら選択をスキップ
  847.     if @active_battler.action.kind == 0 &&
  848.         @active_battler.action.basic == 0 &&
  849.         @active_battler.whole_attack
  850.       next_actor
  851.       return
  852.     end

  853.     start_target_enemy_selection_KGC_ReproduceFunctions
  854.   end
  855.   #--------------------------------------------------------------------------
  856.   # ● 戦闘行動の実行 : 攻撃
  857.   #--------------------------------------------------------------------------
  858.   alias execute_action_attack_KGC_ReproduceFunctions execute_action_attack
  859.   def execute_action_attack
  860.     execute_action_attack_KGC_ReproduceFunctions

  861.     # 攻撃者の MP 消費
  862.     mp_cost = @active_battler.calc_attack_mp_cost
  863.     return if mp_cost == 0
  864.     @active_battler.mp -= mp_cost
  865.     if KGC::ReproduceFunctions::SHOW_WEAPON_MP_COST_ON_ATTACK
  866.       @active_battler.add_mp_damage(mp_cost)
  867.       display_mp_damage(@active_battler)
  868.     end
  869.   end
  870. end
复制代码

使用方法不用我说了哈,2V拿回去吧。

点评

↓即使宣传我也不会去宣传那个老古董了  发表于 2013-1-27 17:05
好广告XD  发表于 2013-1-27 17:03
这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复

使用道具 举报

送快递的水表员

梦石
10
星屑
5264
在线时间
3305 小时
注册时间
2012-6-27
回帖
7028

开拓者贵宾

 楼主| 发表于 2013-1-27 18:22:36 | 显示全部楼层
a364774426 发表于 2013-1-27 16:59

那个……怎么用…… = =|
回复

使用道具 举报

梦石
0
星屑
97
在线时间
2462 小时
注册时间
2011-12-18
回帖
1419
发表于 2013-1-27 19:10:49 | 显示全部楼层
武器的备注栏写<全体攻撃>或者<WHOLE_ATTACK>
这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复

使用道具 举报

送快递的水表员

梦石
10
星屑
5264
在线时间
3305 小时
注册时间
2012-6-27
回帖
7028

开拓者贵宾

 楼主| 发表于 2013-1-27 19:25:06 | 显示全部楼层
a364774426 发表于 2013-1-27 19:10

现在可以敌全体攻击了,
但是攻击之前还是会出现选择要攻击的敌人的东西,
这个有办法解决么?

点评

我试了一下,貌似不用的说  发表于 2013-1-27 19:45
回复

使用道具 举报

送快递的水表员

梦石
10
星屑
5264
在线时间
3305 小时
注册时间
2012-6-27
回帖
7028

开拓者贵宾

 楼主| 发表于 2013-1-27 20:27:57 | 显示全部楼层
本帖最后由 Password 于 2013-1-29 18:00 编辑
a364774426 发表于 2013-1-27 19:10


测试了下发现有这个问题:
当把这段脚本放在Sideview2上的时候不报错,但是点攻击以后还是蹦出选择敌人的画面,虽然之后的确攻击敌全体了

但是放到Sideview2下面以后就会报错:
截图1.png

截图2.png

这个是怎么回事?……

@protosssonny  

点评

哪有QAQ真的有效的~你试试~绝对秒杀全体敌人0 0  发表于 2013-1-27 21:01
回复

使用道具 举报

发表于 2013-1-27 20:43:54 | 显示全部楼层
指定武器攻击敌全体?
告诉你个绝对不冲突的好方法~
在你的角色使用那个武器的时候0 0
抓起一把锤子,用椅子也可以=w=
对着显示屏砸过去~

这样就能攻击全体敌人了~

点评

我想秒杀你……=A=  发表于 2013-1-27 21:02
@delv25 这是水帖,该扣分  发表于 2013-1-27 20:57

评分

参与人数 1星屑 +1 收起 理由
咕噜 + 1 为什么我感觉略有爱……

查看全部评分

我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~
回复

使用道具 举报

◇无限的妄想者◇

梦石
0
星屑
90
在线时间
1441 小时
注册时间
2012-7-14
回帖
2279
发表于 2013-1-27 21:58:57 | 显示全部楼层
Password 发表于 2013-1-27 20:27

试下将脚本918~924行复制到Sideview 2的143~144行之间。然后脚本前置。
或者将919~921的@active_battler改成@commander。其余不动。
渣脚本不确定究竟是什么原因造成的冲突,只是提出两种看上去靠谱的修改方式,有可能其中一个可行,也可能都不可行,总之实验前先备份。

————————————————————————————————————
新坑Dreamoon酝酿中,预计短篇⑨完工发布。
————————————————————————————————————
如何调戏橙光文字的 高级UI 系列教程:  鉴赏页制作篇、背包系统制作篇
回复

使用道具 举报

送快递的水表员

梦石
10
星屑
5264
在线时间
3305 小时
注册时间
2012-6-27
回帖
7028

开拓者贵宾

 楼主| 发表于 2013-1-28 09:31:01 | 显示全部楼层
幻想中的鸡蛋 发表于 2013-1-27 21:58

不管用,还是会蹦出选择敌人画面

Sideview 2 那几行这么设置的:
截图.png

点评

无效的话我也不知道怎么办了。两个脚本都很长啊,渣脚本表示没招了,等大神来回答吧。  发表于 2013-1-28 18:02
回复

使用道具 举报

八宝粥的基叔

梦石
0
星屑
4957
在线时间
5234 小时
注册时间
2009-4-29
回帖
14054

贵宾

发表于 2013-1-29 21:05:33 | 显示全部楼层
Password 发表于 2013-1-27 20:27
测试了下发现有这个问题:
当把这段脚本放在Sideview2上的时候不报错,但是点攻击以后还是蹦出选择敌人的 ...

嗷呜,本来想帮你写一个脚本的,后来忘记了。
现在有人提供脚本了,我就不掺和了吧。
我提示一下就好,想要不选择敌人,参照技能攻击对象为全体敌人的写法吧。

点评

怎么参照? = =|  发表于 2013-1-29 21:22
不会……看来我当初说要学脚本就是个错误 = =|  发表于 2013-1-29 21:19
《逝去的回忆3:四叶草之梦》真情发布,欢迎点击图片下载试玩喵。

《逝去的回忆3》的讨论群:
一群:192885514
二群:200460747
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部