ツクールXPで2000の機能を実現 二刀流/両手持ち装備 改



ツクールXPで2000の機能を実現

改造内容:
・変更点
 二刀流から多刀流へ変更
 ローマ字の変数名をそれなりに英単語に変更
 両手持ち装備を片手で装備可能なスキルの実装
 ※ぶっちゃけるとデモンゲイズのアレ。。
 ※実際には弓以外の両手持ち武器を片手で装備可能なのですが、
  自分が弓が嫌いなため弓の場合は対象外という部分をオミットされてます。
  (弓が存在しないため考慮不要としています)

・バグ修正
 update_phase4_step3 で アニメ1実行済み設定の部分が『=true』ではなく
 『==true』になっており代入できていなかった不具合を修正

・ついでに以下も実装
 装飾品を2つに追加
 鎧をもう一つ追加し、インナー装備として実装する
 装飾品を更に一つ追加し、特殊装備として実装する


ツクールXPで2000の機能を実現 準備スクリプト 改 が別途必要です

※かなり大幅にいじくるため、導入時はゲームを最初から始めてください。
 おそらくそうしないとうまく動作しないです。

※このスクリプトの原作者はするめ様です。
 また、本スクリプトの無断転載を禁止します

変更点
2024:02:01
・装飾品を更に追加し、靴装備として実装する
・インタープリターの条件分岐も対応
・武器ID指定で自動的に装備解除を実装
・装飾品(防具)ID指定で自動的に装備解除を実装
・装備の全解除を実装

#----------------------------------------------------------------------------
# ツクールXPで2000の機能を実現 二刀流/両手持ち装備 改 by 貪藻矢射妥←
#----------------------------------------------------------------------------
# 原作:     ◆ ツクールXPで2000の機能を実現 二刀流/両手持ち装備 ◆
#           ◇ Last update : 2004/08/19 ◇
# 原作者:   するめ様
# HP:       チームするめ
# アドレス: http://surume.s140.xrea.com/
# 
# ※ツクールXPで2000の機能を実現 準備スクリプト 改 が別途必要です
# 
# 改造内容:
# ・変更点
#  二刀流から多刀流へ変更
#  ローマ字の変数名をそれなりに英単語に変更
#  両手持ち装備を片手で装備可能なスキルの実装
#  ※ぶっちゃけるとデモンゲイズのアレ。。
#  ※実際には弓以外の両手持ち武器を片手で装備可能なのですが、
#   自分が弓が嫌いなため弓の場合は対象外という部分をオミットされてます。
#   (弓が存在しないため考慮不要としています)
# 
# ・バグ修正
#  update_phase4_step3 で アニメ1実行済み設定の部分が『=true』ではなく
#  『==true』になっており代入できていなかった不具合を修正
# 
# ・ついでに以下も実装
#  装飾品を2つに追加
#  鎧をもう一つ追加し、インナー装備として実装する
#  装飾品を更に一つ追加し、特殊装備として実装する
# 
# ※かなり大幅にいじくるため、導入時はゲームを最初から始めてください。
#  おそらくそうしないとうまく動作しないです。
#==============================================================================
# 更新っぽいもの
# 2024:02:01
# ・装飾品を更に追加し、靴装備として実装する
# ・インタープリターの条件分岐も対応
# ・武器ID指定で自動的に装備解除を実装
# ・装飾品(防具)ID指定で自動的に装備解除を実装
# ・装備の全解除を実装

$OuterFlgs = {} if $OuterFlgs == nil
$OuterFlgs["Equip_Extend"] = true

# 両手持ち装備
module TwoHanded
  # 神の両腕スキルID
  GOD_HAND_ID = 61
end

# 多刀流
module Multi_Blade
  # 多刀流設定
  MULTI_BLADE_SETs = {
    # 名前   => [スキルID, [犠牲になる防具インデックス]]
    "二刀流" => [62,       [1]],
    "三刀流" => [63,       [1, 6]],
    "四刀流" => [64,       [1, 6, 8]],
  }
  
  # 多刀流リスト
  # ※自動で生成するため通常は意識しません。
  MULTI_BLADEs = MULTI_BLADE_SETs.keys
  
  # 両手持ち武器を装備しようとする際に装備が外される部位リスト
  # 武器     -> 盾
  # 盾       -> 武器
  # 兜       -> 靴
  # インナー -> ヨロイ
  # ヨロイ   -> インナー
  # 装飾品1  -> 装飾品2
  # 装飾品2  -> 特殊
  # 特殊     -> 装飾品1
  # 靴       -> 兜
  TWO_HAND_EXORs = [1, 0, 8, 4, 3, 6, 7, 5, 2]
end

# 装備拡張
module Equip_Extend
  # インナー装備用属性ID
  INNER_ARM = 61
  # 特殊装備用属性ID
  EXTRA_ACC = 62
  # 靴装備用属性ID
  BOOTS_ACC = 63
end

# ★★★ アクター再定義 も観てね ★★★

class Game_System
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  # 価値観の違いによる価格変動
  attr_accessor :price_off                # プライスオフ変数
  attr_accessor :premium                  # プレミア変数
  # 装備種別の拡張的なアレ
  #attr_accessor :inner_flg                # インナーフラグ
  #attr_accessor :extra_flg                # 特殊装飾フラグ
