메뉴관련
2010.01.16 22:11

메뉴를 색다르게 바꿔보기

조회 수 1818 추천 수 0 댓글 4
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
Extra Form
출처 Cogwheel

gg.JPG 예제.exe

 

# メニュ?改造スクリプト Ver 1.02
# 配布元?サポ?トURL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクタ?を扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の?部で使用され、Game_Party クラス ($game_party) からも?照されます。
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● バトル?面 X 座標の取得
  #--------------------------------------------------------------------------
  alias :screen_x_original :screen_x
  def screen_x
    # パ?ティ?の?び順から X 座標を計算して返す
    if $game_temp.in_battle
      return screen_x_original
    else
      if self.index != nil
        return (self.index / 2 + 1) * 128 + (self.index % 2) * 264
      else
        return 0
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● バトル?面 Y 座標の取得
  #--------------------------------------------------------------------------
  alias :screen_y_original :screen_y
  def screen_y
    if $game_temp.in_battle
      return screen_y_original
    else
      return 360 +(self.index / 2) * 104
    end
  end
end

#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
#  スキルやアイテムの?明、アクタ?のステ?タスなどを表示するウィンドウです。
#==============================================================================

class Window_Help2 < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(20, 42, 600, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 6110
    self.back_opacity = 192
  end
  #--------------------------------------------------------------------------
  # ● テキスト設定
  #     text  : ウィンドウに表示する文字列
  #     align : アラインメント (0..左?え、1..中央?え、2..右?え)
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    # テキストとアラインメントの少なくとも一方が前回と違っている場合
    if text != @text or align != @align
      # テキストを再描?
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
      @text = text
      @align = align
      @actor = nil
    end
    self.visible = true
  end
  #--------------------------------------------------------------------------
  # ● アクタ?設定
  #     actor : ステ?タスを表示するアクタ?
  #--------------------------------------------------------------------------
  def set_actor(actor)
    if actor != @actor
      self.contents.clear
      draw_actor_name(actor, 0, 0)
      draw_actor_state(actor, 144, 0, 100)
      draw_actor_hp(@actor, 256, 0)
      draw_actor_sp(@actor, 424, 0)
      @actor = actor
      @text = nil
      self.visible = true
    end
  end
  #--------------------------------------------------------------------------
  # ● エネミ?設定
  #     enemy : 名前とステ?トを表示するエネミ?
  #--------------------------------------------------------------------------
  def set_enemy(enemy)
    text = enemy.name
    state_text = make_battler_state_text(enemy, 112, false)
    if state_text != ""
      text += "  " + state_text
    end
    set_text(text, 1)
  end
end

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  ゲ?ム中のすべてのウィンドウのス?パ?クラスです。
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● 名前の描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 120, 32, actor.name)
  end
  #--------------------------------------------------------------------------
  # ● クラスの描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 120, 32, actor.class_name)
  end
  #--------------------------------------------------------------------------
  # ● グラフィックの描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_battler(actor, x, y)
    bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    cw = bitmap.width / 2
    ch = bitmap.height
    self.contents.blt(x - cw, y - ch, bitmap, bitmap.rect, 208)
  end
  #--------------------------------------------------------------------------
  # ● アイテム名の描?
  #     item : アイテム
  #     x    : 描?先 X 座標
  #     y    : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, width = 240)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, width - 28, 32, item.name)
  end
end

#==============================================================================
# ■ Window_Command2
#------------------------------------------------------------------------------
#  一般的なコマンド選?を行うウィンドウです。
#==============================================================================

class Window_MenuCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     width    : ウィンドウの幅
  #     commands : コマンド文字列の配列
  #--------------------------------------------------------------------------
  def initialize(width, commands)
    # コマンドの個?からウィンドウの高さを算出
    super(0, 0, width, 160)
    @item_max = commands.size
    @commands = commands
    @column_max = 2
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set((index % 2) * 128, 32 * (index / 2), 128, 32)
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #     index : 項目番?
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4 + (index % 2) * 128, 32 * (index / 2), 128, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
  #--------------------------------------------------------------------------
  # ● 項目の無?化
  #     index : 項目番?
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
end

#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュ??面でパ?ティメンバ?のステ?タスを表示するウィンドウです。
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 公開インスタンス??
  #--------------------------------------------------------------------------
  attr_accessor :out_window               # 現ウィンドウ
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(40, 0, 560, 480)
    self.z = 6100
    self.opacity = 0
    self.back_opacity = 0
    @out_window = Window_Base.new(40, 220, 560, 240)
    @out_window.z = 6100
    @out_window.back_opacity = 192
    @column_max = 2
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    @out_window.dispose
    super
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = (i % 2) * 264
      y = (i / 2) * 104 + 220
      actor = $game_party.actors[i]
      draw_actor_battler(actor, x + (2 - i / 2) * 88, y + 104)
      draw_actor_name(actor, x + 12, y)
      draw_actor_class(actor, x + 132, y)
      draw_actor_level(actor, x + 12, y + 24)
      draw_actor_state(actor, x + 12, y + 48, 100)
      draw_actor_exp(actor, x + 30, y + 72)
      draw_actor_hp(actor, x + 108, y + 24)
      draw_actor_sp(actor, x + 108, y + 48)
    end
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      if @index == -2
        self.cursor_rect.set(0, 220, 528, 208)
      elsif @index < -2
        self.cursor_rect.set(((@index + 10) % 2) * 264,
                        ((@index + 10) / 2) * 104 + 220, 264, 104)
      else
        self.cursor_rect.empty
      end
    else
      self.cursor_rect.set((@index % 2) * 264, (@index / 2) * 104 + 220,
                                                                      264, 104)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    @out_window.update
    super
  end
