#============================================================================== # [ZTBS] -Zenith Tactical Battle System- タクティカルバトルシステム #  〜+7:リザルトウィンドウ〜   by 水夜 #  ver1.01  Zenith Creation (http://zenith.ifdef.jp/) #------------------------------------------------------------------------------ # マップ上での戦略的なバトルを実現。 #============================================================================== class Scene_Map # レベルアップ時に演奏する SE ( "" または nil にすると演奏しない) LEVEL_UP_SE = "136-Light02" #-------------------------------------------------------------------------- # ● リザルトウィンドウ表示 #-------------------------------------------------------------------------- def result_window if @level_up == nil or @gold == nil or @treasures == nil return false end # ゴールドとトレジャー用ウィンドウ作成 if @treasures.size == 0 width = 140 else width = 240 end window = Window_Base.new(0, 64, width, 64 + @treasures.size * 32) window.contents = Bitmap.new(window.width - 32, window.height - 32) window.back_opacity = 160 window.opacity = 0 # ゴールド cx = window.contents.text_size($data_system.words.gold).width window.contents.font.color = window.normal_color window.contents.draw_text(4, 0, window.width-44-cx, 32, @gold.to_s, 2) window.contents.font.color = window.system_color window.contents.draw_text(window.width-32-cx, 0, cx, 32, $data_system.words.gold, 2) # トレジャー y = 32 for item in @treasures window.draw_item_name(item, 4, y) y += 32 end if @level_up.keys.size > 0 # SE を演奏 if LEVEL_UP_SE != nil and LEVEL_UP_SE != "" Audio.se_play("Audio/SE/" + LEVEL_UP_SE, 80, 100) end # レベルアップ用ウィンドウ作成 height = [352, 64+@level_up.keys.size*32].min window2 = Window_Base.new(window.width+48, 64, 320, height) window2.contents = Bitmap.new(window2.width - 32, 32+@level_up.keys.size*32) window2.back_opacity = 160 window2.opacity = 0 window2.contents.font.color = window.system_color window2.contents.draw_text(0, 0, window2.width-32, 32, "-LEVEL UP-", 1) y = 32 for actor in @level_up.keys window2.draw_actor_name(actor, 4, y) window2.contents.font.color = window2.system_color window2.contents.draw_text(168, y, 24, 32, "Lv") window2.contents.draw_text(228, y, 24, 32, "→") window2.contents.font.color = window2.normal_color lv1 = @level_up[actor][0].to_s window2.contents.draw_text(192, y, 32, 32, lv1, 2) lv2 = @level_up[actor][1].to_s window2.contents.draw_text(254, y, 32, 32, lv2) y += 32 end end # リザルト表示 loop do # ゲーム画面を更新 Graphics.update # 入力情報を更新 Input.update if window.opacity < 255 window.opacity += 25 window.x += 1 if window2 != nil window2.opacity += 25 window2.x += 1 end next end if Input.press?(Input::DOWN) and window2 != nil max = [window2.contents.height - (window2.height - 32), 0].max window2.oy = [window2.oy + 6, max].min elsif Input.press?(Input::UP) and window2 != nil max = [window2.contents.height - (window2.height - 32), 0].max window2.oy = [window2.oy - 6, 0].max end break if Input.trigger?(Input::C) end # 解放 window.dispose window = nil if window2 != nil window2.dispose window2 = nil end @level_up = nil @gold = nil @treasures = nil return true end end