end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :armors_weapon            # 防具装備箇所に武器装備しているか
  
  attr_accessor :weapon_id                # 武器     ID
  attr_accessor :armor1_id                # 盾       ID
  attr_accessor :armor2_id                # 兜       ID
  attr_accessor :armor3_id                # ヨロイ   ID
  attr_accessor :armor4_id                # 装飾品1  ID
  # 追加装備
  attr_accessor :armor5_id                # 装飾品2  ID
  attr_accessor :armor6_id                # インナー ID
  attr_accessor :armor7_id                # 特殊     ID
  attr_accessor :armor8_id                # 靴       ID
  # 連続攻撃
  attr_accessor :max_atk_num              # 最大攻撃回数
  
  include BM
  #--------------------------------------------------------------------------
  # ● セットアップ
  #     actor_id : アクター ID
  #--------------------------------------------------------------------------
  alias setup_multi_blade setup
  def setup(actor_id)
    # 元の処理
    setup_multi_blade(actor_id)
    
    # 多刀流用防具エリアに武器装備フラグリスト 初期値
    @armors_weapon  = [false, false, false, false, false, false, false, false]
  end
  #--------------------------------------------------------------------------
  # ● 属性補正値の取得
  #     element_id : 属性 ID
  #--------------------------------------------------------------------------
  ★★★ クラス詳細化 + 進化 参照  ★★★
  
  #--------------------------------------------------------------------------
  # ● ステート防御判定
  #     state_id : ステート ID
  #--------------------------------------------------------------------------
  ★★★ ステート詳細化 Plus 参照  ★★★
  
  #--------------------------------------------------------------------------
  # ● 多刀流判定
  #--------------------------------------------------------------------------
  def multi_blade?
    for i in Multi_Blade::MULTI_BLADEs
      skill_id = Multi_Blade::MULTI_BLADE_SETs[i][0]
      if @skills.include?(skill_id) || @last_skills.include?(skill_id)
        return [true, Multi_Blade::MULTI_BLADE_SETs[i][1]]
      end
    end
    return [false, []]
  end
  #--------------------------------------------------------------------------
  # ● 装備品ID一覧取得
  #   多刀流用防具エリアに武器装備フラグリスト やequipで使用するequip_type
  #   と連動するのでIDの配置には注意してください。
  #--------------------------------------------------------------------------
  def get_armors_id_list(actor=nil)
    if actor == nil
      return [@armor1_id, @armor2_id, @armor6_id, @armor3_id, @armor4_id, 
              @armor5_id, @armor7_id, @armor8_id]
    else
      return [actor.armor1_id, actor.armor2_id, actor.armor6_id, 
              actor.armor3_id, actor.armor4_id, actor.armor5_id, 
              actor.armor7_id, actor.armor8_id]
    end
  end
  #--------------------------------------------------------------------------
  # ● 真装備品一覧取得
  #    list : 空、または武器が入ったリスト
  #--------------------------------------------------------------------------
  def get_equip_list(list)
    arm_list = get_armors_id_list
    for i in 0...@armors_weapon.size
      if @armors_weapon[i]
        list.push($data_weapons[arm_list[i]])
      else
        list.push($data_armors[arm_list[i]])
      end
    end
    return list
  end
  #--------------------------------------------------------------------------
  # ● 基本腕力の取得
  #--------------------------------------------------------------------------
  def base_str

    n = $data_actors[@actor_id].parameters[2, @level]
    
    list = [$data_weapons[@weapon_id]]
    list = get_equip_list(list)
    
    for equips in list
      n += equips != nil ? equips.str_plus : 0
    end
    
    
    return [[n, 1].max, BM::MAX_STR].min
  end
  
  #--------------------------------------------------------------------------
  # ● 基本器用さの取得
  #--------------------------------------------------------------------------
  def base_dex

    n = $data_actors[@actor_id].parameters[3, @level]
    
    list = [$data_weapons[@weapon_id]]
    list = get_equip_list(list)
    
    for equips in list
      n += equips != nil ? equips.dex_plus : 0
    end
    
    
    return [[n, 1].max, BM::MAX_STR].min
  end
  
  #--------------------------------------------------------------------------
  # ● 基本素早さの取得
  #--------------------------------------------------------------------------
  def base_agi

    n = $data_actors[@actor_id].parameters[4, @level]
    
    list = [$data_weapons[@weapon_id]]
    list = get_equip_list(list)
    
    for equips in list
      n += equips != nil ? equips.agi_plus : 0
    end
    
    
    return [[n, 1].max, BM::MAX_STR].min
  end
  
  #--------------------------------------------------------------------------
  # ● 基本魔力の取得
  #--------------------------------------------------------------------------
  def base_int

    n = $data_actors[@actor_id].parameters[5, @level]
    
    list = [$data_weapons[@weapon_id]]
    list = get_equip_list(list)
    
    for equips in list
      n += equips != nil ? equips.int_plus : 0
    end
    
    
    return [[n, 1].max, BM::MAX_STR].min
  end
  
  #--------------------------------------------------------------------------
  # ● 基本攻撃力の取得
  #--------------------------------------------------------------------------
  def base_atk
    weapon = $data_weapons[@weapon_id]
    armors = []
    
    
    arm_list = get_armors_id_list
    for i in 0...@armors_weapon.size
      if @armors_weapon[i]
        armors[i] = $data_weapons[arm_list[i]]
      else
        armors[i] = nil
      end
    end
    
    add = weapon != nil ? weapon.atk : 0
    for armor1 in armors
      add += armor1 != nil ? armor1.atk : 0
    end
    
    return add
  end
  
  #--------------------------------------------------------------------------
  # ● 基本物理防御の取得
  #--------------------------------------------------------------------------
  def base_pdef
    pdefb = 0
    list = [$data_weapons[@weapon_id]]
    
    list = get_equip_list(list)
    
    for equips in list
      pdefb += equips != nil ? equips.pdef : 0
    end
    
    return pdefb
  end
  
  #--------------------------------------------------------------------------
  # ● 基本魔法防御の取得
  #--------------------------------------------------------------------------
  def base_mdef
    mdefb = 0
    list = [$data_weapons[@weapon_id]]
    
    list = get_equip_list(list)
    
    for equips in list
      mdefb += equips != nil ? equips.mdef : 0
    end
    
    return mdefb
  end
  
  #--------------------------------------------------------------------------
  # ● 基本回避修正の取得
  #--------------------------------------------------------------------------
  def base_eva
    evab = 0
    
    list = []
    
    list = get_equip_list(list)
    
    for equips in list
      if equips.is_a?(RPG::Armor2)
        evab += equips.eva
      
      elsif equips != nil && equips.is_a?(RPG::Armor)
        evab += equips.eva
      end
    end
    
    return evab
  end
  
  #--------------------------------------------------------------------------
  # ● クラス ID の変更
  #     class_id : 新しいクラス ID
  #--------------------------------------------------------------------------
  def class_id=(class_id)
    if $data_classes[class_id] != nil
      @class_id = class_id
      # 装備できなくなったアイテムを外す
      unless equippable?($data_weapons[@weapon_id])
        equip(0, 0)
      end
      
      arm_list = get_armors_id_list
      
      for i in 0...@armors_weapon.size
        if @armors_weapon[i]
          unless equippable?($data_weapons[arm_list[i]])
            equip(i+1, 0, true)
          end
        else
          unless equippable?($data_armors[arm_list[i]])
            equip(i+1, 0)
          end
        end
      end
    end
  end
  include DIA_MM
  include DIA_PC
  #--------------------------------------------------------------------------
  # ● 武器所持?
  #     id         : 武器 ID
  #--------------------------------------------------------------------------
  def weapon_holded?(id)
    return ($game_party.weapon_number(id) > 0)
  end
  #--------------------------------------------------------------------------
  # ● 防具所持?
  #     id         : 防具 ID
  #--------------------------------------------------------------------------
  def armor_holded?(id)
    return ($game_party.armor_number(id) > 0)
  end
  #--------------------------------------------------------------------------
  # ● 装備の変更(武器を自動で解除)
  #     wep_id : 武器ID
  # 
  # 条件分岐で武器としていずれかの場所に装備しているかは判断できるが、
  # それがどの部分なのかまでは分からないため、専用で装備解除する
  #--------------------------------------------------------------------------
  def auto_unequip_weapon(wep_id)
    if @weapon_id == wep_id
      equip(0, 0)
    end
    if @armors_weapon[0] && @armor1_id == wep_id
      equip(1, 0)
    end
    if @armors_weapon[1] && @armor2_id == wep_id
      equip(2, 0)
    end
    if @armors_weapon[2] && @armor6_id == wep_id
      equip(6, 0)
    end
    if @armors_weapon[3] && @armor3_id == wep_id
      equip(3, 0)
    end
    if @armors_weapon[4] && @armor4_id == wep_id
      equip(4, 0)
    end
    if @armors_weapon[5] && @armor5_id == wep_id
      equip(5, 0)
    end
    if @armors_weapon[6] && @armor7_id == wep_id
      equip(7, 0)
    end
    if @armors_weapon[7] && @armor8_id == wep_id
      equip(8, 0)
    end
  end
  #--------------------------------------------------------------------------
  # ● 装備の変更(装飾品を自動で解除)
  #     arm_id : 装飾品ID
  # 
  # 装飾品が二つになっており武器と(以下略)
  # ※面倒なので防具全般に対応
  #--------------------------------------------------------------------------
  def auto_unequip_armor(arm_id)
    if !@armors_weapon[0] && @armor1_id == arm_id
      equip(1, 0)
    end
    if !@armors_weapon[1] && @armor2_id == arm_id
      equip(2, 0)
    end
    if !@armors_weapon[2] && @armor6_id == arm_id
      equip(6, 0)
    end
    if !@armors_weapon[3] && @armor3_id == arm_id
      equip(3, 0)
    end
    if !@armors_weapon[4] && @armor4_id == arm_id
      equip(4, 0)
    end
    if !@armors_weapon[5] && @armor5_id == arm_id
      equip(5, 0)
    end
    if !@armors_weapon[6] && @armor7_id == arm_id
      equip(7, 0)
    end
    if !@armors_weapon[7] && @armor8_id == arm_id
      equip(8, 0)
    end
  end
  #--------------------------------------------------------------------------
  # ● 装備の全解除
  #--------------------------------------------------------------------------
  def unequip_all
    # 武器 + 防具全部を解除したいので 防具装備箇所に武器装備しているか
    # のサイズを含んだ分ループを廻して外していく
    for i in 0..@armors_weapon.size
      equip(i, 0)
    end
  end
  #--------------------------------------------------------------------------
  # ● 装備の変更
  #     equip_type : 装備タイプ
  #     id         : 武器 or 防具 ID  (0 なら装備解除)
  #     wep_flg    : 武器フラグ
  #--------------------------------------------------------------------------
  def equip(equip_type, id, wep_flg = false)
    # アナライズ装備用スイッチ番号
    $game_switches[DIA_MM::ANA_FLG] = false
