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

Project1

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

二刀和RTAB战斗系统冲突怎么办?

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
跳转到指定楼层
1
发表于 2007-8-28 19:43:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
2
 楼主| 发表于 2007-8-28 19:43:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-4-10
帖子
40
3
发表于 2007-8-28 20:02:23 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
4
 楼主| 发表于 2007-8-28 20:26:21 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
5
发表于 2007-8-28 20:27:03 | 只看该作者
还很菜的时候做的,我把二刀流的一些附加功能删掉了{/gg}
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. class Special_Element
  5.   #--------------------------------------------------------------------------
  6.   # ● 特殊な属性を定義する定数
  7.   #--------------------------------------------------------------------------
  8.   TWO_WEAPONS = "二刀流"

  9.   #--------------------------------------------------------------------------
  10.   # ● 特殊な属性をすべて取得
  11.   #--------------------------------------------------------------------------
  12.   def self.special_elements
  13.     # 特殊な属性をすべて列挙
  14.     elements = [
  15.       TWO_WEAPONS
  16.     ]
  17.     return elements
  18.   end

  19.   #--------------------------------------------------------------------------
  20.   # ● 属性名からその属性のIDを得る
  21.   #--------------------------------------------------------------------------
  22.   def self.get_index(name)
  23.     return $data_system.elements.index(name)
  24.   end
  25.   
  26.   #--------------------------------------------------------------------------
  27.   # ● 正規表現にマッチするすべての属性のIDとマッチ情報を得る
  28.   #     戻り値 : 二次元配列 [n][0]にID、[n][1]にマッチ情報(MatchData)
  29.   #--------------------------------------------------------------------------
  30.   def self.get_indices(regexp)
  31.     indices = []
  32.     for i in 1...$data_system.elements.size
  33.       indices.push([i, $~]) if regexp =~ $data_system.elements[i]
  34.     end
  35.   end
  36.   
  37.   #--------------------------------------------------------------------------
  38.   # ● 特殊な属性を取り除く
  39.   #     element_set     : 取り除く前の属性IDの配列
  40.   #     ignore_elements : 取り除きたい属性 ID・名前・正規表現で指定可能
  41.   #     戻り値          : 取り除いた結果の属性IDの配列
  42.   #--------------------------------------------------------------------------
  43.   def self.delete(element_set)
  44.     result = element_set.dup
  45.     for ignore in Special_Element::special_elements
  46.       case ignore
  47.       when Integer
  48.         result.delete(ignore)
  49.       when String
  50.         result.delete(Special_Element::get_index(ignore))
  51.       when Regexp
  52.         for i in result
  53.           result[i] = nil if ignore =~ $data_system.elements[result[i]]
  54.         end
  55.         result.delete(nil)
  56.       end
  57.     end
  58.     return result
  59.   end
  60. end





  61. class Game_Battler
  62.   #--------------------------------------------------------------------------
  63.   # ● 属性修正の計算
  64.   #     element_set : 属性
  65.   #--------------------------------------------------------------------------
  66.   def elements_correct(element_set)
  67.     # --- ここから変更部分 ---
  68.     element_set = Special_Element::delete(element_set)
  69.     # --- 変更部分終わり ---
  70.     # 無属性の場合
  71.     if element_set == []
  72.       # 100 を返す
  73.       return 100
  74.     end
  75.     # 与えられた属性の中で最も弱いものを返す
  76.     # ※メソッド element_rate は、このクラスから継承される Game_Actor
  77.     #   および Game_Enemy クラスで定義される
  78.     weakest = -100
  79.     for i in element_set
  80.       weakest = [weakest, self.element_rate(i)].max
  81.     end
  82.     return weakest
  83.   end
  84. end





  85. class Game_Actor < Game_Battler
  86.   #--------------------------------------------------------------------------
  87.   # ● 公開インスタンス変数
  88.   #--------------------------------------------------------------------------
  89.   attr_reader   :name                     # 名前
  90.   attr_reader   :character_name           # キャラクター ファイル名
  91.   attr_reader   :character_hue            # キャラクター 色相
  92.   attr_reader   :class_id                 # クラス ID
  93.   attr_reader   :weapon_id                # 武器 ID
  94.   # --- ここから追加部分 ---
  95.   attr_reader   :weapon2_id               # 二刀流武器 ID
  96.   # --- 追加部分終わり ---
  97.   attr_reader   :armor1_id                # 盾 ID
  98.   attr_reader   :armor2_id                # 頭防具 ID
  99.   attr_reader   :armor3_id                # 体防具 ID
  100.   attr_reader   :armor4_id                # 装飾品 ID
  101.   attr_reader   :level                    # レベル
  102.   attr_reader   :exp                      # EXP
  103.   attr_reader   :skills                   # スキル

  104.   #--------------------------------------------------------------------------
  105.   # ● セットアップ
  106.   #     actor_id : アクター ID
  107.   #--------------------------------------------------------------------------
  108.   def setup(actor_id)
  109.     actor = $data_actors[actor_id]
  110.     @actor_id = actor_id
  111.     @name = actor.name
  112.     @character_name = actor.character_name
  113.     @character_hue = actor.character_hue
  114.     @battler_name = actor.battler_name
  115.     @battler_hue = actor.battler_hue
  116.     @class_id = actor.class_id
  117.     @weapon_id = actor.weapon_id
  118.     # --- ここから追加部分 ---
  119.     @weapon2_id = 0
  120.     # --- 追加部分終わり ---
  121.     @armor1_id = actor.armor1_id
  122.     @armor2_id = actor.armor2_id
  123.     @armor3_id = actor.armor3_id
  124.     @armor4_id = actor.armor4_id
  125.     @level = actor.initial_level
  126.     @exp_list = Array.new(101)
  127.     make_exp_list
  128.     @exp = @exp_list[@level]
  129.     @skills = []
  130.     @hp = maxhp
  131.     @sp = maxsp
  132.     @states = []
  133.     @states_turn = {}
  134.     @maxhp_plus = 0
  135.     @maxsp_plus = 0
  136.     @str_plus = 0
  137.     @dex_plus = 0
  138.     @agi_plus = 0
  139.     @int_plus = 0
  140.     # スキル習得
  141.     for i in 1..@level
  142.       for j in $data_classes[@class_id].learnings
  143.         if j.level == i
  144.           learn_skill(j.skill_id)
  145.         end
  146.       end
  147.     end
  148.     # オートステートを更新
  149.     update_auto_state(nil, $data_armors[@armor1_id])
  150.     update_auto_state(nil, $data_armors[@armor2_id])
  151.     update_auto_state(nil, $data_armors[@armor3_id])
  152.     update_auto_state(nil, $data_armors[@armor4_id])
  153.   end

  154.   #--------------------------------------------------------------------------
  155.   # ● 通常攻撃の属性取得
  156.   #--------------------------------------------------------------------------
  157.   def element_set
  158.     weapon = $data_weapons[@weapon_id]
  159.     # --- ここから変更部分 ---
  160.     weapon2 = $data_weapons[@weapon2_id]
  161.     result = []
  162.     result.concat(weapon.element_set) if weapon != nil
  163.     result.concat(weapon2.element_set) if weapon2 != nil
  164.     return result
  165.     # --- 変更部分終わり ---
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● 通常攻撃のステート変化 (+) 取得
  169.   #--------------------------------------------------------------------------
  170.   def plus_state_set
  171.     weapon = $data_weapons[@weapon_id]
  172.     # --- ここから変更部分 ---
  173.     weapon2 = $data_weapons[@weapon2_id]
  174.     result = []
  175.     result.concat(weapon.plus_state_set) if weapon != nil
  176.     result.concat(weapon2.plus_state_set) if weapon2 != nil
  177.     return result
  178.     # --- 変更部分終わり ---
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● 通常攻撃のステート変化 (-) 取得
  182.   #--------------------------------------------------------------------------
  183.   def minus_state_set
  184.     weapon = $data_weapons[@weapon_id]
  185.     # --- ここから変更部分 ---
  186.     weapon2 = $data_weapons[@weapon2_id]
  187.     result = []
  188.     result.concat(weapon.minus_state_set) if weapon != nil
  189.     result.concat(weapon2.minus_state_set) if weapon2 != nil
  190.     return result
  191.     # --- 変更部分終わり ---
  192.   end

  193.   #--------------------------------------------------------------------------
  194.   # ● 基本腕力の取得
  195.   #--------------------------------------------------------------------------
  196.   def base_str
  197.     n = $data_actors[@actor_id].parameters[2, @level]
  198.     weapon = $data_weapons[@weapon_id]
  199.     armor1 = $data_armors[@armor1_id]
  200.     armor2 = $data_armors[@armor2_id]
  201.     armor3 = $data_armors[@armor3_id]
  202.     armor4 = $data_armors[@armor4_id]
  203.     # --- ここから追加部分 ---
  204.     weapon2 = $data_weapons[@weapon2_id]
  205.     # そのまま加算すると強すぎなので半分にしてみるテスト
  206.     n += weapon2 != nil ? weapon2.str_plus / 2 : 0
  207.     # --- 追加部分終わり ---
  208.     n += weapon != nil ? weapon.str_plus : 0
  209.     n += armor1 != nil ? armor1.str_plus : 0
  210.     n += armor2 != nil ? armor2.str_plus : 0
  211.     n += armor3 != nil ? armor3.str_plus : 0
  212.     n += armor4 != nil ? armor4.str_plus : 0
  213.     return [[n, 1].max, 999].min
  214.   end

  215.   #--------------------------------------------------------------------------
  216.   # ● 基本器用さの取得
  217.   #--------------------------------------------------------------------------
  218.   def base_dex
  219.     n = $data_actors[@actor_id].parameters[3, @level]
  220.     weapon = $data_weapons[@weapon_id]
  221.     armor1 = $data_armors[@armor1_id]
  222.     armor2 = $data_armors[@armor2_id]
  223.     armor3 = $data_armors[@armor3_id]
  224.     armor4 = $data_armors[@armor4_id]
  225.     # --- ここから追加部分 ---
  226.     weapon2 = $data_weapons[@weapon2_id]
  227.     # そのまま加算すると強すぎなので半分にしてみるテスト
  228.     n += weapon2 != nil ? weapon2.dex_plus / 2 : 0
  229.     # --- 追加部分終わり ---
  230.     n += weapon != nil ? weapon.dex_plus : 0
  231.     n += armor1 != nil ? armor1.dex_plus : 0
  232.     n += armor2 != nil ? armor2.dex_plus : 0
  233.     n += armor3 != nil ? armor3.dex_plus : 0
  234.     n += armor4 != nil ? armor4.dex_plus : 0
  235.     return [[n, 1].max, 999].min
  236.   end

  237.   #--------------------------------------------------------------------------
  238.   # ● 基本素早さの取得
  239.   #--------------------------------------------------------------------------
  240.   def base_agi
  241.     n = $data_actors[@actor_id].parameters[4, @level]
  242.     weapon = $data_weapons[@weapon_id]
  243.     armor1 = $data_armors[@armor1_id]
  244.     armor2 = $data_armors[@armor2_id]
  245.     armor3 = $data_armors[@armor3_id]
  246.     armor4 = $data_armors[@armor4_id]
  247.     # --- ここから追加部分 ---
  248.     weapon2 = $data_weapons[@weapon2_id]
  249.     # そのまま加算すると強すぎなので半分にしてみるテスト
  250.     n += weapon2 != nil ? weapon2.agi_plus / 2 : 0
  251.     # --- 追加部分終わり ---
  252.     n += weapon != nil ? weapon.agi_plus : 0
  253.     n += armor1 != nil ? armor1.agi_plus : 0
  254.     n += armor2 != nil ? armor2.agi_plus : 0
  255.     n += armor3 != nil ? armor3.agi_plus : 0
  256.     n += armor4 != nil ? armor4.agi_plus : 0
  257.     return [[n, 1].max, 999].min
  258.   end

  259.   #--------------------------------------------------------------------------
  260.   # ● 基本魔力の取得
  261.   #--------------------------------------------------------------------------
  262.   def base_int
  263.     n = $data_actors[@actor_id].parameters[5, @level]
  264.     weapon = $data_weapons[@weapon_id]
  265.     armor1 = $data_armors[@armor1_id]
  266.     armor2 = $data_armors[@armor2_id]
  267.     armor3 = $data_armors[@armor3_id]
  268.     armor4 = $data_armors[@armor4_id]
  269.     # --- ここから追加部分 ---
  270.     weapon2 = $data_weapons[@weapon2_id]
  271.     # そのまま加算すると強すぎなので半分にしてみるテスト
  272.     n += weapon2 != nil ? weapon2.int_plus / 2 : 0
  273.     # --- 追加部分終わり ---
  274.     n += weapon != nil ? weapon.int_plus : 0
  275.     n += armor1 != nil ? armor1.int_plus : 0
  276.     n += armor2 != nil ? armor2.int_plus : 0
  277.     n += armor3 != nil ? armor3.int_plus : 0
  278.     n += armor4 != nil ? armor4.int_plus : 0
  279.     return [[n, 1].max, 999].min
  280.   end

  281.   #--------------------------------------------------------------------------
  282.   # ● 基本攻撃力の取得
  283.   #--------------------------------------------------------------------------
  284.   def base_atk
  285.     weapon = $data_weapons[@weapon_id]
  286.     # --- ここから変更部分 ---
  287.     weapon2 = $data_weapons[@weapon2_id]
  288.     # そのまま加算すると強すぎなので半分にしてみるテスト
  289.     n = weapon2 != nil ? weapon2.atk / 2 : 0
  290.     return weapon != nil ? weapon.atk + n : n
  291.     # --- 変更部分終わり ---
  292.   end

  293.   #--------------------------------------------------------------------------
  294.   # ● 基本物理防御の取得
  295.   #--------------------------------------------------------------------------
  296.   def base_pdef
  297.     weapon = $data_weapons[@weapon_id]
  298.     armor1 = $data_armors[@armor1_id]
  299.     armor2 = $data_armors[@armor2_id]
  300.     armor3 = $data_armors[@armor3_id]
  301.     armor4 = $data_armors[@armor4_id]
  302.     pdef1 = weapon != nil ? weapon.pdef : 0
  303.     pdef2 = armor1 != nil ? armor1.pdef : 0
  304.     pdef3 = armor2 != nil ? armor2.pdef : 0
  305.     pdef4 = armor3 != nil ? armor3.pdef : 0
  306.     pdef5 = armor4 != nil ? armor4.pdef : 0
  307.     # --- ここから追加部分 ---
  308.     weapon2 = $data_weapons[@weapon2_id]
  309.     # そのまま加算すると強すぎなので半分にしてみるテスト
  310.     pdef1 += weapon2 != nil ? weapon2.pdef / 2 : 0
  311.     # --- 追加部分終わり ---
  312.     return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
  313.   end

  314.   #--------------------------------------------------------------------------
  315.   # ● 基本魔法防御の取得
  316.   #--------------------------------------------------------------------------
  317.   def base_mdef
  318.     weapon = $data_weapons[@weapon_id]
  319.     armor1 = $data_armors[@armor1_id]
  320.     armor2 = $data_armors[@armor2_id]
  321.     armor3 = $data_armors[@armor3_id]
  322.     armor4 = $data_armors[@armor4_id]
  323.     mdef1 = weapon != nil ? weapon.mdef : 0
  324.     mdef2 = armor1 != nil ? armor1.mdef : 0
  325.     mdef3 = armor2 != nil ? armor2.mdef : 0
  326.     mdef4 = armor3 != nil ? armor3.mdef : 0
  327.     mdef5 = armor4 != nil ? armor4.mdef : 0
  328.     # --- ここから追加部分 ---
  329.     weapon2 = $data_weapons[@weapon2_id]
  330.     # そのまま加算すると強すぎなので半分にしてみるテスト
  331.     mdef1 += weapon2 != nil ? weapon2.mdef / 2 : 0
  332.     # --- 追加部分終わり ---
  333.     return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
  334.   end
  335. =begin
  336.   #--------------------------------------------------------------------------
  337.   # ● 通常攻撃 攻撃側アニメーション ID の取得
  338.   #--------------------------------------------------------------------------
  339.   def animation1_id
  340.     weapon = $data_weapons[@weapon_id]
  341.     # --- ここから変更部分 ---
  342.     weapon2 = $data_weapons[@weapon2_id]
  343.     animations = []
  344.     animations.push(weapon.animation1_id) if weapon != nil
  345.     animations.push(weapon2.animation1_id) if weapon2 != nil
  346.     animations.delete(0)
  347.     return animations.empty? ? 0 : animations
  348.     # --- 変更部分終わり ---
  349.   end

  350.   #--------------------------------------------------------------------------
  351.   # ● 通常攻撃 対象側アニメーション ID の取得
  352.   #--------------------------------------------------------------------------
  353.   def animation2_id
  354.     weapon = $data_weapons[@weapon_id]
  355.     # --- ここから変更部分 ---
  356.     weapon2 = $data_weapons[@weapon2_id]
  357.     animations = []
  358.     animations.push(weapon.animation2_id) if weapon != nil
  359.     animations.push(weapon2.animation2_id) if weapon2 != nil
  360.     animations.delete(0)
  361.     return animations.empty? ? 0 : animations
  362.     # --- 変更部分終わり ---
  363.   end

  364. =end
  365.   #--------------------------------------------------------------------------
  366.   # ● 装備の変更
  367.   #     equip_type : 装備タイプ(変更点:-1なら二刀流の盾部分の武器)
  368.   #     id    : 武器 or 防具 ID  (0 なら装備解除)
  369.   #--------------------------------------------------------------------------
  370.   def equip(equip_type, id)
  371.     case equip_type
  372.     when 0  # 武器
  373.       if id == 0 or $game_party.weapon_number(id) > 0
  374.         $game_party.gain_weapon(@weapon_id, 1)
  375.         @weapon_id = id
  376.         $game_party.lose_weapon(id, 1)
  377.         # --- ここから追加部分 ---
  378.         # 二刀武器じゃないものを装備した場合、盾の部分の二刀武器を外す
  379.         if id != 0 and !$data_weapons[id].element_set.include?(Special_Element::get_index(Special_Element::TWO_WEAPONS))
  380.           $game_party.gain_weapon(@weapon2_id, 1)
  381.           @weapon2_id = 0
  382.         end
  383.         # --- 追加部分終わり ---
  384.       end
  385.     when 1  # 盾
  386.       if id == 0 or $game_party.armor_number(id) > 0
  387.         update_auto_state($data_armors[@armor1_id], $data_armors[id])
  388.         $game_party.gain_armor(@armor1_id, 1)
  389.         @armor1_id = id
  390.         $game_party.lose_armor(id, 1)
  391.         # --- ここから追加部分 ---
  392.         # 二刀武器を装備していた場合は外す
  393.         if id != 0
  394.           $game_party.gain_weapon(@weapon2_id, 1)
  395.           @weapon2_id = 0
  396.         end
  397.         # --- 追加部分終わり ---
  398.       end
  399.     when 2  # 頭
  400.       if id == 0 or $game_party.armor_number(id) > 0
  401.         update_auto_state($data_armors[@armor2_id], $data_armors[id])
  402.         $game_party.gain_armor(@armor2_id, 1)
  403.         @armor2_id = id
  404.         $game_party.lose_armor(id, 1)
  405.       end
  406.     when 3  # 身体
  407.       if id == 0 or $game_party.armor_number(id) > 0
  408.         update_auto_state($data_armors[@armor3_id], $data_armors[id])
  409.         $game_party.gain_armor(@armor3_id, 1)
  410.         @armor3_id = id
  411.         $game_party.lose_armor(id, 1)
  412.       end
  413.     when 4  # 装飾品
  414.       if id == 0 or $game_party.armor_number(id) > 0
  415.         update_auto_state($data_armors[@armor4_id], $data_armors[id])
  416.         $game_party.gain_armor(@armor4_id, 1)
  417.         @armor4_id = id
  418.         $game_party.lose_armor(id, 1)
  419.       end
  420.       # --- ここから追加部分 ---
  421.       when -1 # 二刀流の盾部分の武器
  422.       if id == 0 or $game_party.weapon_number(id) > 0
  423.         $game_party.gain_weapon(@weapon2_id, 1)
  424.         @weapon2_id = id
  425.         $game_party.lose_weapon(id, 1)
  426.         # 盾を外す
  427.         $game_party.gain_armor(@armor1_id, 1)
  428.         @armor1_id = 0
  429.         # 既に装備している武器が二刀武器じゃない場合は外す
  430.         if id != 0 and @weapon_id != 0 and !$data_weapons[@weapon_id].element_set.include?(Special_Element::get_index(Special_Element::TWO_WEAPONS))
  431.           $game_party.gain_weapon(@weapon_id, 1)
  432.           @weapon_id = 0
  433.         end
  434.       end
  435.       # --- 追加部分終わり ---
  436.     end
  437.   end

  438.   #--------------------------------------------------------------------------
  439.   # ● 二刀流可能なアクターかどうか
  440.   #--------------------------------------------------------------------------
  441.   def can_two_weapons?
  442.     return class_element_set.include?(Special_Element::get_index(Special_Element::TWO_WEAPONS))
  443.   end

  444.   #--------------------------------------------------------------------------
  445.   # ● アクターの所属クラスの属性がAのものを取得
  446.   #--------------------------------------------------------------------------
  447.   def class_element_set
  448.     element_set = []
  449.     for i in 1...$data_classes[@class_id].element_ranks.xsize
  450.       element_set.push(i) if $data_classes[@class_id].element_ranks[i] == 1
  451.     end
  452.     return element_set
  453.   end
  454. end





  455. class Window_EquipRight < Window_Selectable
  456.   #--------------------------------------------------------------------------
  457.   # ● リフレッシュ
  458.   #--------------------------------------------------------------------------
  459.   def refresh
  460.     self.contents.clear
  461.     @data = []
  462.     @data.push($data_weapons[@actor.weapon_id])
  463.     # --- ここから変更部分 ---
  464.     @data.push(@actor.weapon2_id != 0 ? $data_weapons[@actor.weapon2_id] : $data_armors[@actor.armor1_id])
  465.     # --- 変更部分終わり ---
  466.     @data.push($data_armors[@actor.armor2_id])
  467.     @data.push($data_armors[@actor.armor3_id])
  468.     @data.push($data_armors[@actor.armor4_id])
  469.     @item_max = @data.size
  470.     self.contents.font.color = system_color
  471.     self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
  472.     self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
  473.     self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
  474.     self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
  475.     self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
  476.     draw_item_name(@data[0], 92, 32 * 0)
  477.     draw_item_name(@data[1], 92, 32 * 1)
  478.     draw_item_name(@data[2], 92, 32 * 2)
  479.     draw_item_name(@data[3], 92, 32 * 3)
  480.     draw_item_name(@data[4], 92, 32 * 4)
  481.   end
  482. end





  483. class Window_EquipItem < Window_Selectable
  484.   #--------------------------------------------------------------------------
  485.   # ● リフレッシュ
  486.   #--------------------------------------------------------------------------
  487.   def refresh
  488.     if self.contents != nil
  489.       self.contents.dispose
  490.       self.contents = nil
  491.     end
  492.     @data = []
  493.     # 装備可能な武器を追加
  494.     if @equip_type == 0
  495.       weapon_set = $data_classes[@actor.class_id].weapon_set
  496.       for i in 1...$data_weapons.size
  497.         if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
  498.           @data.push($data_weapons[i])
  499.         end
  500.       end
  501.     end
  502.     # --- ここから追加部分 ---
  503.     # 二刀流可能なアクターの場合は、盾に二刀武器も表示
  504.     if @equip_type == 1 and @actor.can_two_weapons?
  505.       weapon_set = $data_classes[@actor.class_id].weapon_set
  506.       for i in 1...$data_weapons.size
  507.         if $game_party.weapon_number(i) > 0 and weapon_set.include?(i) and $data_weapons[i].element_set.include?(Special_Element::get_index(Special_Element::TWO_WEAPONS))
  508.           @data.push($data_weapons[i])
  509.         end
  510.       end
  511.     end
  512.     # --- 追加部分終わり ---
  513.     # 装備可能な防具を追加
  514.     if @equip_type != 0
  515.       armor_set = $data_classes[@actor.class_id].armor_set
  516.       for i in 1...$data_armors.size
  517.         if $game_party.armor_number(i) > 0 and armor_set.include?(i)
  518.           if $data_armors[i].kind == @equip_type-1
  519.             @data.push($data_armors[i])
  520.           end
  521.         end
  522.       end
  523.     end
  524.     # 空白を追加
  525.     @data.push(nil)
  526.     # ビットマップを作成し、全項目を描画
  527.     @item_max = @data.size
  528.     self.contents = Bitmap.new(width - 32, row_max * 32)
  529.     for i in 0...@item_max-1
  530.       draw_item(i)
  531.     end
  532.   end
  533. end





  534. class Scene_Equip
  535.   #--------------------------------------------------------------------------
  536.   # ● リフレッシュ
  537.   #--------------------------------------------------------------------------
  538.   def refresh
  539.     # アイテムウィンドウの可視状態設定
  540.     @item_window1.visible = (@right_window.index == 0)
  541.     @item_window2.visible = (@right_window.index == 1)
  542.     @item_window3.visible = (@right_window.index == 2)
  543.     @item_window4.visible = (@right_window.index == 3)
  544.     @item_window5.visible = (@right_window.index == 4)
  545.     # 現在装備中のアイテムを取得
  546.     item1 = @right_window.item
  547.     # 現在のアイテムウィンドウを @item_window に設定
  548.     case @right_window.index
  549.     when 0
  550.       @item_window = @item_window1
  551.     when 1
  552.       @item_window = @item_window2
  553.     when 2
  554.       @item_window = @item_window3
  555.     when 3
  556.       @item_window = @item_window4
  557.     when 4
  558.       @item_window = @item_window5
  559.     end
  560.     # ライトウィンドウがアクティブの場合
  561.     if @right_window.active
  562.       # 装備変更後のパラメータを消去
  563.       @left_window.set_new_parameters(nil, nil, nil)
  564.     end
  565.     # アイテムウィンドウがアクティブの場合
  566.     if @item_window.active
  567.       # 現在選択中のアイテムを取得
  568.       item2 = @item_window.item
  569.       # 装備を変更
  570.       last_hp = @actor.hp
  571.       last_sp = @actor.sp
  572.       # --- ここから変更部分 ---
  573.       # 現在の装備を保存(装備の種類を増やしている場合はここを変更)
  574.       equipments = [@actor.weapon2_id, @actor.weapon_id, @actor.armor1_id, @actor.armor2_id, @actor.armor3_id, @actor.armor4_id]
  575.       @actor.equip(equip_type(@right_window.index, item2), item2 == nil ? 0 : item2.id)
  576.       # --- 変更部分終わり ---
  577.       # 装備変更後のパラメータを取得
  578.       new_atk = @actor.atk
  579.       new_pdef = @actor.pdef
  580.       new_mdef = @actor.mdef
  581.       # --- ここから変更部分 ---
  582.       # 装備を戻す
  583.       for i in 0...equipments.size
  584.         @actor.equip(i - 1, equipments[i])
  585.       end
  586.       # --- 変更部分終わり ---
  587.       @actor.hp = last_hp
  588.       @actor.sp = last_sp
  589.       # レフトウィンドウに描画
  590.       @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
  591.     end
  592.   end

  593.   #--------------------------------------------------------------------------
  594.   # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  595.   #--------------------------------------------------------------------------
  596.   def update_item
  597.     # B ボタンが押された場合
  598.     if Input.trigger?(Input::B)
  599.       # キャンセル SE を演奏
  600.       $game_system.se_play($data_system.cancel_se)
  601.       # ライトウィンドウをアクティブ化
  602.       @right_window.active = true
  603.       @item_window.active = false
  604.       @item_window.index = -1
  605.       return
  606.     end
  607.     # C ボタンが押された場合
  608.     if Input.trigger?(Input::C)
  609.       # 装備 SE を演奏
  610.       $game_system.se_play($data_system.equip_se)
  611.       # アイテムウィンドウで現在選択されているデータを取得
  612.       item = @item_window.item
  613.       # --- ここから変更部分 ---
  614.       # 装備を変更
  615.       @actor.equip(equip_type(@right_window.index, item), item == nil ? 0 : item.id)
  616.       # --- 変更部分終わり ---
  617.       # ライトウィンドウをアクティブ化
  618.       @right_window.active = true
  619.       @item_window.active = false
  620.       @item_window.index = -1
  621.       # ライトウィンドウ、アイテムウィンドウの内容を再作成
  622.       @right_window.refresh
  623.       # --- ここから変更部分 ---
  624.       # めんどくさいのですべてのウィンドウをリフレッシュ
  625.       @item_window1.refresh
  626.       @item_window2.refresh
  627.       @item_window3.refresh
  628.       @item_window4.refresh
  629.       @item_window5.refresh
  630.       # --- 変更部分終わり ---
  631.       return
  632.     end
  633.   end
  634.   
  635.   # --- ここから追加部分 ---
  636.   #--------------------------------------------------------------------------
  637.   # ● 二刀流用の装備部位取得
  638.   #--------------------------------------------------------------------------
  639.   def equip_type(index, item)
  640.     return index * (item.is_a?(RPG::Armor) ? 1 : -1)
  641.   end
  642.   # --- 追加部分終わり ---
  643. end




  644. =begin
  645. class Scene_Battle
  646.   #--------------------------------------------------------------------------
  647.   # ● 基本アクション 結果作成
  648.   #--------------------------------------------------------------------------
  649.   def make_basic_action_result
  650.     # 攻撃の場合
  651.     if @active_battler.current_action.basic == 0
  652.       # --- ここから変更部分 ---
  653.       # アニメーション ID を設定
  654.       @animation1_id = @active_battler.animation1_id.is_a?(Array) ? @active_battler.animation1_id.dup : @active_battler.animation1_id
  655.       @animation2_id = @active_battler.animation2_id.is_a?(Array) ? @active_battler.animation2_id.dup : @active_battler.animation2_id
  656.       # --- 変更部分終わり ---
  657.       # 行動側バトラーがエネミーの場合
  658.       if @active_battler.is_a?(Game_Enemy)
  659.         if @active_battler.restriction == 3
  660.           target = $game_troop.random_target_enemy
  661.         elsif @active_battler.restriction == 2
  662.           target = $game_party.random_target_actor
  663.         else
  664.           index = @active_battler.current_action.target_index
  665.           target = $game_party.smooth_target_actor(index)
  666.         end
  667.       end
  668.       # 行動側バトラーがアクターの場合
  669.       if @active_battler.is_a?(Game_Actor)
  670.         if @active_battler.restriction == 3
  671.           target = $game_party.random_target_actor
  672.         elsif @active_battler.restriction == 2
  673.           target = $game_troop.random_target_enemy
  674.         else
  675.           index = @active_battler.current_action.target_index
  676.           target = $game_troop.smooth_target_enemy(index)
  677.         end
  678.       end
  679.       # 対象側バトラーの配列を設定
  680.       @target_battlers = [target]
  681.       # 通常攻撃の効果を適用
  682.       for target in @target_battlers
  683.         target.attack_effect(@active_battler)
  684.       end
  685.       return
  686.     end
  687.     # 防御の場合
  688.     if @active_battler.current_action.basic == 1
  689.       # ヘルプウィンドウに "防御" を表示
  690.       @help_window.set_text($data_system.words.guard, 1)
  691.       return
  692.     end
  693.     # 逃げるの場合
  694.     if @active_battler.is_a?(Game_Enemy) and
  695.        @active_battler.current_action.basic == 2
  696.       # ヘルプウィンドウに "逃げる" を表示
  697.       @help_window.set_text("逃げる", 1)
  698.       # 逃げる
  699.       @active_battler.escape
  700.       return
  701.     end
  702.     # 何もしないの場合
  703.     if @active_battler.current_action.basic == 3
  704.       # アクション強制対象のバトラーをクリア
  705.       $game_temp.forcing_battler = nil
  706.       # ステップ 1 に移行
  707.       @phase4_step = 1
  708.       return
  709.     end
  710.   end

  711.   #--------------------------------------------------------------------------
  712.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  713.   #--------------------------------------------------------------------------
  714.   def update_phase4_step3
  715.     # --- ここから変更部分 ---
  716.     # アニメーションの配列の先頭を取り出す
  717.     if @animation1_id.is_a?(Integer)
  718.       @animation1_id = [@animation1_id]
  719.     end
  720.     animation = @animation1_id.shift
  721.     # 行動側アニメーション (ID が 0 の場合は白フラッシュ)
  722.     if animation == 0
  723.       @active_battler.white_flash = true
  724.     else
  725.       @active_battler.animation_id = animation
  726.       @active_battler.animation_hit = true
  727.     end
  728.     # アニメーションがなくなったらステップ 4 に移行
  729.     @phase4_step = 4 if @animation1_id.empty?
  730.     # --- 変更部分終わり ---
  731.   end

  732.   #--------------------------------------------------------------------------
  733.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  734.   #--------------------------------------------------------------------------
  735.   def update_phase4_step4
  736.     # --- ここから変更部分 ---
  737.     # アニメーションの配列の先頭を取り出す
  738.     if @animation2_id.is_a?(Integer)
  739.       @animation2_id = [@animation2_id]
  740.     end
  741.     animation = @animation2_id.shift
  742.     # 対象側アニメーション
  743.     for target in @target_battlers
  744.       target.animation_id = animation
  745.       target.animation_hit = (target.damage != "Miss")
  746.     end
  747.     # アニメーションの長さにかかわらず、最低 8 フレーム待つ
  748.     @wait_count = 8
  749.     # アニメーションがなくなったらステップ 5 に移行
  750.     @phase4_step = 5 if @animation2_id.empty?
  751.     # --- 変更部分終わり ---
  752.   end

  753. end
  754. =end



  755. #==============================================================================
  756. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  757. #==============================================================================
复制代码

对了,这个支持的是樱雅的V1.6版,其他的没试
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
6
 楼主| 发表于 2007-8-28 20:32:44 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
7
发表于 2007-8-28 21:54:29 | 只看该作者
就是 =begin与=end之间的部分就是删掉的啊
我没删,只是屏蔽掉了
实际上就是原本二刀流攻击对方会判定两次攻击与连击脚本冲突
我把这个改成判定攻击一次了
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
8
 楼主| 发表于 2007-8-28 22:01:21 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-1-4
帖子
17
9
 楼主| 发表于 2007-8-28 22:01:48 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
10
发表于 2007-8-28 22:11:40 | 只看该作者
哈?把这个脚本插入进去
就可以使用了啊
还有冲突的话就是你和我的RATB不是一个版本

范例我没法做现在,RATB与RMXP1.03好象有冲突,我自己以前辛苦做的整合脚本现在自己都没法用
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2026-6-22 16:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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