end

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  メニュ??面の?理を行うクラスです。
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # ● 公開インスタンス??
  #--------------------------------------------------------------------------
  attr_accessor :menu                     # 現ウィンドウ
  attr_accessor :command_window           # コマンドウィンドウ
  attr_accessor :status_window            # タ?ゲットウィンドウ
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     menu_index : コマンドのカ?ソル初期位置
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
  def main
    # スプライトセットを作成
    @spriteset = Spriteset_Map.new
    # コマンドウィンドウを作成
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "캐릭정보"
    s5 = "저장하기"
    s6 = "불러오기"
    s7 = "종료"
    @command_window = Window_MenuCommand.new(288, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.x = 40
    @command_window.y = 20
    @command_window.z = 6100
    @command_window.back_opacity = 192
    # パ?ティ人?が 0 人の場合
    if $game_party.actors.size == 0
      # アイテム、スキル、?備、ステ?タスを無?化
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # セ?ブ禁止の場合
    if $game_system.save_disabled
      # セ?ブを無?にする
      @command_window.disable_item(4)
    end
    # ゴ?ルドウィンドウを作成
    @time_window = Window_PlayTime.new
    @time_window.x = 440 #화면상에 뜨는창의 x좌표
    @time_window.y = 76 #화면상에 뜨는창의 y좌표
    @time_window.z = 6100
    @time_window.back_opacity = 192
    @time_window.visible = true
    @gold_window = Window_Gold.new
    @gold_window.x = 440
    @gold_window.y = 20
    @gold_window.z = 6100
    @gold_window.back_opacity = 192
    # ステ?タスウィンドウを作成
    @status_window = Window_MenuStatus.new
    @menu = nil
    # トランジション?行
    Graphics.transition
    # メインル?プ
    loop do
      # ゲ?ム?面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレ?ム更新
      update
      if @menu != nil
        @menu.update
      end
      # ?面が切り替わったらル?プを中?
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # スプライトセットを解放
    @spriteset.dispose
    # ウィンドウを解放
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @time_window.visible = false   
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @command_window.update
    @gold_window.update
    @status_window.update
    @time_window.update
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active and @menu == nil
      update_command
      return
    end
    # ステ?タスウィンドウがアクティブの場合: update_status を呼ぶ
    if @status_window.active and @menu == nil
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # マップ?面に切り替え
      $scene = Scene_Map.new
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # パ?ティ人?が 0 人で、セ?ブ、ゲ?ム終了以外のコマンドの場合
      if $game_party.actors.size == 0 and @command_window.index < 4
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # コマンドウィンドウのカ?ソル位置で分岐
      case @command_window.index
      when 0  # アイテム
        Input.update
        # 決定  SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アイテム?面に切り替え
        @menu = Scene_Item.new
      when 1  # スキル
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステ?タスウィンドウをアクティブにする
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # ?備
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステ?タスウィンドウをアクティブにする
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # ステ?タス
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステ?タスウィンドウをアクティブにする
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # セ?ブ
        # セ?ブ禁止の場合
        if $game_system.save_disabled
          # ブザ? SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        Input.update
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # セ?ブ?面に切り替え
        @menu = Scene_Save.new
      when 5  # ロ?ド
        Input.update
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # セ?ブ?面に切り替え
        @menu = Scene_Load.new
      when 6  # ゲ?ム終了
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ゲ?ム終了?面に切り替え
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (ステ?タスウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_status
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブにする
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # コマンドウィンドウのカ?ソル位置で分岐
      case @command_window.index
      when 1  # スキル
        # このアクタ?の行動制限が 2 以上の場合
        if $game_party.actors[@status_window.index].restriction >= 2
          # ブザ? SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        Input.update
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # スキル?面に切り替え
        @menu = Scene_Skill.new(@status_window.index)
      when 2  # ?備
        Input.update
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ?備?面に切り替え
        @menu = Scene_Equip.new(@status_window.index)
      when 3  # ステ?タス
        Input.update
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステ?タス?面に切り替え
        @menu = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end


#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  アイテム?面、バトル?面で、所持アイテムの一?を表示するウィンドウです。
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(20, 106, 600, 320)
    self.index = 0
    self.back_opacity = 192
    @column_max = 2
    # ??中の場合はウィンドウを?面中央へ移動し、半透明にする
    if $game_temp.in_battle
      self.x = 0
      self.y = 64
      self.width = 640
      self.height = 256
    else
      self.z = 6110
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #     index : 項目番?
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    if $game_temp.in_battle
      x = 4 + index % 2 * (288 + 32)
      y = index / 2 * 32
      rect = Rect.new(x, y, self.width / @column_max - 32, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(item.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
      self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
      self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
    else
      x = 4 + index % 2 * 284
      y = index / 2 * 32
      rect = Rect.new(x, y, 280, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(item.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x + 28, y, 208, 32, item.name, 0)
      self.contents.draw_text(x + 236, y, 16, 32, ":", 1)
      self.contents.draw_text(x + 252, y, 24, 32, number.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if $game_temp.in_battle
      super
    else
      # 現在の行を取得
      row = @index / @column_max
      # 現在の行が、表示されている先頭の行より前の場合
      if row < self.top_row
        # 現在の行が先頭になるようにスクロ?ル
        self.top_row = row
      end
      # 現在の行が、表示されている最後尾の行より後ろの場合
      if row > self.top_row + (self.page_row_max - 1)
        # 現在の行が最後尾になるようにスクロ?ル
        self.top_row = row - (self.page_row_max - 1)
      end
      if @index < 0
        self.cursor_rect.empty
      else
        self.cursor_rect.set((index % 2) * 284,
                                  @index / @column_max * 32 - self.oy, 284, 32)
      end
    end
  end
end

#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------
#  アイテム?面の?理を行うクラスです。
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # ヘルプウィンドウ、アイテムウィンドウを作成
    @help_window = Window_Help2.new
    @item_window = Window_Item.new
    # ヘルプウィンドウを?連付け
    @item_window.help_window = @help_window
    $scene.command_window.active = false
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ウィンドウを解放
    @help_window.dispose
    @item_window.dispose
    $scene.menu = nil
    $scene.command_window.active = true
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @help_window.update
    @item_window.update
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
    # タ?ゲットウィンドウがアクティブの場合: update_target を呼ぶ
    if $scene.status_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      dispose
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムウィンドウで現在選?されているデ?タを取得
      @item = @item_window.item
      # 使用アイテムではない場合
      unless @item.is_a?(RPG::Item)
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 使用できない場合
      unless $game_party.item_can_use?(@item.id)
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # ?果範?が味方の場合
      if @item.scope >= 3
        # タ?ゲットウィンドウをアクティブ化
        @item_window.active = false
        $scene.status_window.z = 6120
        $scene.status_window.out_window.z = 6120
        $scene.status_window.active = true
        # ?果範? (??/全?) に?じてカ?ソル位置を設定
        if @item.scope == 4 || @item.scope == 6
          $scene.status_window.index = -2
        else
          $scene.status_window.index = 0
        end
      # ?果範?が味方以外の場合
      else
        # コモンイベント ID が有?の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # アイテムの使用時 SE を演奏
          $game_system.se_play(@item.menu_se)
          # 消耗品の場合
          if @item.consumable
            # 使用したアイテムを 1 減らす
            $game_party.lose_item(@item.id, 1)
            # アイテムウィンドウの項目を再描?
            @item_window.draw_item(@item_window.index)
          end
          # マップ?面に切り替え
          dispose
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (タ?ゲットウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_target
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテム切れなどで使用できなくなった場合
      unless $game_party.item_can_use?(@item.id)
        # アイテムウィンドウの?容を再作成
        @item_window.refresh
      end
      # タ?ゲットウィンドウを消去
      @item_window.active = true
      $scene.status_window.index = -1
      $scene.status_window.z = 6100
      $scene.status_window.out_window.z = 6100
      $scene.status_window.active = false
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムを使い切った場合
      if $game_party.item_number(@item.id) == 0
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # タ?ゲットが全?の場合
      if $scene.status_window.index < 0
        # パ?ティ全?にアイテムの使用?果を適用
        used = false
        for i in $game_party.actors
          used |= i.item_effect(@item)
        end
      end
      # タ?ゲットが??の場合
      if $scene.status_window.index >= 0
        # タ?ゲットのアクタ?にアイテムの使用?果を適用
        target = $game_party.actors[$scene.status_window.index]
        used = target.item_effect(@item)
      end
      # アイテムを使った場合
      if used
        # アイテムの使用時 SE を演奏
        $game_system.se_play(@item.menu_se)
        # 消耗品の場合
        if @item.consumable
          # 使用したアイテムを 1 減らす
          $game_party.lose_item(@item.id, 1)
          # アイテムウィンドウの項目を再描?
          @item_window.draw_item(@item_window.index)
        end
        # タ?ゲットウィンドウの?容を再作成
        $scene.status_window.refresh
        # 全滅の場合
        if $game_party.all_dead?
          # ゲ?ムオ?バ??面に切り替え
          dispose
          $scene = Scene_Gameover.new
          return
        end
        # コモンイベント ID が有?の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # マップ?面に切り替え
          dispose
          $scene = Scene_Map.new
          return
        end
      end
      # アイテムを使わなかった場合
      unless used
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

#==============================================================================
# ■ Window_SkillStatus
#------------------------------------------------------------------------------
#  スキル?面で、スキル使用者のステ?タスを表示するウィンドウです。
#==============================================================================

class Window_SkillStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(20, 106, 600, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 6110
    self.back_opacity = 192
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_state(@actor, 148, 0, 100)
    draw_actor_hp(@actor, 260, 0)
    draw_actor_sp(@actor, 420, 0)
  end
end

#==============================================================================
# ■ Window_Skill
#------------------------------------------------------------------------------
#  スキル?面、バトル?面で、使用できるスキルの一?を表示するウィンドウです。
#==============================================================================

class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(20, 170, 600, 256)
    self.back_opacity = 192
    self.index = 0
    @actor = actor
    @column_max = 2
    # ??中の場合はウィンドウを?面中央へ移動し、半透明にする
    if $game_temp.in_battle
      self.x = 0
      self.y = 64
      self.width = 640
      self.height = 256
    else
      self.z = 6110
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #     index : 項目番?
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    if $game_temp.in_battle
      x = 4 + index % 2 * (288 + 32)
      y = index / 2 * 32
      rect = Rect.new(x, y, self.width / @column_max - 32, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(skill.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
      self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
    else
      x = 4 + index % 2 * 284
      y = index / 2 * 32
      rect = Rect.new(x, y, 280, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(skill.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x + 28, y, 200, 32, skill.name, 0)
      self.contents.draw_text(x + 228, y, 48, 32, skill.sp_cost.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if $game_temp.in_battle
      super
    else
      # 現在の行を取得
      row = @index / @column_max
      # 現在の行が、表示されている先頭の行より前の場合
      if row < self.top_row
        # 現在の行が先頭になるようにスクロ?ル
        self.top_row = row
      end
      # 現在の行が、表示されている最後尾の行より後ろの場合
      if row > self.top_row + (self.page_row_max - 1)
        # 現在の行が最後尾になるようにスクロ?ル
        self.top_row = row - (self.page_row_max - 1)
      end
      if @index < 0
        self.cursor_rect.empty
      else
        self.cursor_rect.set((index % 2) * 284,
                                  @index / @column_max * 32 - self.oy, 284, 32)
      end
    end
  end
end

#==============================================================================
# ■ Scene_Skill
#------------------------------------------------------------------------------
#  スキル?面の?理を行うクラスです。
#==============================================================================

class Scene_Skill
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクタ?インデックス
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    # アクタ?を取得
    @actor = $game_party.actors[@actor_index]
    # ヘルプウィンドウ、ステ?タスウィンドウ、スキルウィンドウを作成
    @help_window = Window_Help2.new
    @status_window = Window_SkillStatus.new(@actor)
    @skill_window = Window_Skill.new(@actor)
    @skill_window.z = 6110
    @skill_window.back_opacity = 160
    # ヘルプウィンドウを?連付け
    @skill_window.help_window = @help_window
    $scene.command_window.active = false
    $scene.status_window.active = false
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ウィンドウを解放
    @help_window.dispose
    @status_window.dispose
    @skill_window.dispose
    $scene.menu = nil
    $scene.status_window.index = -1
    $scene.command_window.active = true
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @help_window.update
    @status_window.update
    @skill_window.update
    # スキルウィンドウがアクティブの場合: update_skill を呼ぶ
    if @skill_window.active
      update_skill
      return
    end
    # タ?ゲットウィンドウがアクティブの場合: update_target を呼ぶ
    if $scene.status_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (スキルウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_skill
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュ??面に切り替え
      dispose
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # スキルウィンドウで現在選?されているデ?タを取得
      @skill = @skill_window.skill
      # 使用できない場合
      if @skill == nil or not @actor.skill_can_use?(@skill.id)
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # ?果範?が味方の場合
      if @skill.scope >= 3
        # タ?ゲットウィンドウをアクティブ化
        @skill_window.active = false
        $scene.status_window.z = 6120
        $scene.status_window.out_window.z = 6120
        $scene.status_window.active = true
        # ?果範? (??/全?) に?じてカ?ソル位置を設定
        if @skill.scope == 4 || @skill.scope == 6
          $scene.status_window.index = -2
        elsif @skill.scope == 7
          $scene.status_window.index = @actor_index - 10
        else
          $scene.status_window.index = 0
        end
      # ?果範?が味方以外の場合
      else
        # コモンイベント ID が有?の場合
        if @skill.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @skill.common_event_id
          # スキルの使用時 SE を演奏
          $game_system.se_play(@skill.menu_se)
          # SP 消費
          @actor.sp -= @skill.sp_cost
          # 各ウィンドウの?容を再作成
          @status_window.refresh
          @skill_window.refresh
          $scene.status_window.refresh
          # マップ?面に切り替え
          dispose
          return
        end
      end
      return
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::R)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 次のアクタ?へ
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Skill.new(@actor.index)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::L)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 前のアクタ?へ
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Skill.new(@actor.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (タ?ゲットウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_target
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # タ?ゲットウィンドウを消去
      @skill_window.active = true
      $scene.status_window.index = @actor.index
      $scene.status_window.z = 6100
      $scene.status_window.out_window.z = 6100
      $scene.status_window.active = false
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # SP 切れなどで使用できなくなった場合
      unless @actor.skill_can_use?(@skill.id)
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # タ?ゲットが全?の場合
      if $scene.status_window.index == -2
        # パ?ティ全?にスキルの使用?果を適用
        used = false
        for i in $game_party.actors
          used |= i.skill_effect(@actor, @skill)
        end
      end
      # タ?ゲットが使用者の場合
      if $scene.status_window.index < -2
        # タ?ゲットのアクタ?にスキルの使用?果を適用
        target = $game_party.actors[$scene.status_window.index + 10]
        used = target.skill_effect(@actor, @skill)
      end
      # タ?ゲットが??の場合
      if $scene.status_window.index >= 0
        # タ?ゲットのアクタ?にスキルの使用?果を適用
        target = $game_party.actors[$scene.status_window.index]
        used = target.skill_effect(@actor, @skill)
      end
      # スキルを使った場合
      if used
        # スキルの使用時 SE を演奏
        $game_system.se_play(@skill.menu_se)
        # SP 消費
        @actor.sp -= @skill.sp_cost
        # 各ウィンドウの?容を再作成
        @status_window.refresh
        @skill_window.refresh
        $scene.status_window.refresh
        # 全滅の場合
        if $game_party.all_dead?
          # ゲ?ムオ?バ??面に切り替え
          $scene = Scene_Gameover.new
          return
        end
        # コモンイベント ID が有?の場合
        if @skill.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @skill.common_event_id
          # マップ?面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      # スキルを使わなかった場合
      unless used
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
#  ステ?タス?面で表示する、フル仕?のステ?タスウィンドウです。
#==============================================================================

class Window_Status < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(20, 40, 600, 400)
    self.z = 6110
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 192
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 44, 96)
    draw_actor_battler(@actor, 426, 368)
    draw_actor_name(@actor, 24, 0)
    draw_actor_class(@actor, 24 + 144, 0)
    draw_actor_level(@actor, 320, 16)
    draw_actor_state(@actor, 320, 48)
    draw_actor_hp(@actor, 68, 32, 172)
    draw_actor_sp(@actor, 68, 64, 172)
    draw_actor_parameter(@actor, 68, 112, 0)
    draw_actor_parameter(@actor, 68, 144, 1)
    draw_actor_parameter(@actor, 68, 176, 2)
    draw_actor_parameter(@actor, 68, 224, 3)
    draw_actor_parameter(@actor, 68, 256, 4)
    draw_actor_parameter(@actor, 68, 288, 5)
    draw_actor_parameter(@actor, 68, 320, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(304, 96, 80, 32, "EXP")
    self.contents.draw_text(304, 128, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(304 + 80, 96, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(304 + 80, 128, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(304, 176, 96, 32, "장비")
    draw_item_name($data_weapons[@actor.weapon_id], 304 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 304 + 16, 240)
    draw_item_name($data_armors[@actor.armor2_id], 304 + 16, 272)
    draw_item_name($data_armors[@actor.armor3_id], 304 + 16, 304)
    draw_item_name($data_armors[@actor.armor4_id], 304 + 16, 336)
  end
end

#==============================================================================
# ■ Scene_Status
#------------------------------------------------------------------------------
#  ステ?タス?面の?理を行うクラスです。
#==============================================================================

class Scene_Status
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクタ?インデックス
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    # アクタ?を取得
    @actor = $game_party.actors[@actor_index]
    # ステ?タスウィンドウを作成
    @status_window = Window_Status.new(@actor)
    $scene.command_window.active = false
    $scene.status_window.active = false
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ウィンドウを解放
    @status_window.dispose
    $scene.menu = nil
    $scene.status_window.index = -1
    $scene.command_window.active = true
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュ??面に切り替え
      dispose
      return
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::RIGHT) or Input.trigger?(Input::R)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 次のアクタ?へ
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # 別のステ?タス?面に切り替え
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Status.new(@actor.index)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::L)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 前のアクタ?へ
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # 別のステ?タス?面に切り替え
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Status.new(@actor.index)
      return
    end
  end
end

#==============================================================================
# ■ Window_EquipLeft
#------------------------------------------------------------------------------
#  ?備?面で、アクタ?のパラメ?タ?化を表示するウィンドウです。
#==============================================================================

class Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(20, 106, 264, 192)
    self.z = 6110
    self.back_opacity = 192
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 28, 64)
    draw_actor_name(@actor, 52, 0)
    draw_actor_level(@actor, 68, 32)
    draw_actor_parameter(@actor, 4, 64, 0)
    draw_actor_parameter(@actor, 4, 96, 1)
    draw_actor_parameter(@actor, 4, 128, 2)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 64, 40, 32, "→", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(192, 64, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 96, 40, 32, "→", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(192, 96, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 128, 40, 32, "→", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(192, 128, 36, 32, @new_mdef.to_s, 2)
    end
  end
end

#==============================================================================
# ■ Window_EquipRight
#------------------------------------------------------------------------------
#  ?備?面で、アクタ?が現在?備しているアイテムを表示するウィンドウです。
#==============================================================================

class Window_EquipRight < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(284, 106, 336, 192)
    self.z = 6110
    self.back_opacity = 192
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = []
    @data.push($data_weapons[@actor.weapon_id])
    @data.push($data_armors[@actor.armor1_id])
    @data.push($data_armors[@actor.armor2_id])
    @data.push($data_armors[@actor.armor3_id])
    @data.push($data_armors[@actor.armor4_id])
    @item_max = @data.size
    self.contents.font.color = system_color
    self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
    self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
    self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
    self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
    self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
    draw_item_name(@data[0], 92, 32 * 0, 202)
    draw_item_name(@data[1], 92, 32 * 1, 202)
    draw_item_name(@data[2], 92, 32 * 2, 202)
    draw_item_name(@data[3], 92, 32 * 3, 202)
    draw_item_name(@data[4], 92, 32 * 4, 202)
  end
end

#==============================================================================
# ■ Window_EquipItem
#------------------------------------------------------------------------------
#  ?備?面で、?備?更の候補となるアイテムの一?を表示するウィンドウです。
#==============================================================================

class Window_EquipItem < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor      : アクタ?
  #     equip_type : ?備部位 (0~3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(20, 298, 600, 128)
    self.z = 6110
    self.back_opacity = 192
    @actor = actor
    @equip_type = equip_type
    @column_max = 2
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #     index : 項目番?
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 2 * 281
    y = index / 2 * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 208, 32, item.name, 0)
    self.contents.draw_text(x + 236, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 252, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if $game_temp.in_battle
      super
    else
      # 現在の行を取得
      row = @index / @column_max
      # 現在の行が、表示されている先頭の行より前の場合
      if row < self.top_row
        # 現在の行が先頭になるようにスクロ?ル
        self.top_row = row
      end
      # 現在の行が、表示されている最後尾の行より後ろの場合
      if row > self.top_row + (self.page_row_max - 1)
        # 現在の行が最後尾になるようにスクロ?ル
        self.top_row = row - (self.page_row_max - 1)
      end
      if @index < 0
        self.cursor_rect.empty
      else
        self.cursor_rect.set((index % 2) * 284,
                                  @index / @column_max * 32 - self.oy, 284, 32)
      end
    end
  end
end

#==============================================================================
# ■ Scene_Equip
#------------------------------------------------------------------------------
#  ?備?面の?理を行うクラスです。
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクタ?インデックス
  #     equip_index : ?備インデックス
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
    # アクタ?を取得
    @actor = $game_party.actors[@actor_index]
    # ウィンドウを作成
    @help_window = Window_Help2.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    # ヘルプウィンドウを?連付け
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # カ?ソル位置を設定
    @right_window.index = @equip_index
    $scene.command_window.active = false
    $scene.status_window.active = false
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ウィンドウを解放
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
    $scene.menu = nil
    $scene.status_window.index = -1
    $scene.command_window.active = true
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    # アイテムウィンドウの可視?態設定
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # 現在?備中のアイテムを取得
    item1 = @right_window.item
    # 現在のアイテムウィンドウを @item_window に設定
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # ライトウィンドウがアクティブの場合
    if @right_window.active
      # ?備?更後のパラメ?タを消去
      @left_window.set_new_parameters(nil, nil, nil)
    end
    # アイテムウィンドウがアクティブの場合
    if @item_window.active
      # 現在選?中のアイテムを取得
      item2 = @item_window.item
      # ?備を?更
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # ?備?更後のパラメ?タを取得
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      # ?備を?す
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # レフトウィンドウに描?
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # ライトウィンドウがアクティブの場合: update_right を呼ぶ
    if @right_window.active
      update_right
      return
    end
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (ライトウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_right
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュ??面に切り替え
      dispose
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # ?備固定の場合
      if @actor.equip_fix?(@right_window.index)
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブ化
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::RIGHT) or Input.trigger?(Input::R)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 次のアクタ?へ
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # 別の?備?面に切り替え
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::L)
      # カ?ソル SE を演奏
      $game_system.se_play($data_system.cursor_se)
      # 前のアクタ?へ
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # 別の?備?面に切り替え
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # ライトウィンドウをアクティブ化
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # ?備 SE を演奏
      $game_system.se_play($data_system.equip_se)
      # アイテムウィンドウで現在選?されているデ?タを取得
      item = @item_window.item
      # ?備を?更
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # ライトウィンドウをアクティブ化
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # ライトウィンドウ、アイテムウィンドウの?容を再作成
      @right_window.refresh
      @item_window.refresh
      $scene.status_window.refresh
      return
    end
  end
end

#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
#  タイトル?面の?理を行うクラスです。
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # ● 公開インスタンス??
  #--------------------------------------------------------------------------
  attr_accessor :menu                     # 現ウィンドウ
  attr_accessor :command_window           # コマンドウィンドウ
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @menu = nil
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  alias :update_original :update
  def update
    update_original
    if @menu != nil
      @menu.update
    end
  end
  #--------------------------------------------------------------------------
  # ● コマンド : コンティニュ?
  #--------------------------------------------------------------------------
  def command_continue
    if @menu != nil
      return
    end
    # コンティニュ?が無?の場合
    unless @continue_enabled
      # ブザ? SE を演奏
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    Input.update
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # ロ?ド?面に切り替え
    @menu = Scene_Load.new
  end
  #--------------------------------------------------------------------------
  # ● コマンド : シャットダウン
  #--------------------------------------------------------------------------
  def command_shutdown
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # BGM、BGS、ME をフェ?ドアウト
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # シャットダウン
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # ● ??テスト
  #--------------------------------------------------------------------------
  def battle_test
    # デ?タベ?ス (??テスト用) をロ?ド
    $data_actors        = load_data("Data/BT_Actors.rxdata")
    $data_classes       = load_data("Data/BT_Classes.rxdata")
    $data_skills        = load_data("Data/BT_Skills.rxdata")
    $data_items         = load_data("Data/BT_Items.rxdata")
    $data_weapons       = load_data("Data/BT_Weapons.rxdata")
    $data_armors        = load_data("Data/BT_Armors.rxdata")
    $data_enemies       = load_data("Data/BT_Enemies.rxdata")
    $data_troops        = load_data("Data/BT_Troops.rxdata")
    $data_states        = load_data("Data/BT_States.rxdata")
    $data_animations    = load_data("Data/BT_Animations.rxdata")
    $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
    $data_system        = load_data("Data/BT_System.rxdata")
    # プレイ時間計測用のフレ?ムカウントをリセット
    Graphics.frame_count = 0
    # 各種ゲ?ムオブジェクトを作成
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # ??テスト用のパ?ティをセットアップ
    $game_party.setup_battle_test_members
    # トル?プ ID、逃走可能フラグ、バトルバックを設定
    $game_temp.battle_troop_id = $data_system.test_troop_id
    $game_temp.battle_can_escape = true
    $game_map.battleback_name = $data_system.battleback_name
    # バトル開始 SE を演奏
    $game_system.se_play($data_system.battle_start_se)
    # バトル BGM を演奏
    $game_system.bgm_play($game_system.battle_bgm)
    # バトル?面に切り替え
    $scene = Scene_Battle.new
  end
end

#==============================================================================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
#  セ?ブ?面およびロ?ド?面で表示する、セ?ブファイルのウィンドウです。
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス??
  #--------------------------------------------------------------------------
  attr_reader   :filename                 # ファイル名
  attr_reader   :selected                 # 選??態
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     file_index : セ?ブファイルのインデックス (0~3)
  #     filename   : ファイル名
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(file_index % 2 * 320, 106 + file_index / 2 * 104, 320, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 6110
    self.back_opacity = 192
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # ファイル番?を描?
    self.contents.font.color = normal_color
    name = "세이브 파일 #{@file_index + 1}"
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # セ?ブファイルが存在する場合
    if @file_exist
      # キャラクタ?を描?
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 160 - @characters.size * 32 + i * 64 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      end
      # プレイ時間を描?
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 280, 32, time_string, 2)
      # タイムスタンプを描?
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 280, 32, time_string, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 選??態の設定
  #     selected : 新しい選??態 (true=選? false=非選?)
  #--------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @selected
      self.cursor_rect.set(0, 0, @name_width + 8, 32)
    else
      self.cursor_rect.empty
    end
  end
end

#==============================================================================
# ■ Scene_File
#------------------------------------------------------------------------------
#  セ?ブ?面およびロ?ド?面のス?パ?クラスです。
#==============================================================================

class Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     help_text : ヘルプウィンドウに表示する文字列
  #--------------------------------------------------------------------------
  def initialize(help_text)
    @help_text = help_text
    # ヘルプウィンドウを作成
    @help_window = Window_Help2.new
    @help_window.set_text(@help_text)
    # セ?ブファイルウィンドウを作成
    @savefile_windows = []
    for i in 0..5
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    # 最後に操作したファイルを選?
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    # メニュ?から呼び出されている場合
    unless $game_temp.save_calling
      $scene.command_window.active = false
    end
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ウィンドウを解放
    @help_window.dispose
    for i in @savefile_windows
      i.dispose
    end
    # メニュ?から呼び出されている場合
    unless $game_temp.save_calling
      $scene.menu = nil
      $scene.command_window.active = true
    end
  end
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
  def main
    # スプライトセットを作成
    @spriteset = Spriteset_Map.new
    # 最後に操作したファイルを選?
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    # トランジション?行
    Graphics.transition(0)
    # メインル?プ
    loop do
      # ゲ?ム?面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレ?ム更新
      update
      @spriteset.update
      # ?面が切り替わったらル?プを中?
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # スプライトセットを解放
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @help_window.update
    for i in @savefile_windows
      i.update
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # メソッド on_decision (?承先で定義) を呼ぶ
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # メソッド on_cancel (?承先で定義) を呼ぶ
      on_cancel
      return
    end
    # 方向ボタンの下が押された場合
    if Input.repeat?(Input::DOWN)
      # 方向ボタンの下の押下?態がリピ?トでない場合
      if Input.trigger?(Input::DOWN) or @file_index < 4
        # カ?ソル SE を演奏
        $game_system.se_play($data_system.cursor_se)
        # カ?ソルを下に移動
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 2) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # 方向ボタンの上が押された場合
    if Input.repeat?(Input::UP)
      # 方向ボタンの上の押下?態がリピ?トでない場合
      if Input.trigger?(Input::UP) or @file_index > 1
        # カ?ソル SE を演奏
        $game_system.se_play($data_system.cursor_se)
        # カ?ソルを上に移動
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 2) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # 方向ボタンの右が押された場合
    if Input.repeat?(Input::RIGHT)
      # 方向ボタンの右の押下?態がリピ?トでない場合
      if Input.trigger?(Input::RIGHT) or @file_index < 5
        # カ?ソル SE を演奏
        $game_system.se_play($data_system.cursor_se)
        # カ?ソルを右に移動
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 1) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # 方向ボタンの左が押された場合
    if Input.repeat?(Input::LEFT)
      # 方向ボタンの左の押下?態がリピ?トでない場合
      if Input.trigger?(Input::LEFT) or @file_index > 0
        # カ?ソル SE を演奏
        $game_system.se_play($data_system.cursor_se)
        # カ?ソルを左に移動
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 1) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● ファイル名の作成
  #     file_index : セ?ブファイルのインデックス (0~3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
    return "Save#{file_index + 1}.rxdata"
  end
end

#==============================================================================
# ■ Scene_Save
#------------------------------------------------------------------------------
#  セ?ブ?面の?理を行うクラスです。
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super("어느것을 저장 하시겟습니까?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の?理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # セ?ブ SE を演奏
    $game_system.se_play($data_system.save_se)
    dispose
    # セ?ブデ?タの書き?み
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セ?ブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ?面に切り替え
      $scene = Scene_Map.new
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の?理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    dispose
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セ?ブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ?面に切り替え
      $scene = Scene_Map.new
      return
    end
  end
end

#==============================================================================
# ■ Scene_Load
#------------------------------------------------------------------------------
#  ロ?ド?面の?理を行うクラスです。
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # テンポラリオブジェクトを再作成
    $game_temp = Game_Temp.new
    # タイムスタンプが最新のファイルを選?
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..5
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("어느것을 불러오게 할것 입니까?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の?理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ファイルが存在しない場合
    unless FileTest.exist?(filename)
      # ブザ? SE を演奏
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    dispose
    # ロ?ド SE を演奏
    $game_system.se_play($data_system.load_se)
    # セ?ブデ?タの書き?み
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGM、BGS を復?
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # マップを更新 (?列イベント?行)
    $game_map.update
    # マップ?面に切り替え
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の?理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    dispose
  end
end

#==============================================================================
# ■ Scene_End
#------------------------------------------------------------------------------
#  ゲ?ム終了?面の?理を行うクラスです。
#==============================================================================

class Scene_End
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
  def main
    # コマンドウィンドウを作成
    s1 = "『타  이  틀』"
    s2 = "『게임  종료』"
    s3 = "『그만  둔다』"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    # トランジション?行
    Graphics.transition
    # メインル?プ
    loop do
      # ゲ?ム?面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレ?ム更新
      update
      # ?面が切り替わったらル?プを中?
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @command_window.dispose
    # タイトル?面に切り替え中の場合
    if $scene.is_a?(Scene_Title)
      # ?面をフェ?ドアウト
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # コマンドウィンドウを更新
    @command_window.update
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュ??面に切り替え
      $scene = Scene_Menu.new(6)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # コマンドウィンドウのカ?ソル位置で分岐
      case @command_window.index
      when 0  # タイトルへ
        command_to_title
      when 1  # シャットダウン
        command_shutdown
      when 2  # やめる
        command_cancel
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● コマンド [タイトルへ] 選?時の?理
  #--------------------------------------------------------------------------
  def command_to_title
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # BGM、BGS、ME をフェ?ドアウト
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # タイトル?面に切り替え
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # ● コマンド [シャットダウン] 選?時の?理
  #--------------------------------------------------------------------------
  def command_shutdown
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # BGM、BGS、ME をフェ?ドアウト
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # シャットダウン
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # ● コマンド [やめる] 選?時の?理
  #--------------------------------------------------------------------------
  def command_cancel
    # 決定 SE を演奏
    $game_system.se_play($data_system.decision_se)
    # メニュ??面に切り替え
    $scene = Scene_Menu.new(6)
  end
end

 

===

 

메뉴를 색다르게 바꿔보는 스크립트입니다

 

활용사진과 예제를 첨부해놨으니 참고하시기 바랍니다 ㅇㅂㅇ

 


List of Articles
분류 제목 글쓴이 날짜 조회 수 추천 수
공지사항 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다 ruby 2010.01.09 22078 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20725 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22249 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22249 0
공지사항 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다 ruby 2010.01.09 22078 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20725 0
기타 한글입력기 16 file 히카루 2007.01.31 14278 1
전투관련 간단한 액션알피지용 스크립트 Ver.1.01 (게임오버 추가) 38 file 펜릴 2010.04.11 8730 0
기타 Staff Roll 4 file 허걱 2010.03.04 7486 0
맵관련 맵이름 띄우기, 케릭터 ID띄우기 15 file 꼬마쟁이 2011.01.05 7388 0
온라인 RPG XP 온라인 스크립트 25 file 니오티 2007.02.15 6859 6
온라인 온라인스크립트 1.7 28 file 아디안 2007.02.16 5473 27
기타 중복일것 같은데;; [한글 이름 입력] 1 꼬마쟁이 2011.01.05 4641 0
시각적 효과 타이틀화면 나오기전 사운드아함께 로고뛰우기 예 넥슨로고 12 루비 2007.09.07 4437 6
전투관련 누구나 쉽게 만드는 액션알피지 6 펜릴 2012.11.25 4344 0
기타 게이지바 스크립트!! 최고!! 12 file 코아 코스튬 2011.08.08 4237 0
전투관련 리얼타임을 이용한 딜레이 구현 1 펜릴 2010.01.10 4197 0
메뉴관련 RPG XP 테스트플레이 할때 '뉴게임' '콘티뉴' '슛다운' 바꾸기 [중복이면 죄송] 12 이정한 2007.03.07 4153 18
기타 3d 스크립트 (적용시 바로 실행가능&암호걸림) 15 file kjs 2010.06.04 4065 0
전투관련 턴알 게이지바 변경 스크립트 (HP/SP) 3 file 니오티 2007.02.20 3984 2
시각적 효과 물가에 모습비치게 하기 25 file 아하하 2007.12.06 3947 6
전투관련 콤보 스크립트 10 아하하 2007.12.05 3699 4
XP 형식 메뉴 2 file Jenpia 2010.07.29 3639 0
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45