if $OuterFlgs["Price_Change_AB"]
    # 価値観の違いによる価格変動
    $game_system.price_off = 1
    $game_system.premium   = 1
end # $OuterFlgs["Price_Change_AB"]
    
    case equip_type
    when 0  # 武器
      if id == 0 || weapon_holded?(id)
        $game_party.gain_weapon(@weapon_id, 1)
        @weapon_id = id
        $game_party.lose_weapon(id, 1)
        # Two_Handed
        # 両手武器なら外される防具部位を外す
        # ただし、神の両腕を覚えている場合はその限りではない
        wep = $data_weapons[id]
        if id != 0 && wep != nil && 
          wep.element_set.include?(Tkl2K_2_XP::TWO_HANDED) && 
          !@ability_skill.include?(TwoHanded::GOD_HAND_ID)
          exor_id = Multi_Blade::TWO_HAND_EXORs[0]
          # 両手持ち武器で外される部位が武器というのは異常
          if exor_id == 0
            p "外される装備箇所が異常です。"
          else
            armor_id = get_armors_id_list[exor_id - 1]
            if !@armors_weapon[exor_id - 1]
              update_auto_state($data_armors[armor_id], $data_armors[0])
              $game_party.gain_armor(armor_id, 1)
            else
              $game_party.gain_weapon(armor_id, 1)
            end
            case exor_id
            when 1; @armor1_id = 0
            when 2; @armor2_id = 0
            when 3; @armor6_id = 0
            when 4; @armor3_id = 0
            when 5; @armor4_id = 0
            when 6; @armor5_id = 0
            when 7; @armor7_id = 0
            when 8; @armor8_id = 0
            end
          end
        end
        # Two_Handed
      end
    else # 防具
      arm_list = get_armors_id_list
      if id == 0 || (wep_flg && weapon_holded?(id)) || (!wep_flg && armor_holded?(id))
        a1 = @armors_weapon[equip_type - 1] ? 0 : arm_list[equip_type - 1]
        a2 = wep_flg ? 0 : id
        if a1 != 0 && a2 != 0
          update_auto_state($data_armors[a1], $data_armors[a2])
        end
        if @armors_weapon[equip_type - 1]
          $game_party.gain_weapon(arm_list[equip_type - 1], 1)
        else
          $game_party.gain_armor(arm_list[equip_type - 1], 1)
        end
        @armors_weapon[equip_type - 1] = wep_flg
        case equip_type
        when 1; @armor1_id = id
        when 2; @armor2_id = id
        when 3; @armor6_id = id
        when 4; @armor3_id = id
        when 5; @armor4_id = id
        when 6; @armor5_id = id
        when 7; @armor7_id = id
        when 8; @armor8_id = id
        end
        if wep_flg
          $game_party.lose_weapon(id, 1)
        else
          $game_party.lose_armor(id, 1)
        end
        # Two_Handed
        # 両手武器装備なら外される防具部位を外す
        # ただし、神の両腕を覚えている場合はその限りではない
        if @armors_weapon[equip_type - 1]
          wep = $data_weapons[id]
        end
        if id != 0 && wep != nil && 
          wep.element_set.include?(Tkl2K_2_XP::TWO_HANDED) && 
          !@ability_skill.include?(TwoHanded::GOD_HAND_ID)
          exor_id = Multi_Blade::TWO_HAND_EXORs[equip_type]
          # 両手持ち武器で外される部位が装備箇所と同じというのは異常
          if exor_id == equip_type
            p "外される装備箇所が異常です。"
          else
            if exor_id == 0
              $game_party.gain_weapon(@weapon_id, 1)
              @weapon_id = 0
            else
              armor_id = @armors_weapon[exor_id - 1] ? 0 : arm_list[exor_id - 1]
              if !@armors_weapon[exor_id - 1]
                update_auto_state($data_armors[armor_id], $data_armors[0])
                $game_party.gain_armor(armor_id, 1)
              else
                $game_party.gain_weapon(armor_id, 1)
              end
              case exor_id
              when 1; @armor1_id = 0
              when 2; @armor2_id = 0
              when 3; @armor6_id = 0
              when 4; @armor3_id = 0
              when 5; @armor4_id = 0
              when 6; @armor5_id = 0
              when 7; @armor7_id = 0
              when 8; @armor8_id = 0
              end
            end
          end
        end
        # Two_Handed
      end
    end
    
    # 特殊装備
    for actor in $game_party.actors
      next if actor.id == @actor.id
      # アナライズ装備用
      if actor.armor7_id == DIA_MM::ANA_ACC
        $game_switches[DIA_MM::ANA_FLG] = true
      end
