#============================================================================== # ショップで試着できるスクリプト ver1.00 #------------------------------------------------------------------------------ # [導入上の注意] # ショップで装備変更等のスクリプトを導入している場合、 # 本スクリプトの最下にある「Scene_Shop」を参考に改変してください。 # # 作成:ぶちょー # ホム:http://nyannyannyan.bake-neko.net # 著作:自分で作ったとか言わないで>< # 改造はご自由にどうぞ。 # リードミーとかに私の名前の載せたりするのは任意で。 #============================================================================== #============================================================================== # 設定項目 #============================================================================== module EquipTest EQUIP_TYPE_MAX = 5 # 装備部位の数 BUY_ALL = Input::X # 試着中のアイテムを買うキーボタン RESET = Input::Y # 試着中のアイテムをリセットするキーボタン # 装備箇所選択中にヘルプウィンドウに表示する文字列 HELP_TEXT = "X:試着中のアイテムを買う。Y:アイテムをリセットする。" end #============================================================================== # ここまで #============================================================================== #============================================================================== # ■ Scene_EquipTest #------------------------------------------------------------------------------ #  装備テストの処理を行うクラスです。 #============================================================================== class Scene_EquipTest < Scene_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index @equip_index = 0 @member = $game_party.members[actor_index] @actor = @member.clone @tester = @member.clone end #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background @help_window = Window_Help.new create_item_windows @equip_window = Window_EquipT.new(0, 56, @actor, @member) @equip_window.help_window = @help_window @equip_window.index = @equip_index @status_window = Window_EquipStatusT.new(@equip_window.width, 56, @tester, @member) @refresh_window = Window_Refresh.new(1) @money_window = Window_Money.new(@equip_window.width, 280, @tester, @member) @buy_all_window = Window_All.new(@tester, @member) end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- def terminate super dispose_menu_background @help_window.dispose @equip_window.dispose @status_window.dispose @refresh_window.dispose @money_window.dispose @buy_all_window.dispose dispose_item_windows end #-------------------------------------------------------------------------- # ● 元の画面へ戻る #-------------------------------------------------------------------------- def return_scene $scene = Scene_Shop.new end #-------------------------------------------------------------------------- # ● 次のアクターの画面に切り替え #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_EquipTest.new(@actor_index) end #-------------------------------------------------------------------------- # ● 前のアクターの画面に切り替え #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_EquipTest.new(@actor_index) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super update_menu_background update_status_window update_equip_window update_item_windows @money_window.update if @equip_window.active update_equip_selection elsif @item_window.active update_item_selection end update_refresh_window update_buy_all_window end #-------------------------------------------------------------------------- # ● 装備初期化ウィンドウの更新 #-------------------------------------------------------------------------- def update_refresh_window if @refresh_window.active @refresh_window.update if Input.trigger?(Input::C) Sound.play_equip if @refresh_window.index == 0 i = 0 for item in @member.equips @actor.change_equip(i, item, true) @tester.change_equip(i, item, true) i += 1 end @equip_window.refresh @status_window.refresh @money_window.refresh for i in 0...EquipTest::EQUIP_TYPE_MAX do @item_windows[i].refresh end end @refresh_window.close @equip_window.active = true elsif Input.trigger?(Input::B) Sound.play_cancel @refresh_window.close @equip_window.active = true end end end #-------------------------------------------------------------------------- # ● すべて購入ウィンドウの更新 #-------------------------------------------------------------------------- def update_buy_all_window if @buy_all_window.active @buy_all_window.update if Input.trigger?(Input::C) if @buy_all_window.index == 0 && @buy_all_window.can_buy Sound.play_shop i = -1 for item in @actor.equips i += 1 next if @member.equips.include?(item) $game_party.gain_item(item, 1) $game_party.gain_gold(item.price * -1) @actor.change_equip(i, item, true) @tester.change_equip(i, item, true) @member.change_equip(i, item) end @equip_window.refresh @status_window.refresh @money_window.refresh for i in 0...EquipTest::EQUIP_TYPE_MAX do @item_windows[i].refresh end else Sound.play_decision end @buy_all_window.close @equip_window.active = true elsif Input.trigger?(Input::B) Sound.play_cancel @buy_all_window.close @equip_window.active = true end end end #-------------------------------------------------------------------------- # ● アイテムウィンドウの作成 #-------------------------------------------------------------------------- def create_item_windows @item_windows = [] rect = Rect.new(0, 0, 336, 0) rect.y = 24 * EquipTest::EQUIP_TYPE_MAX + 88 rect.height = 416 - rect.y for i in 0...EquipTest::EQUIP_TYPE_MAX @item_windows[i] = Window_EquipItemT.new(rect, @actor, @member, i) @item_windows[i].help_window = @help_window @item_windows[i].visible = (@equip_index == i) @item_windows[i].active = false @item_windows[i].index = -1 end end #-------------------------------------------------------------------------- # ● アイテムウィンドウの解放 #-------------------------------------------------------------------------- def dispose_item_windows for window in @item_windows window.dispose end end #-------------------------------------------------------------------------- # ● ステータスウィンドウの更新 #-------------------------------------------------------------------------- def update_status_window if @equip_window.active @status_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil) elsif @item_window.active @tester.change_equip(@equip_window.index, @item_window.item, true) new_atk = @tester.atk new_def = @tester.def new_spi = @tester.spi new_agi = @tester.agi new_hit = @tester.hit new_eva = @tester.eva new_cri = @tester.cri @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi, new_hit, new_eva, new_cri) @money_window.refresh end @status_window.update end #-------------------------------------------------------------------------- # ● アイテムウィンドウの更新 #-------------------------------------------------------------------------- def update_item_windows for i in 0...EquipTest::EQUIP_TYPE_MAX @item_windows[i].visible = (@equip_window.index == i) @item_windows[i].update end @item_window = @item_windows[@equip_window.index] end #-------------------------------------------------------------------------- # ● 装備ウィンドウの更新 #-------------------------------------------------------------------------- def update_equip_window @equip_window.update end #-------------------------------------------------------------------------- # ● 装備部位選択の更新 #-------------------------------------------------------------------------- def update_equip_selection if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.trigger?(Input::C) Sound.play_decision @before_item1 = @tester.equips[@equip_window.index-1] @before_item2 = @tester.equips[@equip_window.index] @before_item3 = @tester.equips[@equip_window.index+1] @equip_window.active = false @item_window.active = true @item_window.index = 0 elsif Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor elsif Input.trigger?(EquipTest::BUY_ALL) @buy_all_window.refresh @buy_all_window.open @buy_all_window.index = @buy_all_window.item_max - 1 @buy_all_window.active = true @equip_window.active = false elsif Input.trigger?(EquipTest::RESET) @refresh_window.open @refresh_window.index = 1 @refresh_window.active = true @equip_window.active = false end end #-------------------------------------------------------------------------- # ● アイテム選択の更新 #-------------------------------------------------------------------------- def update_item_selection if Input.trigger?(Input::B) Sound.play_cancel @tester.change_equip(@equip_window.index-1, @before_item1, true) @tester.change_equip(@equip_window.index, @before_item2, true) @tester.change_equip(@equip_window.index+1, @before_item3, true) @equip_window.active = true @item_window.active = false @item_window.index = -1 @equip_window.refresh @money_window.refresh elsif Input.trigger?(Input::C) Sound.play_equip @actor.change_equip(@equip_window.index, @item_window.item, true) @tester.change_equip(@equip_window.index, @item_window.item, true) @equip_window.active = true @item_window.active = false @item_window.index = -1 @equip_window.refresh @money_window.refresh for item_window in @item_windows item_window.refresh end end end end #============================================================================== # ■ Window_EquipT #------------------------------------------------------------------------------ #  テスターが現在装備しているアイテムを表示するウィンドウです。 #============================================================================== class Window_EquipT < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(x, y, actor, member) @member = member super(x, y, 336, WLH * EquipTest::EQUIP_TYPE_MAX + 32) create_contents @item_max = EquipTest::EQUIP_TYPE_MAX @actor = actor refresh self.index = 0 end #-------------------------------------------------------------------------- # ● アイテムの取得 #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @data = [] text = [] for i in 0...EquipTest::EQUIP_TYPE_MAX text.push(@actor.two_swords_style ? Vocab::weapon1 : Vocab::weapon) if i == 0 text.push(@actor.two_swords_style ? Vocab::weapon2 : Vocab::armor1) if i == 1 text.push(Vocab::armor2) if i == 2 text.push(Vocab::armor3) if i == 3 text.push(Vocab::armor4) if i == 4 end for item in @actor.equips do @data.push(item) end for i in 0...EquipTest::EQUIP_TYPE_MAX self.contents.font.color = system_color self.contents.draw_text(4, WLH * i, 92, WLH, text[i]) draw_item_name(@data[i], 92, WLH * i) end end #-------------------------------------------------------------------------- # ● アイテム名の描画 #-------------------------------------------------------------------------- def draw_item_name(item, x, y, enabled = true) if item != nil draw_icon(item.icon_index, x, y, enabled) color = @member.equips.include?(item) ? normal_color : text_color(3) self.contents.font.color = color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y, 172, WLH, item.name) end end #-------------------------------------------------------------------------- # ● ヘルプテキスト更新 #-------------------------------------------------------------------------- def update_help @help_window.set_text(EquipTest::HELP_TEXT, 1) end end #============================================================================== # ■ Window_EquipStatusT #------------------------------------------------------------------------------ #  ステータス変化を表示するウィンドウのクラスです。 #============================================================================== class Window_EquipStatusT < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 ※再定義 #-------------------------------------------------------------------------- def initialize(x, y, actor, member) super(x, y, 544 - x, WLH * 8 + 32) @actor = actor @member = member refresh end #-------------------------------------------------------------------------- # ● リフレッシュ ※再定義 #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 0, 0) draw_parameter(0, WLH * 1, 0) draw_parameter(0, WLH * 2, 1) draw_parameter(0, WLH * 3, 2) draw_parameter(0, WLH * 4, 3) draw_parameter(0, WLH * 5, 4) draw_parameter(0, WLH * 6, 5) draw_parameter(0, WLH * 7, 6) end #-------------------------------------------------------------------------- # ● 装備変更後の能力値設定 ※再定義 #-------------------------------------------------------------------------- def set_new_parameters(new_atk, new_def, new_spi, new_agi, new_hit, new_eva, new_cri) if @new_atk != new_atk or @new_def != new_def or @new_spi != new_spi or @new_agi != new_agi or @new_hit != new_hit or @new_eva != new_eva or @new_cri != new_cri @new_atk = new_atk @new_def = new_def @new_spi = new_spi @new_agi = new_agi @new_hit = new_hit @new_eva = new_eva @new_cri = new_cri refresh end end #-------------------------------------------------------------------------- # ● 能力値の描画 ※再定義 #-------------------------------------------------------------------------- def draw_parameter(x, y, type) case type when 0 name = Vocab::atk new_value = @actor.atk value = @member.atk when 1 name = Vocab::def new_value = @actor.def value = @member.def when 2 name = Vocab::spi new_value = @actor.spi value = @member.spi when 3 name = Vocab::agi new_value = @actor.agi value = @member.agi when 4 name = "命中率" new_value = @actor.hit value = @member.hit when 5 name = "回避率" new_value = @actor.eva value = @member.eva when 6 name = "必殺率" new_value = @actor.cri value = @member.cri end self.contents.font.color = system_color self.contents.draw_text(x + 4, y, 80, WLH, name) self.contents.font.color = normal_color self.contents.draw_text(x + 90, y, 30, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(x + 122, y, 20, WLH, "→", 1) if new_value != nil self.contents.font.color = new_parameter_color(value, new_value) self.contents.draw_text(x + 142, y, 30, WLH, new_value, 2) end end #-------------------------------------------------------------------------- # ● 装備変更後の能力値の描画色取得 #-------------------------------------------------------------------------- def new_parameter_color(old_value, new_value) if new_value > old_value # 強くなる return power_up_color elsif new_value == old_value # 変わらず return normal_color else # 弱くなる return power_down_color end end end #============================================================================== # ■ Window_EquipItemT #------------------------------------------------------------------------------ #  装備可能なアイテムを表示するウィンドウのクラスです。 #============================================================================== class Window_EquipItemT < Window_EquipItem #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(rect, actor, member, equip_type) @member = member @shop_goods = $game_temp.shop_goods super(rect.x, rect.y, rect.width, rect.height, actor, equip_type) end #-------------------------------------------------------------------------- # ● アイテムの取得 #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh @column_max = 1 @data = [] for goods_item in @shop_goods case goods_item[0] when 0 next when 1 item = $data_weapons[goods_item[1]] next if @equip_type > 0 when 2 item = $data_armors[goods_item[1]] next if item.kind != @equip_type - 1 end if item != nil next unless @member.equippable?(item) next if @member.equips.include?(item) @data.push(item) end end @data.push(@member.equips[@equip_type]) # 現在装備中のアイテムを欄の最後に @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] if item != nil rect = item_rect(index) self.contents.clear_rect(rect) draw_item_name(item, rect.x, rect.y) rect.width -= 4 price = @member.equips.include?(item) ? 0 : item.price self.contents.draw_text(rect, price, 2) end end #-------------------------------------------------------------------------- # ● アイテム名の描画 #-------------------------------------------------------------------------- def draw_item_name(item, x, y) draw_icon(item.icon_index, x, y) self.contents.font.color = normal_color self.contents.draw_text(x + 24, y, 172, WLH, item.name) end end #============================================================================== # ■ Window_Refresh #------------------------------------------------------------------------------ #  装備品を元に戻すかどうかを表示するウィンドウのクラスです。 #============================================================================== class Window_Refresh < Window_Selectable #-------------------------------------------------------------------------- # ● 定数 #-------------------------------------------------------------------------- WLH = 32 # 行の高さ基準値 (Window Line Height) #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(index) super(62, 154, 420, 108) self.active = false self.openness = 0 self.z = 300 @opening = false # ウィンドウのオープン中フラグ @closing = false # ウィンドウのクローズ中フラグ @item_max = 2 @column_max = 2 @index = -1 @spacing = 16 refresh end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super self.active = self.openness != 0 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(0, 0, contents.width, WLH, "装備を初期状態に戻しますか?", 1) for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 # enabled : 有効フラグ。false のとき半透明で描画 #-------------------------------------------------------------------------- def draw_item(index, enabled = true) text = ["はい","いいえ"] rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, text[index], 1) end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = (contents.width + @spacing) / @column_max - @spacing rect.height = WLH rect.x = index % @column_max * (rect.width + @spacing) rect.y = index / @column_max * WLH + WLH + 4 return rect end end #============================================================================== # ■ Window_All #------------------------------------------------------------------------------ #  購入する装備品を表示するためのクラスです。 #============================================================================== class Window_All < Window_Selectable #-------------------------------------------------------------------------- # ● 定数 #-------------------------------------------------------------------------- WLH = 32 # 行の高さ基準値 (Window Line Height) #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor, member) super(62, 46, 420, 324) self.active = false self.openness = 0 self.z = 300 @opening = false # ウィンドウのオープン中フラグ @closing = false # ウィンドウのクローズ中フラグ @item_max = 2 @column_max = 2 @index = -1 @spacing = 105 @can_buy = false @actor = actor @member = member refresh end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super self.active = self.openness != 0 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear i = price = 0 for item in @actor.equips next if item == nil next if @member.equips.include?(item) price += item.price i += 1 end self.height = 132 + 24 * (i - 1) self.height += 24 * 3 if price > 0 self.y = 208 - self.height / 2 create_contents if i == 0 self.contents.draw_text(0, 0, contents.width, WLH, " 新規アイテムが1つもありません。", 1) @can_buy = false @item_max = 1 @column_max = 1 draw_item(0) elsif price > $game_party.gold self.contents.draw_text(0, 0, contents.width, WLH, " 所持金が足りません。", 1) @can_buy = false @item_max = 1 @column_max = 1 draw_item(0) else self.contents.draw_text(0, 0, contents.width, WLH, "これらのアイテムを購入しますか?", 1) @can_buy = true @item_max = 2 @column_max = 2 for i in 0...@item_max draw_item(i) end end draw_buy_item end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- def draw_item(index, enabled = true) text = ["はい","いいえ"] rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, text[index], 1) end #-------------------------------------------------------------------------- # ● 購入アイテムの描画 #-------------------------------------------------------------------------- def draw_buy_item index = price = 0 for item in @actor.equips next if item == nil next if @member.equips.include?(item) rect = item_rects(index) self.contents.font.color = normal_color self.contents.draw_text(rect, item.name) draw_currency_value(item.price, rect.x, rect.y, rect.width) price += item.price rect.y += 25 rect.height = 1 self.contents.gradient_fill_rect(rect, system_color, normal_color) index += 1 end if price != 0 rect = item_rects(index) self.contents.font.color = system_color self.contents.draw_text(rect, "合計金額") self.contents.font.color = normal_color draw_currency_value(price, rect.x, rect.y, rect.width) rect.y += 25 rect.height = 1 self.contents.gradient_fill_rect(rect, system_color, normal_color) index += 1 rect = item_rects(index) self.contents.font.color = system_color self.contents.draw_text(rect, "所持金") self.contents.font.color = normal_color money = $game_party.gold draw_currency_value(money, rect.x, rect.y, rect.width) rect.y += 25 rect.height = 1 self.contents.gradient_fill_rect(rect, system_color, normal_color) index += 1 rect = item_rects(index) money -= price text = money < 0 ? "不足額" : "残金" color = money < 0 ? power_down_color : system_color self.contents.font.color = color self.contents.draw_text(rect, text) color = money < 0 ? power_down_color : normal_color draw_currency_value(money.abs, rect.x, rect.y, rect.width, color) rect.y += 25 rect.height = 1 self.contents.gradient_fill_rect(rect, system_color, normal_color) end end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = (contents.width + @spacing) / 2 - @spacing rect.height = WLH rect.x = index % @column_max * (rect.width + @spacing) rect.y = index / @column_max * WLH + WLH + 4 rect.x = (self.width - rect.width) / 2 - 12 if @item_max == 1 return rect end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 #-------------------------------------------------------------------------- def item_rects(index) rect = Rect.new(0, 0, 0, 0) rect.width = contents.width - 140 rect.height = WLH rect.x = 70 rect.y = index * 24 + WLH * 2 + 8 return rect end #-------------------------------------------------------------------------- # ● 通貨単位つきの数値描画 #-------------------------------------------------------------------------- def draw_currency_value(value, x, y, width, color = normal_color) cx = contents.text_size(Vocab::gold).width self.contents.font.color = color self.contents.draw_text(x, y, width-cx-2, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2) end #-------------------------------------------------------------------------- # ● 購入可能フラグ #-------------------------------------------------------------------------- def can_buy return @can_buy end end #============================================================================== # ■ Window_Money #------------------------------------------------------------------------------ #  所持金と選択中のアイテムの合計金額を表示するクラスです。 #============================================================================== class Window_Money < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(x, y, actor, member) super(x, y, 544 - x, 416 - y) @actor = actor @member = member refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, WLH * 0 + 4, self.width - 32, WLH, "所持金") self.contents.draw_text(0, WLH * 2 + 4, self.width - 32, WLH, "合計金額") self.contents.font.color = normal_color price = 0 for item in @actor.equips next if item == nil next if @member.equips.include?(item) price += item.price end money = $game_party.gold draw_currency_value(money, 4, WLH * 1 + 4, self.width - 40) color = money - price < 0 ? power_down_color : normal_color draw_currency_value(price, 4, WLH * 3 + 4, self.width - 40, color) end #-------------------------------------------------------------------------- # ● 通貨単位つきの数値描画 #-------------------------------------------------------------------------- def draw_currency_value(value, x, y, width, color = normal_color) cx = contents.text_size(Vocab::gold).width self.contents.font.color = color self.contents.draw_text(x, y, width-cx-2, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2) end end #============================================================================== # ■ Scene_Shop #------------------------------------------------------------------------------ #  ショップ画面の処理を行うクラスです。 #============================================================================== class Scene_Shop < Scene_Base #-------------------------------------------------------------------------- # ● コマンドウィンドウの作成 #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::ShopBuy s2 = Vocab::ShopSell s3 = Vocab::ShopCancel s4 = "試着" @command_window = Window_Command.new(384, [s1, s2, s4, s3], 4) @command_window.y = 56 if $game_temp.shop_purchase_only @command_window.draw_item(1, false) end end #-------------------------------------------------------------------------- # ● コマンド選択の更新 #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) case @command_window.index when 0 # 購入する Sound.play_decision @command_window.active = false @dummy_window.visible = false @buy_window.active = true @buy_window.visible = true @buy_window.refresh @status_window.visible = true when 1 # 売却する if $game_temp.shop_purchase_only Sound.play_buzzer else Sound.play_decision @command_window.active = false @dummy_window.visible = false @sell_window.active = true @sell_window.visible = true @sell_window.refresh end when 2 # 試着 Sound.play_decision $scene = Scene_EquipTest.new when 3 # やめる Sound.play_decision $scene = Scene_Map.new end end end end