#============================================================================== # ■ VX-RGSS2-20 解体屋 [Ver.1.0.0] by Claimh #------------------------------------------------------------------------------ # ・武器/防具を解体して、素材(アイテム)を得ることができます。 #------------------------------------------------------------------------------ # ★解体屋の呼び出し方 # イベントスクリプトから call_dismantle # もしくは $scene = Scene_Dismantle.new #============================================================================== module Dismantle ### 設 定 ###################################################################### # 解体屋コマンド # 0:武器の解体 1:防具の解体 2:武器・防具の解体 3:店を出る COMMAND = [0, 1, 3] # 成功時のSE(nilならショップSE) SUCCESS_SE = RPG::SE.new("Sword2", 100, 100) # メッセージ表示 MESSAGE = true # 武器の解体設定 WEAPON = { # 武器ID => [解体料金, [[入手アイテムID, 入手個数], …]] 1 => [10, [[1,10]]], 2 => [300, [[2,2]]], 3 => [1500, [[1,1], [2,1]]] } # 防具の解体設定 ARMOR = { # 防具ID => [解体料金, [[入手アイテムID, 入手個数], …]] 1 => [20, [[3,2]]], 2 => [400, [[4,1], [5,1], [6,2]]], 3 => [2800, [[7,3], [8,1]]] } ################################################################################ #-------------------------------------------------------------------------- # ● コマンドリスト #-------------------------------------------------------------------------- def self.command text = ["#{$data_system.terms.weapon}の解体", "防具の解体", "#{$data_system.terms.weapon}・防具の解体", "やめる"] commands = [] for cmd in COMMAND commands.push(text[cmd]) end return commands end end #============================================================================== # ■ Game_Temp #============================================================================== class Game_Temp attr_accessor :call_dismantle alias initialize_dismantle initialize def initialize initialize_dismantle @call_dismantle = false end end #============================================================================== # ■ Game_Interpreter #============================================================================== class Game_Interpreter def call_dismantle $game_temp.next_scene = "shop" $game_temp.call_dismantle = true end end #============================================================================== # ■ Window_DismantleCmd #============================================================================== class Scene_Map alias call_dismantle call_shop def call_shop if $game_temp.call_dismantle $game_temp.next_scene = nil $game_temp.call_dismantle = false $scene = Scene_Dismantle.new else call_dismantle end end end