if $OuterFlgs["Price_Change_AB"]
      if actor.armor7_id == DIA_PC::PC_ACC
        $game_system.price_off = 2
        #$game_system.premium   = 2
      end
end # if $OuterFlgs["Price_Change_AB"]
    end
    
    $game_map.refresh
  end
  #--------------------------------------------------------------------------
  # ● 鎧に指定された属性が含まれているか?
  #    アクターの場合
  #--------------------------------------------------------------------------
  def armor_element_include?(element_id)
    
    list = get_armors_id_list
    for i in 0...@armors_weapon.size
      if !@armors_weapon[i]
        armor = $data_armors[list[i]]
        if armor != nil && armor.guard_element_set.include?(element_id)
          return true
        end
      end
    end
    
    return false
  end
  #--------------------------------------------------------------------------
  # ● 多刀流の武器属性取得
  #    index : 防具インデックス
  #--------------------------------------------------------------------------
  def element_set2(index)
    # インデックス異常
    if index < 0 || index > @armors_weapon.size
      p "トーマ、トーマ、インデックスが異常なんだよ"
      return []
    end
    
    if @armors_weapon[index]
      weapon = $data_weapons[index]
      return weapon != nil ? weapon.element_set : []
    else
      # 防具の場合、空リストを返す
      return []
    end
  end
  #--------------------------------------------------------------------------
  # ● 多刀流の全武器属性取得
  #--------------------------------------------------------------------------
  def element_set_mlt_all
    ele_set = []
    for i in 0...@armors_weapon.size
      ele_set += element_set2(i)
    end
    return ele_set.uniq
  end
end

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # ● 鎧に指定された属性が含まれているか?
  #    エネミーの場合は必ずfalse
  #--------------------------------------------------------------------------
  def armor_element_include?(element_id)
    return false
  end
end

class Window_EquipRight < Window_Selectable
  include DIAMOND
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = []
    
    arm_list = [@actor.armor1_id, @actor.armor2_id, @actor.armor6_id, 
                @actor.armor3_id, @actor.armor4_id, @actor.armor5_id, 
                @actor.armor7_id]
    
    # 武器
    @data.push($data_weapons[@actor.weapon_id])
    
    for i in 0...@actor.armors_weapon.size
      if @actor.armors_weapon[i]
        @data.push($data_weapons[arm_list[i]])
      else
        @data.push($data_armors[arm_list[i]])
      end
    end
    
    @item_max = @data.size
    self.contents.font.color = system_color
    
    draw_shadow_text([0, 32 * 0, 92, 32], Vocab::weapon, system_color)
    text = @actor.armors_weapon[0] ? Vocab::weapon : Vocab::armor1
    draw_shadow_text([0, 32 * 1, 92, 32], text,          system_color)
    text = @actor.armors_weapon[1] ? Vocab::weapon : Vocab::armor2
    draw_shadow_text([0, 32 * 2, 92, 32], text,          system_color)
    text = @actor.armors_weapon[2] ? Vocab::weapon : Vocab::armor5
    draw_shadow_text([0, 32 * 3, 92, 32], text,          system_color)
    text = @actor.armors_weapon[3] ? Vocab::weapon : Vocab::armor3
    draw_shadow_text([0, 32 * 4, 92, 32], text,          system_color)
    text = @actor.armors_weapon[4] ? Vocab::weapon : Vocab::armor4
    draw_shadow_text([0, 32 * 5, 92, 32], text,          system_color)
    text = @actor.armors_weapon[5] ? Vocab::weapon : Vocab::armor4
    draw_shadow_text([0, 32 * 6, 92, 32], text,          system_color)
    text = @actor.armors_weapon[6] ? Vocab::weapon : Vocab::armor6
    draw_shadow_text([0, 32 * 7, 92, 32], text,          system_color)
    
    for i in 0..7
      draw_item_name(@data[i], 80, 32 * i)
    end
  end#--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = []
    
    arm_list = [@actor.armor1_id, @actor.armor2_id, @actor.armor6_id, 
                @actor.armor3_id, @actor.armor4_id, @actor.armor5_id, 
                @actor.armor7_id, @actor.armor8_id]
    
    # 武器
    @data.push($data_weapons[@actor.weapon_id])
    
    for i in 0...@actor.armors_weapon.size
      if @actor.armors_weapon[i]
        @data.push($data_weapons[arm_list[i]])
      else
        @data.push($data_armors[arm_list[i]])
      end
    end
        
    @item_max = @data.size
    self.contents.font.color = system_color
    
    draw_shadow_text([0, 32 * 0, 92, 32], Vocab::weapon, system_color)
    text = @actor.armors_weapon[0] ? Vocab::weapon : Vocab::armor1
    draw_shadow_text([0, 32 * 1, 92, 32], text,          system_color)
    text = @actor.armors_weapon[1] ? Vocab::weapon : Vocab::armor2
    draw_shadow_text([0, 32 * 2, 92, 32], text,          system_color)
    text = @actor.armors_weapon[2] ? Vocab::weapon : Vocab::armor5
    draw_shadow_text([0, 32 * 3, 92, 32], text,          system_color)
    text = @actor.armors_weapon[3] ? Vocab::weapon : Vocab::armor3
    draw_shadow_text([0, 32 * 4, 92, 32], text,          system_color)
    text = @actor.armors_weapon[4] ? Vocab::weapon : Vocab::armor4
    draw_shadow_text([0, 32 * 5, 92, 32], text,          system_color)
    text = @actor.armors_weapon[5] ? Vocab::weapon : Vocab::armor4
    draw_shadow_text([0, 32 * 6, 92, 32], text,          system_color)
    text = @actor.armors_weapon[6] ? Vocab::weapon : Vocab::armor6
    draw_shadow_text([0, 32 * 7, 92, 32], text,          system_color)
    text = @actor.armors_weapon[7] ? Vocab::weapon : Vocab::armor7
    draw_shadow_text([0, 32 * 8, 92, 32], text,          system_color)
    
    for i in 0..8
      draw_item_name(@data[i], 80, 32 * i)
    end
  end
