QQ截图20150329220828.jpg (46.4 KB, 下载次数: 21)
#============================================================================== # +++ 改变装备的装配方法 +++ #============================================================================== # 作者 三途亚梦 # 如要使用此脚本,请署名。 # 脚本原地址:[url]https://rpg.blue/thread-377080-1-1.html[/url] #============================================================================== # 本脚本的默认作用是让装备改成任意位置可装备。 #============================================================================== # ■ Game_Actor #------------------------------------------------------------------------------ # 管理角色的类。 # 本类在 Game_Actors 类 ($game_actors) 的内部使用。 # 具体使用请查看 Game_Party 类 ($game_party) 。 #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 更换装备 # slot_id : 装备栏 ID # item : 武器/护甲(为 nil 时装备解除) #-------------------------------------------------------------------------- def change_equip(slot_id, item) return unless trade_item_with_party(item, equips[slot_id]) @equips[slot_id].object = item refresh end #-------------------------------------------------------------------------- # ● 卸下无法装备的物品 # item_gain : 卸下的装备是否保留 #-------------------------------------------------------------------------- def release_unequippable_items(item_gain = true) @equips.each_with_index do |item, i| if !equippable?(item.object) trade_item_with_party(nil, item.object) if item_gain item.object = nil end end end end #============================================================================== # ■ Window_EquipItem #------------------------------------------------------------------------------ # 装备画面中,显示可替换装备的窗口。 #============================================================================== class Window_EquipItem < Window_ItemList #-------------------------------------------------------------------------- # ● 查询使用列表中是否含有此物品 #-------------------------------------------------------------------------- def include?(item) return true end end
三途亚梦 发表于 2015-3-29 23:45
#==============================================================================
# +++ 改变装备的装配 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |