#============================================================================== # ○全身鎧 Ver1.00 # for RGSS2 # 西瓜 / Space not far # http://muspell.raindrop.jp/ # 本来の装備部位以外の場所にも装備できる防具を設定します。 #============================================================================== # 防具のメモ欄に<装備部位追加[追加部位のID配列]>という形式で記述してください。 # 1:盾 2:頭 3:身体 4:装飾品 となっています。 # <装備部位追加[1, 4]>なら盾と装飾品の部位に装備できるようになります。 class Window_EquipItem < Window_Item SNF_ADDREGION = "装備部位追加" #-------------------------------------------------------------------------- # ● アイテムをリストに含めるかどうか # item : アイテム #-------------------------------------------------------------------------- def include?(item) equippeble = false return true if item == nil if @equip_type == 0 equippable = true if item.is_a?(RPG::Weapon) # 武器でなければfalse else return false unless item.is_a?(RPG::Armor) # 防具でなければfalse memo = item.note.scan(/<#{SNF_ADDREGION}\[(\S+)\]>/) memo = memo[0][0].split(/\s*,\s*/) if memo != nil and not memo.empty? memo = memo.flatten if memo != nil and not memo.empty? for i in 0..memo.size equippable = true if memo[i].to_i == @equip_type end end equippable = true if item.kind == @equip_type - 1 end return false unless equippable return @actor.equippable?(item) end end