end
=begin
class Window_Status < Window_Base
  include BM
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 196, 0)
    draw_actor_parameter(@actor, 96, 220, 1)
    draw_actor_parameter(@actor, 96, 244, 2)
    draw_actor_parameter(@actor, 96, 296, 3)
    draw_actor_parameter(@actor, 96, 320, 4)
    draw_actor_parameter(@actor, 96, 344, 5)
    draw_actor_parameter(@actor, 96, 368, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 48, 80, 32, Vocab::EXP_WORD)
    self.contents.draw_text(320, 80, 80, 32, Vocab::NEXT_WORD)
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, Vocab::equip)
    
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 144)
    # 盾
    equip_item = @actor.armors_weapon[0] ? $data_weapons[@actor.armor1_id] : $data_armors[@actor.armor1_id]
    draw_item_name(equip_item,                      320 + 16, 176)
    # 兜
    equip_item = @actor.armors_weapon[1] ? $data_weapons[@actor.armor2_id] : $data_armors[@actor.armor2_id]
    draw_item_name(equip_item,                      320 + 16, 208)
    # インナー
    equip_item = @actor.armors_weapon[2] ? $data_weapons[@actor.armor6_id] : $data_armors[@actor.armor6_id]
    draw_item_name(equip_item,                      320 + 16, 240)
    # 鎧
    equip_item = @actor.armors_weapon[3] ? $data_weapons[@actor.armor3_id] : $data_armors[@actor.armor3_id]
    draw_item_name(equip_item,                      320 + 16, 272)
    # 装飾品1
    equip_item = @actor.armors_weapon[4] ? $data_weapons[@actor.armor4_id] : $data_armors[@actor.armor4_id]
    draw_item_name(equip_item,                      320 + 16, 304)
    # 装飾品2
    equip_item = @actor.armors_weapon[5] ? $data_weapons[@actor.armor5_id] : $data_armors[@actor.armor5_id]
    draw_item_name(equip_item,                      320 + 16, 336)
    # 特殊
    equip_item = @actor.armors_weapon[6] ? $data_weapons[@actor.armor7_id] : $data_armors[@actor.armor7_id]
    draw_item_name(equip_item,                      320 + 16, 368)
  end
end

class Window_ShopStatus < Window_Base
  include BM
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    if @item == nil
      return
    end
    case @item
    when RPG::Item
      number = $game_party.item_number(@item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(@item.id)
    when RPG::Armor
      number = $game_party.armor_number(@item.id)
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 200, 32, Vocab::STAND_WORD)
    self.contents.font.color = normal_color
    self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
    if @item.is_a?(RPG::Item)
      return
    end
    # 装備品追加情報
    for i in 0...$game_party.actors.size
      # アクターを取得
      actor = $game_party.actors[i]
      # 装備可能なら通常文字色に、不可能なら無効文字色に設定
      if actor.equippable?(@item)
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      # アクターの名前を描画
      self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
      # 現在の装備品を取得
      if @item.is_a?(RPG::Weapon)
        item1 = $data_weapons[actor.weapon_id]
      elsif @item.kind == 0
        item1 = actor.armors_weapon[0] ? $data_weapons[actor.armor1_id] : $data_armors[actor.armor1_id]
      elsif @item.kind == 1
        item1 = actor.armors_weapon[1] ? $data_weapons[actor.armor2_id] : $data_armors[actor.armor2_id]
      elsif @item.kind == 2
if $OuterFlgs["Equip_Extend"]
        if @item != nil && @item.guard_element_set.include?(Equip_Extend::INNER_ARM)
          item1 = actor.armors_weapon[2] ? $data_weapons[actor.armor6_id] : $data_armors[actor.armor6_id]
        else
          item1 = actor.armors_weapon[3] ? $data_weapons[actor.armor3_id] : $data_armors[actor.armor3_id]
        end
else # 元の処理
        item1 = actor.armors_weapon[3] ? $data_weapons[actor.armor3_id] : $data_armors[actor.armor3_id]
end # $OuterFlgs["Equip_Extend"]
      else
if $OuterFlgs["Equip_Extend"]
        if @item != nil && @item.guard_element_set.include?(Equip_Extend::EXTRA_ACC)
          item1 = actor.armors_weapon[6] ? $data_weapons[actor.armor7_id] : $data_armors[actor.armor7_id]
        else
          item1 = actor.armors_weapon[4] ? $data_weapons[actor.armor4_id] : $data_armors[actor.armor4_id]
        end
else # 元の処理
        item1 = actor.armors_weapon[4] ? $data_weapons[actor.armor4_id] : $data_armors[actor.armor4_id]
end # $OuterFlgs["Equip_Extend"]
      end
      # 装備可能な場合
      if actor.equippable?(@item)
        # 武器の場合
        if @item.is_a?(RPG::Weapon)
          atk1 = item1 != nil ? item1.atk : 0
          atk2 = @item != nil ? @item.atk : 0
          change = atk2 - atk1
        end
        # 防具の場合
        if @item.is_a?(RPG::Armor)
          pdef1 = item1 != nil ? item1.pdef : 0
          mdef1 = item1 != nil ? item1.mdef : 0
          pdef2 = @item != nil ? @item.pdef : 0
          mdef2 = @item != nil ? @item.mdef : 0
          change = pdef2 - pdef1 + mdef2 - mdef1
        end
        # パラメータの変化値を描画
        self.contents.draw_text(124, 64 + 64 * i, 112, 32,
          sprintf("%+d", change), 2)
      end
      # アイテムを描画
      if item1 != nil
        x = 4
        y = 64 + 64 * i + 32
        bitmap = RPG::Cache.icon(item1.icon_name)
        opacity = self.contents.font.color == normal_color ? MAX8BIT : HARF8BIT
        self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
        self.contents.draw_text(x + 28, y, 212, 32, item1.name)
      end
    end
  end
end
=end

class Scene_Battle
  
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      Sound.play_cancel
      # 前のアクターのコマンド入力へ
      phase3_prior_actor
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アクターコマンドウィンドウのカーソル位置で分岐
      case @actor_command_window.index
      when 0  # 攻撃
        # 決定 SE を演奏
        Sound.play_ok
        # アクションを設定
        @active_battler.current_action.kind  = 0
        @active_battler.current_action.basic = 0
        
        next_actor = false
if $OuterFlgs["Tkl_2K_2_XP"]
        # 全体攻撃属性の場合、エネミーの選択をスキップ
        if @active_battler.element_set.include?(Tkl2K_2_XP::ALLIZE_ATTACK)
          next_actor = true
        end
        # Multi_Blade
        # 多刀流かつ全体攻撃属性をサーチ & エネミーの選択をスキップ
        for i in 0...@active_battler.armors_weapon.size
          if (@active_battler.armors_weapon[i] && 
            @active_battler.element_set2(i).include?(Tkl2K_2_XP::ALLIZE_ATTACK))
            next_actor = true
            break
          end
        end
        # Multi_Blade
end # $OuterFlgs["Tkl_2K_2_XP"]
        if next_actor
          # 次のアクターのコマンド入力へ
          phase3_next_actor
        else
          # エネミーの選択を開始
          start_enemy_select
        end
      when 1  # スキル
        # 決定 SE を演奏
        Sound.play_ok
        # アクションを設定
        @active_battler.current_action.kind = 1
        # スキルの選択を開始
        start_skill_select
      when 2  # 防御
        # 決定 SE を演奏
        Sound.play_ok
        # アクションを設定
        @active_battler.current_action.kind  = 0
        @active_battler.current_action.basic = 1
        # 次のアクターのコマンド入力へ
        phase3_next_actor
      when 3  # アイテム
        # 決定 SE を演奏
        Sound.play_ok
        # アクションを設定
        @active_battler.current_action.kind = 2
        # アイテムの選択を開始
        start_item_select
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アクターコマンドフェーズ : スキル選択)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
    # スキルウィンドウを可視状態にする
    @skill_window.show
    # スキルウィンドウを更新
    @skill_window.update
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      Sound.play_cancel
      # スキルの選択を終了
      end_skill_select
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # スキルウィンドウで現在選択されているデータを取得
      @skill = @skill_window.skill
      # 使用できない場合
      if @skill == nil || !@active_battler.skill_can_use?(@skill.id)
        # Multi_Blade
        # 多刀装備で他に武器を装備していない場合
        if !@active_battler.armors_weapon.include?(true)
          # ブザー SE を演奏
          Sound.play_buzzer
          return
        end
        # 武器ID退避
        weapon_id = @active_battler.weapon_id
        # 多刀装備分確認
        armlist = get_armors_id_list(@active_battler)
        for i in 0...@active_battler.armors_weapon.size
          if @active_battler.armors_weapon[i]
            @active_battler.weapon_id = arm_list[i]
            if !@active_battler.skill_can_use?(@skill.id)
              # ブザー SE を演奏
              Sound.play_buzzer
              @active_battler.weapon_id = weapon_id
              return
            end
          end
        end
        
        @active_battler.weapon_id = weapon_id
        # Multi_Blade
      end
      # 決定 SE を演奏
      Sound.play_ok
      # アクションを設定
      @active_battler.current_action.skill_id = @skill.id
      # スキルウィンドウを不可視状態にする
      @skill_window.hide
      # 効果範囲が敵単体の場合
      if @skill.scope == 1
        # エネミーの選択を開始
        start_enemy_select
      # 効果範囲が味方単体の場合
      elsif @skill.scope == 3 or @skill.scope == 5
        # アクターの選択を開始
        start_actor_select
      # 効果範囲が単体ではない場合
      else
        # スキルの選択を終了
        end_skill_select
        # 次のアクターのコマンド入力へ
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● スキルアクション 結果作成
  #--------------------------------------------------------------------------
  ★★★ Change_Window_Skill 参照  ★★★
  
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  #--------------------------------------------------------------------------
  alias multi_blade_update_phase4_step1 update_phase4_step1
  def update_phase4_step1
    # 攻撃側アニメーション実行フラグを寝かせる
    @anime1_execute = false
    
    # 多刀流用、攻撃箇所フラグ初期化
    @mlt_blade_atked = [false, false, false, false, false, false, false, false]
    
    # 呼び戻す
    multi_blade_update_phase4_step1
    
    # 行動側バトラーがアクターの場合
    if @active_battler.is_a?(Game_Actor)
      # 多刀流用、装備保存
      @weapon_id_tmp = @active_battler.weapon_id
      @armor1_id_tmp = @active_battler.armor1_id
      @armor2_id_tmp = @active_battler.armor2_id
      @armor3_id_tmp = @active_battler.armor3_id
      @armor4_id_tmp = @active_battler.armor4_id
      @armor5_id_tmp = @active_battler.armor5_id
      @armor6_id_tmp = @active_battler.armor6_id
      @armor7_id_tmp = @active_battler.armor7_id
      @armor8_id_tmp = @active_battler.armor8_id
    end
  end
  
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  #--------------------------------------------------------------------------
  def update_phase4_step2
    # 強制アクションでなければ
    unless @active_battler.current_action.forcing
      # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
      if @active_battler.restriction == 2 || @active_battler.restriction == 3
        # アクションに攻撃を設定
        @active_battler.current_action.kind  = 0
        @active_battler.current_action.basic = 0
      end
      # 制約が [行動できない] の場合
      if @active_battler.restriction == 4
        # アクション強制対象のバトラーをクリア
        $game_temp.forcing_battler = nil
        # ステップ 1 に移行
        @phase4_step = 1
        return
      end
    end
    # 対象バトラーをクリア
    @target_battlers = []
    # アクションの種別で分岐
    case @active_battler.current_action.kind
    when 0  # 基本
      make_basic_action_result
    when 1  # スキル
      make_skill_action_result
    when 2  # アイテム
      make_item_action_result
    end
    if @phase4_step == 2
      # 2回目の攻撃は、行動側アニメーション、対象側アニメーションをスキップ
      # Multi_Attack/Rand_Select
      if @attakked_num == 0 || @selected_num < $game_system.sel_num
        # 行動側アニメーションは一回だけ実行
        if !@anime1_execute
          # 本来の処理
          # ステップ 3 に移行
          @phase4_step = 3
        else
          # ステップ 4 に移行
          @phase4_step = 4
        end
      else
        # ステップ 5 に移行
        @phase4_step = 5
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # ステップ 3 : 行動側アニメーション実行フラグをセット
    @anime1_execute = true
    # 行動側アニメーション (ID が 0 の場合は白フラッシュ)
    if @animation1_id == 0
      @active_battler.white_flash = true
    else
      @active_battler.animation_id = @animation1_id
      @active_battler.animation_hit = true
    end
    # ステップ 4 に移行
    @phase4_step = 4
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示)
  #--------------------------------------------------------------------------
  ★★★ Surume_2K_2_XP 参照  ★★★
  
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  #--------------------------------------------------------------------------
  alias multi_blade_update_phase4_step6 update_phase4_step6
  def update_phase4_step6
    # 行動側バトラーがアクターの場合
    if @active_battler.is_a?(Game_Actor)
      # 多刀流用、装備戻し
      @active_battler.weapon_id = @weapon_id_tmp
      @active_battler.armor1_id = @armor1_id_tmp
      @active_battler.armor2_id = @armor2_id_tmp
      @active_battler.armor3_id = @armor3_id_tmp
      @active_battler.armor4_id = @armor4_id_tmp
      @active_battler.armor5_id = @armor5_id_tmp
      @active_battler.armor6_id = @armor6_id_tmp
      @active_battler.armor7_id = @armor7_id_tmp
      @active_battler.armor8_id = @armor8_id_tmp
    end
    
    # 呼び戻す
    multi_blade_update_phase4_step6
    
  end
end
class Window_EquipItem < Window_Selectable
  include RUBY_SYS
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor      : アクター
  #     equip_type : 装備部位 (0〜7)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(272, 288, 368, 192)
    #super(0, 288, 640, 192) #装飾品が2つの場合
    #super(0, 256, 640, 224)
    @actor      = actor
    @equip_type = equip_type
    @column_max = 1
    #@column_max = 2
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  ★★★ クラス詳細化 + 進化 参照  ★★★
  
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    #x = 4 + index % 2 * (288 + 32)
    x = 4
    #y = index / 2 * 32
    y = index * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    #self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    draw_ex_text(x + 28, y, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Scene_Equip
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # アクターを取得
    @actor = $game_party.actors[@actor_index]
    # ウィンドウを作成
if $imported["HelpExtension"]
    @help_window  = Window_HelpExtension.new
else
    @help_window  = Window_Help.new
end
    @left_window  = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0) # 武器
    @item_window2 = Window_EquipItem.new(@actor, 1) # 盾
    @item_window3 = Window_EquipItem.new(@actor, 2) # 兜
    @item_window4 = Window_EquipItem.new(@actor, 3) # インナー
    @item_window5 = Window_EquipItem.new(@actor, 4) # ヨロイ
    @item_window6 = Window_EquipItem.new(@actor, 5) # 装飾品1
    @item_window7 = Window_EquipItem.new(@actor, 6) # 装飾品2
    @item_window8 = Window_EquipItem.new(@actor, 7) # 特殊
    @item_window9 = Window_EquipItem.new(@actor, 8) # 靴
    # ヘルプウィンドウを関連付け
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    @item_window6.help_window = @help_window
    @item_window7.help_window = @help_window
    @item_window8.help_window = @help_window
    @item_window9.help_window = @help_window
    # カーソル位置を設定
    @right_window.index = @equip_index
    refresh
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
    @item_window6.dispose
    @item_window7.dispose
    @item_window8.dispose
    @item_window9.dispose
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    # アイテムウィンドウの可視状態設定
    @item_window1.visible = (@right_window.index == 0) # 武器
    @item_window2.visible = (@right_window.index == 1) # 盾
    @item_window3.visible = (@right_window.index == 2) # 兜
    @item_window4.visible = (@right_window.index == 3) # インナー
    @item_window5.visible = (@right_window.index == 4) # ヨロイ
    @item_window6.visible = (@right_window.index == 5) # 装飾品1
    @item_window7.visible = (@right_window.index == 6) # 装飾品2
    @item_window8.visible = (@right_window.index == 7) # 特殊
    @item_window9.visible = (@right_window.index == 8) # 靴
    # 現在装備中のアイテムを取得
    item1 = @right_window.item
    # 現在のアイテムウィンドウを @item_window に設定
    case @right_window.index
    when 0 # 武器
      @item_window = @item_window1
    when 1 # 盾
      @item_window = @item_window2
    when 2 # 兜
      @item_window = @item_window3
    when 3 # インナー
      @item_window = @item_window4
      @item_window.refresh
    when 4 # ヨロイ
      @item_window = @item_window5
      @item_window.refresh
    when 5, 6 # 装飾品
      if @right_window.index == 5
        @item_window = @item_window6
      else
        @item_window = @item_window7
      end
      @item_window.refresh
    when 7 # 特殊
      @item_window = @item_window8
      @item_window.refresh
    when 8 # 靴
      @item_window = @item_window9
      @item_window.refresh
    end
    # ライトウィンドウがアクティブの場合
    if @right_window.active
      # 装備変更後のパラメータを消去
      @left_window.set_new_parameters(nil, nil, nil)
    end
    # アイテムウィンドウがアクティブの場合
    if @item_window.active
      # 現在選択中のアイテムを取得
      item2 = @item_window.item
      
      # Multi_Blade
      # 武器と防具も取得
      weapon_id = @actor.weapon_id
      armor1_id = @actor.armor1_id
      armor2_id = @actor.armor2_id
      armor3_id = @actor.armor3_id
      armor4_id = @actor.armor4_id
      armor5_id = @actor.armor5_id
      armor6_id = @actor.armor6_id
      armor7_id = @actor.armor7_id
      armor8_id = @actor.armor8_id
      armors_weapon = @actor.armors_weapon
      # Multi_Blade
      
      # 装備を変更
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, 
                   item2 == nil ? 0 : item2.id, 
                   item2 == nil ? false : item2.is_a?(RPG::Weapon))
      
      # 装備変更後のパラメータを取得
      new_str  = @actor.str
      new_dex  = @actor.dex
      new_agi  = @actor.agi
      new_int  = @actor.int
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      Sound.play_cancel
      # ライトウィンドウをアクティブ化
      @right_window.activate
      @item_window.deactivate
      @item_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備 SE を演奏
      Sound.play_equip
      # アイテムウィンドウで現在選択されているデータを取得
      item = @item_window.item
      # 装備を変更
      @actor.equip(@right_window.index, 
                   item == nil ? 0 : item.id, 
                   item == nil ? false : item.is_a?(RPG::Weapon))
      #追加
      @actor.update_auto_state(nil, $data_armors[@actor.armor1_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor2_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor3_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor4_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor5_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor6_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor7_id])
      @actor.update_auto_state(nil, $data_armors[@actor.armor8_id])
      #追加
      # ライトウィンドウをアクティブ化
      @right_window.activate
      @item_window.deactivate
      @item_window.index = -1
      # ライトウィンドウ、アイテムウィンドウの内容を再作成
      @right_window.refresh
      @item_window.refresh
      # 両手武器のため、武器のなら盾、盾なら武器のウィンドウも再作成
      if @right_window.index == 0
        @item_window2.refresh
      end
      if @right_window.index == 1
        @item_window1.refresh
      end
      return
    end
  end
end

class Window_Skill < Window_Selectable
  include BM
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    # Multi_Blade
    weapon_id = @actor.weapon_id
    for i in 0...@actor.armors_weapon.size
      if @actor.armors_weapon[i]
        case
        when 0; @actor.weapon_id = @actor.armor1_id
        when 1; @actor.weapon_id = @actor.armor2_id
        when 2; @actor.weapon_id = @actor.armor6_id
        when 3; @actor.weapon_id = @actor.armor3_id
        when 4; @actor.weapon_id = @actor.armor4_id
        when 5; @actor.weapon_id = @actor.armor5_id
        when 6; @actor.weapon_id = @actor.armor7_id
        when 7; @actor.weapon_id = @actor.armor8_id
        end
        if @actor.skill_can_use?(skill.id)
          self.contents.font.color = normal_color
        else
          self.contents.font.color = disabled_color
        end
        @actor.weapon_id = weapon_id
      end
    end
    # Multi_Blade
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, NILCOLOR)
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? MAX8BIT : HARF8BIT
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
end

class Interpreter
  #--------------------------------------------------------------------------
  # ● 条件分岐
  #--------------------------------------------------------------------------
  def command_111
    # ローカル変数 result を初期化
    result = false
    # 条件判定
    case @parameters[0]
    when 0  # スイッチ
      result = ($game_switches[@parameters[1]] == (@parameters[2] == 0))
    when 1  # 変数
      value1 = $game_variables[@parameters[1]]
      if @parameters[2] == 0
        value2 = @parameters[3]
      else
        value2 = $game_variables[@parameters[3]]
      end
      case @parameters[4]
      when 0  # と同値
        result = (value1 == value2)
      when 1  # 以上
        result = (value1 >= value2)
      when 2  # 以下
        result = (value1 <= value2)
      when 3  # 超
        result = (value1 > value2)
      when 4  # 未満
        result = (value1 < value2)
      when 5  # 以外
        result = (value1 != value2)
      end
    when 2  # セルフスイッチ
      if @event_id > 0
        key = [$game_map.map_id, @event_id, @parameters[1]]
        if @parameters[2] == 0
          result = ($game_self_switches[key] == true)
        else
          result = ($game_self_switches[key] != true)
        end
      end
    when 3  # タイマー
      if $game_system.timer_working
        sec = $game_system.timer / Graphics.frame_rate
        if @parameters[2] == 0
          result = (sec >= @parameters[1])
        else
          result = (sec <= @parameters[1])
        end
      end
    when 4  # アクター
      actor = $game_actors[@parameters[1]]
      if actor != nil
        case @parameters[2]
        when 0  # パーティにいる
          result = ($game_party.actors.include?(actor))
        when 1  # 名前
          result = (actor.name == @parameters[3])
        when 2  # スキル
          result = (actor.skill_learn?(@parameters[3]))
        when 3  # 武器
          result = ((actor.weapon_id == @parameters[3]) ||
                    (actor.armors_weapon[0] && actor.armor1_id == @parameters[3]) ||
                    (actor.armors_weapon[1] && actor.armor2_id == @parameters[3]) ||
                    (actor.armors_weapon[2] && actor.armor6_id == @parameters[3]) ||
                    (actor.armors_weapon[3] && actor.armor3_id == @parameters[3]) || 
                    (actor.armors_weapon[4] && actor.armor4_id == @parameters[3]) || 
                    (actor.armors_weapon[5] && actor.armor5_id == @parameters[3]) || 
                    (actor.armors_weapon[6] && actor.armor7_id == @parameters[3]) || 
                    (actor.armors_weapon[7] && actor.armor8_id == @parameters[3]))
        when 4  # 防具
          result = ((!actor.armors_weapon[0] && actor.armor1_id == @parameters[3]) ||
                    (!actor.armors_weapon[1] && actor.armor2_id == @parameters[3]) ||
                    (!actor.armors_weapon[2] && actor.armor6_id == @parameters[3]) ||
                    (!actor.armors_weapon[3] && actor.armor3_id == @parameters[3]) || 
                    (!actor.armors_weapon[4] && actor.armor4_id == @parameters[3]) || 
                    (!actor.armors_weapon[5] && actor.armor5_id == @parameters[3]) || 
                    (!actor.armors_weapon[6] && actor.armor7_id == @parameters[3]) || 
                    (!actor.armors_weapon[7] && actor.armor8_id == @parameters[3]))
        when 5  # ステート
          result = (actor.state?(@parameters[3]))
        end
      end
    when 5  # エネミー
      enemy = $game_troop.enemies[@parameters[1]]
      if enemy != nil
        case @parameters[2]
        when 0  # 出現している
          result = (enemy.exist?)
        when 1  # ステート
          result = (enemy.state?(@parameters[3]))
        end
      end
    when 6  # キャラクター
      character = get_character(@parameters[1])
      if character != nil
        result = (character.direction == @parameters[2])
      end
    when 7  # ゴールド
      if @parameters[2] == 0
        result = ($game_party.gold >= @parameters[1])
      else
        result = ($game_party.gold <= @parameters[1])
      end
    when 8  # アイテム
      result = ($game_party.item_number(@parameters[1]) > 0)
    when 9  # 武器
      result = ($game_party.weapon_number(@parameters[1]) > 0)
    when 10  # 防具
      result = ($game_party.armor_number(@parameters[1]) > 0)
    when 11  # ボタン
      result = (Input.press?(@parameters[1]))
    when 12  # スクリプト
      result = eval(@parameters[1])
    end
    # 判定結果をハッシュに格納
    @branch[@list[@index].indent] = result
    # 判定結果が真だった場合
    if @branch[@list[@index].indent] == true
      # 分岐データを削除
      @branch.delete(@list[@index].indent)
      # 継続
      return true
    end
    # 条件に該当しない場合 : コマンドスキップ
    return command_skip
  end
end
〜使い方〜 多刀流設定にて何刀流にするかのスキルIDと武器を装備する場合に外される防具の箇所を設定します。 ※設定したスキルを習得することで多刀流になることができます。 両手持ち武器を装備しようとする際に装備が外される部位リストにて両手持ち武器を装備すると 該当する防具が自動的に解除されるようになります。 ただし、『神の両腕』のIDが付与されたスキルを習得している場合、両手持ち武器を片手で装備することが 可能になります。(デモンゲイズのアレ) 拡張装備について 鎧にインナーの属性IDを付与することで二種類の鎧を装備することが可能 装飾品は二個装備可能になっており、更に特殊の属性IDを付与することで特殊装備として三つ目の装飾品も装備可能です

戻る