VX 스크립트



한글화 KGC몬스터 도감 9/8일자.

좌측키 우측키로 메뉴가 변경됩니다.

몬스터의 메모란에
<도감>
이곳에 몬스터설명。
</도감>

버그때문에 수정. 메뉴로 나오게하려면 수정해주세요.
아이템을 이용한 몬스터도감으로 올렸습니다.
Comment '68'
  • ?
    시옷청룡 2008.10.08 19:42
    ㄳㄳ
  • ?
    몽크님 2008.10.08 20:29
    ㄳㅅㄳ
  • ?
    쓰로드 파워 2008.10.08 20:43
    ㅅㄳㄳㄳㄱ
  • ?
    21stcentury 2008.10.08 20:50
  • ?
    공부싫어 2008.10.08 23:22
    우워/.....
    몬스터 잡을때마다 기억되는
    시스템 ???
    (여하튼 ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ)
  • ?
    21stcentury 2008.10.08 23:23
    이분떄문에 오늘 트래픽 걸리겠다.
  • ?
    쓰로드 파워 2008.10.11 08:59
    캄사~~~
  • ?
    중복 2008.10.11 19:24
    감사합니다^^
  • ?
    메카닉짱 2008.10.12 11:22
    오... 아주 좋은 스크립트 군요...
  • ?
    샤큐라몬 2008.10.12 13:16
    우와 진짜 되네요.. 감사해요. 추천 꾸욱~
  • ?
    FireFighter 2008.10.13 13:49
    ㄳ합니다.
  • ?
    후후훗군 2008.10.13 15:55
    그런데 Angel 이랑 싸우게되면 랄프가 공격했을때

    그다음에 '랄프의 공격'이 뜨면서 멈추네요 ㅜ.ㅜ
  • ?
    ese1315 2008.10.13 15:55
    도감에 드롭률 까지 나오네 ㅋ
  • ?
    Shot! 2008.10.13 18:57
    액알에선 사용불가ㄱㅡ
  • ?
    백년술사 2008.10.17 21:08

    님, 쓸 때마다..
    이상한 글이 나와여.

     

  • ?
    양파썰기 2008.12.01 22:11
    스크립트 충돌인듯
  • ?
    백년술사 2008.10.17 21:10

    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    #_/    ◆ モンスター図鑑 - KGC_EnemyGuide ◆ VX ◆
    #_/    ◇ Last update : 2008/09/08 ◇
    #_/----------------------------------------------------------------------------
    #_/  モンスター図鑑を作成します。
    #_/============================================================================
    #_/ 【基本機能】≪ドロップアイテム拡張≫ より上に導入してください。
    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    #==============================================================================
    # ★ カスタマイズ項目 - Customize ★
    #==============================================================================

    module KGC
    module EnemyGuide
      # ◆ 図鑑に背景画像を使用する
      #   true  : 背景画像をウィンドウ代わりに使用。
      #   false : 通常のウィンドウを使用。
      USE_BACKGROUND_IMAGE = false
      # ◆ 背景画像ファイル名
      #  "Graphics/System/" から読み込む。
      BACKGROUND_FILENAME  = "EnemyGuideBack"
      # ◆ 完成度表示のインターバル [フレーム]
      INFO_INTERVAL = 90

      # ◆ 名前の前に通し番号を表示
      #   true  : 001: スライム
      #   false : スライム
      SHOW_SERIAL_NUMBER = true
      # ◆ 通し番号をリストの並び順にする
      #  true  : ID を無視して表示順の番号を付ける。
      #  false : 通し番号として ID を使用。
      SERIAL_NUM_FOLLOW  = true
      # ◆ 通し番号の書式
      #  ヘルプの sprintf フォーマットを参照。
      SERIAL_NUM_FORMAT  = "%03d: "
      # ◆ 未遭遇の敵の名前
      #  1文字だけ指定すると、敵の名前と同じ文字数に拡張されます。
      UNKNOWN_ENEMY_NAME = "?"
      # ◆ 未遭遇の敵のデータ表示
      UNENCOUNTERED_DATA = "- No Data -"
      # ◆ 図鑑のパラメータ名
      PARAMETER_NAME = {
        :defeat_count   => "격파수",
        :weak_element   => "약점속성",
        :resist_element => "내성속성",
        :weak_state     => "약점 스테이트",
        :resist_state   => "무효 스테이트",
        :exp            => "경험치",
        :treasure       => "아이템",
        :drop_prob      => "드롭율",
        :steal_obj      => "훔칠 수 있는 것",
        :steal_prob     => "성공율",
      }  # ← これは消さないこと!
      # ◆ 未撃破の敵のパラメータ表示
      UNDEFEATED_PARAMETER = "???"
      # ◆ 未ドロップのアイテム名
      #  1文字だけ指定すると、アイテム名と同じ文字数に拡張されます。
      UNDROPPED_ITEM_NAME  = "?"

      # ◆ 属性耐性を調べる範囲
      #  耐性を調べる属性の ID を配列に格納。
      #  .. や ... を使用した範囲指定も可能。
      ELEMENT_RANGE = [1..16]
      # ◆ 属性のアイコン
      #  各属性に対応するアイコンの番号を指定。
      #  配列の添字が属性 ID に対応。
      ELEMENT_ICON = [nil,                       # ID:0 はダミー
         50,   1,   4,  14,  24,  12, 189, 136,  # 格闘 ~ 吸収
        104, 105, 106, 107, 108, 109, 110, 111,  # 炎 ~ 暗黒
      ]  # ← これは消さないこと!

      # ◆ 図鑑から隠す敵
      #  図鑑から隠したい敵の ID を配列に格納。
      #  ID と範囲 (1..10 など) のどちらでも可。
      # <例> HIDDEN_ENEMIES = [2, 4, 8, 16..32]
      HIDDEN_ENEMIES = []

      # ◆ 敵の並び順
      #  表示する敵の ID を、表示したい順に配列に格納。
      #  .. や ... を使用した範囲指定も可能。
      #  指定しなかった敵、または HIDDEN_ENEMIES に指定した敵は表示しない。
      #  (この機能を使用しない場合は nil)
      ENEMY_ORDER = nil
      # ENEMY_ORDER = [1..5, 8..13, 6, 7, 14, 15]
      #  ↑使用例

      # ◆ 変身前の敵も撃破
      #   true  : 変身前の敵も撃破したと見なす。
      #   false : 変身前の敵は未撃破 (遭遇のみ) と見なす。
      ORIGINAL_DEFEAT = true

      # ◆ メニュー画面に「モンスター図鑑」コマンドを追加する
      #  追加する場所は、メニューコマンドの最下部です。
      #  他の部分に追加したければ、≪カスタムメニューコマンド≫ をご利用ください。
      USE_MENU_ENEMY_GUIDE_COMMAND = false
      # ◆ メニュー画面の「モンスター図鑑」コマンドの名称
      VOCAB_MENU_ENEMY_GUIDE       = "몬스터도감"
    end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    $imported = {} if $imported == nil
    $imported["EnemyGuide"] = true

    module KGC
      module_function
      #--------------------------------------------------------------------------
      # ○ 文字列をマスク
      #     str  : マスク対象の文字列
      #     mask : マスク文字列
      #--------------------------------------------------------------------------
      def mask_string(str, mask)
        text = mask
        if mask.scan(/./).size == 1
          text = mask * str.scan(/./).size
        end
        return text
      end
    end

    module KGC::EnemyGuide
      # 正規表現
      module Regexp
        # エネミー
        module Enemy
          # 図鑑説明開始
          BEGIN_GUIDE_DESCRIPTION = /<(?:GUIDE_DESCRIPTION|도감)>/i
          # 図鑑説明終了
          END_GUIDE_DESCRIPTION = /</(?:GUIDE_DESCRIPTION|도감)>/i
        end
      end

      module_function
      #--------------------------------------------------------------------------
      # ○ Range と Integer の配列を Integer の配列に変換 (重複要素は排除)
      #--------------------------------------------------------------------------
      def convert_integer_array(array)
        result = []
        array.each { |i|
          case i
          when Range
            result |= i.to_a
          when Integer
            result |= [i]
          end
        }
        return result
      end
      #--------------------------------------------------------------------------
      # ○ 敵を表示するか
      #--------------------------------------------------------------------------
      def enemy_show?(enemy_id)
        return false if HIDDEN_ENEMY_LIST.include?(enemy_id)
        if ENEMY_ORDER_ID != nil
          return false unless ENEMY_ORDER_ID.include?(enemy_id)
        end

        return true
      end

      # 非表示モンスターリスト
      HIDDEN_ENEMY_LIST = convert_integer_array(HIDDEN_ENEMIES)
      # 表示順の敵 ID
      ENEMY_ORDER_ID = (ENEMY_ORDER == nil ? nil :
        convert_integer_array(ENEMY_ORDER))
      # チェックする属性リスト
      CHECK_ELEMENT_LIST = convert_integer_array(ELEMENT_RANGE)
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ KGC::Commands
    #==============================================================================

    module KGC
    module Commands
      module_function
      #--------------------------------------------------------------------------
      # ○ 遭遇状態取得
      #     enemy_id : 敵 ID
      #--------------------------------------------------------------------------
      def enemy_encountered?(enemy_id)
        return $game_system.enemy_encountered[enemy_id]
      end
      #--------------------------------------------------------------------------
      # ○ 撃破状態取得
      #     enemy_id : 敵 ID
      #--------------------------------------------------------------------------
      def enemy_defeated?(enemy_id)
        return $game_system.enemy_defeated[enemy_id]
      end
      #--------------------------------------------------------------------------
      # ○ アイテムドロップ状態取得
      #     enemy_id   : 敵 ID
      #     item_index : ドロップアイテム番号
      #--------------------------------------------------------------------------
      def enemy_item_dropped?(enemy_id, item_index)
        if $game_system.enemy_item_dropped[enemy_id] == nil
          return false
        end
        result = $game_system.enemy_item_dropped[enemy_id] & (1 << item_index)
        return (result != 0)
      end
      #--------------------------------------------------------------------------
      # ○ 盗み成功済み状態取得
      #     enemy_id  : 敵 ID
      #     obj_index : オブジェクト番号
      #--------------------------------------------------------------------------
      def enemy_object_stolen?(enemy_id, obj_index)
        if $game_system.enemy_object_stolen[enemy_id] == nil
          return false
        end
        result = $game_system.enemy_object_stolen[enemy_id] & (1 << obj_index)
        return (result != 0)
      end
      #--------------------------------------------------------------------------
      # ○ 遭遇状態設定
      #     enemy_id : 敵 ID
      #     enabled  : true..遭遇済み  false..未遭遇
      #--------------------------------------------------------------------------
      def set_enemy_encountered(enemy_id, enabled = true)
        $game_system.enemy_encountered[enemy_id] = enabled
        unless enabled
          # 未遭遇なら撃破済みフラグも解除
          set_enemy_defeated(enemy_id, false)
        end
      end
      #--------------------------------------------------------------------------
      # ○ 撃破状態設定
      #     enemy_id : 敵 ID
      #     enabled  : true..撃破済み  false..未撃破
      #--------------------------------------------------------------------------
      def set_enemy_defeated(enemy_id, enabled = true)
        $game_system.enemy_defeated[enemy_id] = enabled
        if enabled
          # 撃破済みなら遭遇フラグもセット
          set_enemy_encountered(enemy_id)
        end
      end
      #--------------------------------------------------------------------------
      # ○ アイテムドロップ状態設定
      #     enemy_id   : 敵 ID
      #     item_index : ドロップアイテム番号
      #     enabled    : true..ドロップ済み  false..未ドロップ
      #--------------------------------------------------------------------------
      def set_enemy_item_dropped(enemy_id, item_index, enabled = true)
        if $game_system.enemy_item_dropped[enemy_id] == nil
          $game_system.enemy_item_dropped[enemy_id] = 0
        end
        if enabled
          $game_system.enemy_item_dropped[enemy_id] |= (1 << item_index)
        else
          $game_system.enemy_item_dropped[enemy_id] &= ~(1 << item_index)
        end
      end
      #--------------------------------------------------------------------------
      # ○ 盗み成功状態設定
      #     enemy_id  : 敵 ID
      #     obj_index : オブジェクト番号
      #     enabled   : true..成功済み  false..未成功
      #--------------------------------------------------------------------------
      def set_enemy_object_stolen(enemy_id, obj_index, enabled = true)
        if $game_system.enemy_object_stolen[enemy_id] == nil
          $game_system.enemy_object_stolen[enemy_id] = 0
        end
        if enabled
          $game_system.enemy_object_stolen[enemy_id] |= (1 << obj_index)
        else
          $game_system.enemy_object_stolen[enemy_id] &= ~(1 << obj_index)
        end
      end
      #--------------------------------------------------------------------------
      # ○ 図鑑リセット
      #--------------------------------------------------------------------------
      def reset_enemy_guide
        $game_system.enemy_encountered = []
        $game_system.enemy_defeated = []
        $game_system.enemy_item_dropped = []
        $game_system.enemy_object_stolen = []
      end
      #--------------------------------------------------------------------------
      # ○ 図鑑完成
      #--------------------------------------------------------------------------
      def complete_enemy_guide
        (1...$data_enemies.size).each { |i|
          set_enemy_encountered(i)
          set_enemy_defeated(i)

          enemy = $data_enemies[i]

          items = [enemy.drop_item1, enemy.drop_item2]
          if $imported["ExtraDropItem"]
            items += enemy.extra_drop_items
          end
          items.each_index { |j| set_enemy_item_dropped(i, j) }

          if $imported["Steal"]
            objs = enemy.steal_objects
            objs.each_index { |j| set_enemy_object_stolen(i, j) }
          end
        }
      end
      #--------------------------------------------------------------------------
      # ○ 図鑑に含めるか
      #     enemy_id : 敵 ID
      #--------------------------------------------------------------------------
      def enemy_guide_include?(enemy_id)
        return false unless KGC::EnemyGuide.enemy_show?(enemy_id)
        enemy = $data_enemies[enemy_id]
        return (enemy != nil && enemy.name != "")
      end
      #--------------------------------------------------------------------------
      # ○ 存在する敵の種類数取得
      #     variable_id : 取得した値を代入する変数の ID
      #--------------------------------------------------------------------------
      def get_all_enemies_number(variable_id = 0)
        n = 0
        (1...$data_enemies.size).each { |i|
          n += 1 if enemy_guide_include?(i)
        }
        $game_variables[variable_id] = n if variable_id > 0
        return n
      end
      #--------------------------------------------------------------------------
      # ○ 遭遇した敵の種類数取得
      #     variable_id : 取得した値を代入する変数の ID
      #--------------------------------------------------------------------------
      def get_encountered_enemies_number(variable_id = 0)
        n = 0
        (1...$data_enemies.size).each { |i|
          if enemy_guide_include?(i) && $game_system.enemy_encountered[i]
            n += 1
          end
        }
        $game_variables[variable_id] = n if variable_id > 0
        return n
      end
      #--------------------------------------------------------------------------
      # ○ 撃破した敵の種類数取得
      #     variable_id : 取得した値を代入する変数の ID
      #--------------------------------------------------------------------------
      def get_defeated_enemies_number(variable_id = 0)
        n = 0
        (1...$data_enemies.size).each { |i|
          if enemy_guide_include?(i) && $game_system.enemy_encountered[i] &&
              $game_system.enemy_defeated[i]
            n += 1
          end
        }
        $game_variables[variable_id] = n if variable_id > 0
        return n
      end
      #--------------------------------------------------------------------------
      # ○ モンスター図鑑完成度の取得
      #     variable_id : 取得した値を代入する変数の ID
      #--------------------------------------------------------------------------
      def get_enemy_guide_completion(variable_id = 0)
        num = get_all_enemies_number
        value = (num > 0 ? (get_defeated_enemies_number * 100 / num) : 0)
        $game_variables[variable_id] = value if variable_id > 0
        return value
      end
      #--------------------------------------------------------------------------
      # ○ モンスター図鑑呼び出し
      #--------------------------------------------------------------------------
      def call_enemy_guide
        return if $game_temp.in_battle
        $game_temp.next_scene = :enemy_guide
      end
    end
    end

    class Game_Interpreter
      include KGC::Commands
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Vocab
    #==============================================================================

    module Vocab
      # モンスター図鑑
      def self.enemy_guide
        return KGC::EnemyGuide::VOCAB_MENU_ENEMY_GUIDE
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ RPG::Enemy
    #==============================================================================

    class RPG::Enemy
      #--------------------------------------------------------------------------
      # ○ モンスター図鑑のキャッシュ生成
      #--------------------------------------------------------------------------
      def create_enemy_guide_cache
        @__enemy_guide_description = ""

        description_flag = false
        self.note.each_line { |line|
          case line
          when KGC::EnemyGuide::Regexp::Enemy::BEGIN_GUIDE_DESCRIPTION
            # 説明文開始
            description_flag = true
          when KGC::EnemyGuide::Regexp::Enemy::END_GUIDE_DESCRIPTION
            # 説明文終了
            description_flag = false
          else
            if description_flag
              @__enemy_guide_description += line
            end
          end
        }
      end
      #--------------------------------------------------------------------------
      # ○ 図鑑説明文
      #--------------------------------------------------------------------------
      def enemy_guide_description
        create_enemy_guide_cache if @__enemy_guide_description == nil
        return @__enemy_guide_description
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Game_System
    #==============================================================================

    class Game_System
      #--------------------------------------------------------------------------
      # ● 公開インスタンス変数
      #--------------------------------------------------------------------------
      attr_writer   :enemy_encountered        # 遭遇済みフラグ
      attr_writer   :enemy_defeated           # 撃破済みフラグ
      attr_writer   :enemy_item_dropped       # アイテムドロップ済みフラグ
      attr_writer   :enemy_object_stolen      # 盗み成功済みフラグ
      #--------------------------------------------------------------------------
      # ○ 遭遇済みフラグ取得
      #--------------------------------------------------------------------------
      def enemy_encountered
        @enemy_encountered = [] if @enemy_encountered == nil
        return @enemy_encountered
      end
      #--------------------------------------------------------------------------
      # ○ 撃破済みフラグ取得
      #--------------------------------------------------------------------------
      def enemy_defeated
        @enemy_defeated = [] if @enemy_defeated == nil
        return @enemy_defeated
      end
      #--------------------------------------------------------------------------
      # ○ アイテムドロップ済みフラグ取得
      #--------------------------------------------------------------------------
      def enemy_item_dropped
        @enemy_item_dropped = [] if @enemy_item_dropped == nil
        return @enemy_item_dropped
      end
      #--------------------------------------------------------------------------
      # ○ 盗み成功済みフラグ取得
      #--------------------------------------------------------------------------
      def enemy_object_stolen
        @enemy_object_stolen = [] if @enemy_object_stolen == nil
        return @enemy_object_stolen
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Game_Enemy
    #==============================================================================

    class Game_Enemy < Game_Battler
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #     index    : 敵グループ内インデックス
      #     enemy_id : 敵キャラ ID
      #--------------------------------------------------------------------------
      alias initialize_KGC_EnemyGuide initialize
      def initialize(index, enemy_id)
        initialize_KGC_EnemyGuide(index, enemy_id)

        @original_ids = []  # 変身前の ID
        # 遭遇済みフラグをオン
        KGC::Commands.set_enemy_encountered(enemy_id) unless hidden
      end
      #--------------------------------------------------------------------------
      # ● コラプスの実行
      #--------------------------------------------------------------------------
      alias perform_collapse_KGC_EnemyGuide perform_collapse
      def perform_collapse
        last_collapsed = @collapse

        perform_collapse_KGC_EnemyGuide

        if !last_collapsed && @collapse
          # 撃破済みフラグをオン
          KGC::Commands.set_enemy_defeated(enemy_id)
          # 変身前の敵も撃破済みにする
          if KGC::EnemyGuide::ORIGINAL_DEFEAT
            @original_ids.compact.each { |i|
              KGC::Commands.set_enemy_defeated(i)
            }
          end
        end
      end
      #--------------------------------------------------------------------------
      # ● 変身
      #     enemy_id : 変身先の敵キャラ ID
      #--------------------------------------------------------------------------
      alias transform_KGC_EnemyGuide transform
      def transform(enemy_id)
        # 変身前のIDを保存
        @original_ids << @enemy_id

        transform_KGC_EnemyGuide(enemy_id)

        # 変身後の敵も遭遇済みにする
        KGC::Commands.set_enemy_encountered(enemy_id)
      end
      #--------------------------------------------------------------------------
      # ● 隠れ状態設定
      #--------------------------------------------------------------------------
      alias hidden_equal_KGC_EnemyGuide hidden= unless $@
      def hidden=(value)
        hidden_equal_KGC_EnemyGuide(value)
        # 出現した場合は遭遇済みフラグをオン
        KGC::Commands.set_enemy_encountered(enemy_id) unless value
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Game_Troop
    #==============================================================================

    class Game_Troop < Game_Unit
      #--------------------------------------------------------------------------
      # ● ドロップアイテムの配列作成
      #--------------------------------------------------------------------------
      def make_drop_items
        drop_items = []
        dead_members.each { |enemy|
          [enemy.drop_item1, enemy.drop_item2].each_with_index { |di, i|
            next if di.kind == 0
            next if rand(di.denominator) != 0
            if di.kind == 1
              drop_items.push($data_items[di.item_id])
            elsif di.kind == 2
              drop_items.push($data_weapons[di.weapon_id])
            elsif di.kind == 3
              drop_items.push($data_armors[di.armor_id])
            end
            # ドロップ済みフラグをセット
            KGC::Commands.set_enemy_item_dropped(enemy.enemy.id, i)
          }
        }
        return drop_items
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Window_Command
    #==============================================================================

    class Window_Command < Window_Selectable
      unless method_defined?(:add_command)
      #--------------------------------------------------------------------------
      # ○ コマンドを追加
      #    追加した位置を返す
      #--------------------------------------------------------------------------
      def add_command(command)
        @commands << command
        @item_max = @commands.size
        item_index = @item_max - 1
        refresh_command
        draw_item(item_index)
        return item_index
      end
      #--------------------------------------------------------------------------
      # ○ コマンドをリフレッシュ
      #--------------------------------------------------------------------------
      def refresh_command
        buf = self.contents.clone
        self.height = [self.height, row_max * WLH + 32].max
        create_contents
        self.contents.blt(0, 0, buf, buf.rect)
        buf.dispose
      end
      #--------------------------------------------------------------------------
      # ○ コマンドを挿入
      #--------------------------------------------------------------------------
      def insert_command(index, command)
        @commands.insert(index, command)
        @item_max = @commands.size
        refresh_command
        refresh
      end
      #--------------------------------------------------------------------------
      # ○ コマンドを削除
      #--------------------------------------------------------------------------
      def remove_command(command)
        @commands.delete(command)
        @item_max = @commands.size
        refresh
      end
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Window_EnemyGuideTop
    #------------------------------------------------------------------------------
    #   モンスター図鑑画面で、完成度を表示するウィンドウです。
    #==============================================================================

    class Window_EnemyGuideTop < Window_Base
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #--------------------------------------------------------------------------
      def initialize
        super(0, 0, 240, WLH * 4 + 32)
        self.height = WLH + 32
        @duration = 0
        @interval = KGC::EnemyGuide::INFO_INTERVAL
        refresh

        if KGC::EnemyGuide::USE_BACKGROUND_IMAGE
          self.opacity = 0
        end
        if self.windowskin != nil
          bitmap = Bitmap.new(windowskin.width, windowskin.height)
          bitmap.blt(0, 0, windowskin, windowskin.rect)
          bitmap.clear_rect(80, 16, 32, 32)
          self.windowskin = bitmap
        end
      end
      #--------------------------------------------------------------------------
      # ● 破棄
      #--------------------------------------------------------------------------
      def dispose
        self.windowskin.dispose
        super
      end
      #--------------------------------------------------------------------------
      # ● リフレッシュ
      #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        total = KGC::Commands.get_all_enemies_number
        encountered = KGC::Commands.get_encountered_enemies_number
        defeated = KGC::Commands.get_defeated_enemies_number

        text = sprintf("만남이 끝난 상태: %3d/%3d ",encountered, total)
        self.contents.draw_text(0,       0, width - 32, WLH, text, 1)
        self.contents.draw_text(0, WLH * 3, width - 32, WLH, text, 1)
        text = sprintf("격파가 끝난 상태: %3d/%3d", defeated, total)
        self.contents.draw_text(0, WLH, width - 32, WLH, text, 1)
        text = sprintf("완성도: %3d%%", defeated * 100 / total)
        self.contents.draw_text(0, WLH * 2, width - 32, WLH, text, 1)
      end
      #--------------------------------------------------------------------------
      # ● フレーム更新
      #--------------------------------------------------------------------------
      def update
        @duration += 1
        case @duration
        when @interval...(@interval + WLH)
          self.oy += 1
        when (@interval + WLH)
          @duration = 0
          if self.oy >= WLH * 3
            self.oy = 0
          end
        end
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Window_EnemyGuideList
    #------------------------------------------------------------------------------
    #   モンスター図鑑画面で、モンスター一覧を表示するウィンドウです。
    #==============================================================================

    class Window_EnemyGuideList < Window_Selectable
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #--------------------------------------------------------------------------
      def initialize
        super(0, WLH + 32, 240, Graphics.height - (WLH + 32))
        self.index = 0
        refresh
        if KGC::EnemyGuide::USE_BACKGROUND_IMAGE
          self.opacity = 0
          self.height -= (self.height - 32) % WLH
        end
      end
      #--------------------------------------------------------------------------
      # ○ 選択モンスターの取得
      #--------------------------------------------------------------------------
      def item
        return @data[self.index]
      end
      #--------------------------------------------------------------------------
      # ○ エネミーをリストに含めるか
      #     enemy_id : 敵 ID
      #--------------------------------------------------------------------------
      def include?(enemy_id)
        return KGC::Commands.enemy_guide_include?(enemy_id)
      end
      #--------------------------------------------------------------------------
      # ● リフレッシュ
      #--------------------------------------------------------------------------
      def refresh
        @data = []
        if KGC::EnemyGuide::ENEMY_ORDER_ID == nil
          # ID順
          enemy_list = 1...$data_enemies.size
        else
          # 指定順
          enemy_list = KGC::EnemyGuide::ENEMY_ORDER_ID
        end
        enemy_list.each { |i|
          @data << $data_enemies[i] if include?(i)
        }
        @item_max = @data.size
        create_contents
        for i in 0...@item_max
          draw_item(i)
        end
      end
      #--------------------------------------------------------------------------
      # ● 項目の描画
      #     index : 項目番号
      #--------------------------------------------------------------------------
      def draw_item(index)
        enemy = @data[index]
        self.contents.font.color = normal_color
        unless KGC::Commands.enemy_defeated?(enemy.id)
          self.contents.font.color.alpha = 128
        end
        rect = item_rect(index)
        self.contents.clear_rect(rect)

        if KGC::EnemyGuide::SHOW_SERIAL_NUMBER
          s_num = sprintf(KGC::EnemyGuide::SERIAL_NUM_FORMAT,
            KGC::EnemyGuide::SERIAL_NUM_FOLLOW ? (index + 1) : enemy.id)
        end

        text = (KGC::EnemyGuide::SHOW_SERIAL_NUMBER ? s_num : "")
        if KGC::Commands.enemy_encountered?(enemy.id)
          # 遭遇済み
          text += enemy.name
        else
          # 未遭遇
          mask = KGC::EnemyGuide::UNKNOWN_ENEMY_NAME
          if mask.scan(/./).size == 1
            mask = mask * enemy.name.scan(/./).size
          end
          text += mask
        end
        self.contents.draw_text(rect, text)
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Window_EnemyGuideStatus
    #------------------------------------------------------------------------------
    #   モンスター図鑑画面で、ステータスを表示するウィンドウです。
    #==============================================================================

    class Window_EnemyGuideStatus < Window_Base
      #--------------------------------------------------------------------------
      # ○ 定数
      #--------------------------------------------------------------------------
      PAGES = 3  # ページ数
      #--------------------------------------------------------------------------
      # ● 公開インスタンス変数
      #--------------------------------------------------------------------------
      attr_reader   :enemy                    # 表示エネミー
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #--------------------------------------------------------------------------
      def initialize
        super(240, 0, Graphics.width - 240, Graphics.height)
        self.enemy = nil
        self.z = 100
        if KGC::EnemyGuide::USE_BACKGROUND_IMAGE
          self.opacity = 0
        end
        @show_sprite = false
        @enemy_sprite = Sprite.new
        @enemy_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
        @enemy_sprite.x = 0
        @enemy_sprite.y = 0
        @enemy_sprite.z = self.z + 100
        @enemy_sprite.visible = false
      end
      #--------------------------------------------------------------------------
      # ● 破棄
      #--------------------------------------------------------------------------
      def dispose
        super
        @enemy_sprite.bitmap.dispose
        @enemy_sprite.dispose
      end
      #--------------------------------------------------------------------------
      # ○ 表示エネミー設定
      #--------------------------------------------------------------------------
      def enemy=(enemy)
        @enemy = enemy
        refresh
      end
      #--------------------------------------------------------------------------
      # ○ 表示情報切り替え
      #     shamt : 移動ページ数
      #--------------------------------------------------------------------------
      def shift_info_type(shamt)
        n = self.ox + (width - 32) * shamt
        self.ox = [[n, 0].max, (width - 32) * (PAGES - 1)].min
      end
      #--------------------------------------------------------------------------
      # ○ スプライト表示切替
      #--------------------------------------------------------------------------
      def switch_sprite
        @show_sprite = !@show_sprite
        @enemy_sprite.visible = @show_sprite
      end
      #--------------------------------------------------------------------------
      # ● リフレッシュ
      #--------------------------------------------------------------------------
      def refresh
        original_width = self.width
        self.width = original_width * PAGES - (32 * (PAGES - 1))
        create_contents
        self.width = original_width

        draw_enemy_sprite

        return if enemy == nil

        self.contents.font.color = normal_color
        # 遭遇していない
        unless KGC::Commands.enemy_encountered?(enemy.id)
          self.contents.font.color.alpha = 128
          dy = (height - 32) / 2
          dy -= dy % WLH
          self.contents.draw_text(0, dy, width - 32, WLH,
            KGC::EnemyGuide::UNENCOUNTERED_DATA, 1)
          self.contents.blt(width - 32, 0, self.contents, self.contents.rect)
          return
        end

        draw_status
      end
      #--------------------------------------------------------------------------
      # ○ ステータス描画
      #--------------------------------------------------------------------------
      def draw_status
        # Page 1
        dy = draw_basic_info(0, 0)
        dy = draw_parameter2(0, dy)
        dy = draw_element(0, dy, 2)
        dy = draw_state(0, dy, 2)
        draw_prize(0, dy)
        # Page 2
        dx = width - 32
        dy = draw_basic_info(dx, 0)
        max_rows = (self.height - dy - 32) / WLH
        rows = (max_rows + 1) / 2
        dy = draw_drop_item(dx, dy, rows)
        draw_steal_object(dx, dy, max_rows - rows)
        # Page 3
        dx = (width - 32) * 2
        dy = draw_basic_info(dx, 0)
        draw_description(dx, dy)
      end
      #--------------------------------------------------------------------------
      # ○ 基本情報画
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_basic_info(dx, dy)
        draw_graphic(dx, dy)
        draw_parameter1(dx + 112, dy)
        return dy + 96
      end
      #--------------------------------------------------------------------------
      # ○ グラフィック描画
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_graphic(dx, dy)
        buf = Bitmap.new(108, 96)
        bitmap = Cache.battler(enemy.battler_name, enemy.battler_hue)
        rect = Rect.new(0, 0, bitmap.width / 3, bitmap.height / 3)
        rect.x = (108 - rect.width) / 2
        rect.y = (96 - rect.height) / 2
        buf.stretch_blt(rect, bitmap, bitmap.rect)
        self.contents.blt(dx, dy, buf, buf.rect)
        buf.dispose
      end
      #--------------------------------------------------------------------------
      # ○ エネミースプライト描画
      #--------------------------------------------------------------------------
      def draw_enemy_sprite
        return if @enemy_sprite == nil

        @enemy_sprite.bitmap.fill_rect(@enemy_sprite.bitmap.rect,
          Color.new(0, 0, 0, 160))

        return if enemy == nil || !KGC::Commands.enemy_encountered?(enemy.id)

        bitmap = Cache.battler(enemy.battler_name, enemy.battler_hue)
        dx = (Graphics.width - bitmap.width) / 2
        dy = (Graphics.height - bitmap.height) / 2
        @enemy_sprite.bitmap.blt(dx, dy, bitmap, bitmap.rect)
      end
      #--------------------------------------------------------------------------
      # ○ パラメータ描画 - 1
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_parameter1(dx, dy)
        # 名前, HP, MP
        param = {}
        if KGC::Commands.enemy_defeated?(enemy.id)
          param[:maxhp] = enemy.maxhp
          param[:maxmp] = enemy.maxmp
          if $imported["BattleCount"]
            param[:defeat_count] = KGC::Commands.get_defeat_count(enemy.id)
          end
        else
          param[:maxhp] = param[:maxmp] = KGC::EnemyGuide::UNDEFEATED_PARAMETER
          param[:defeat_count] = 0
        end

        self.contents.font.color = normal_color
        self.contents.draw_text(dx, dy, width - 144, WLH, enemy.name)
        self.contents.font.color = system_color
        self.contents.draw_text(dx, dy + WLH,     80, WLH, Vocab.hp)
        self.contents.draw_text(dx, dy + WLH * 2, 80, WLH, Vocab.mp)
        if $imported["BattleCount"]
          self.contents.draw_text(dx, dy + WLH * 3, 80, WLH,
            KGC::EnemyGuide::PARAMETER_NAME[:defeat_count])
        end
        self.contents.font.color = normal_color
        self.contents.draw_text(dx + 88, dy + WLH,     64, WLH, param[:maxhp], 2)
        self.contents.draw_text(dx + 88, dy + WLH * 2, 64, WLH, param[:maxmp], 2)
        if $imported["BattleCount"]
          self.contents.draw_text(dx + 88, dy + WLH * 3, 64, WLH,
            param[:defeat_count], 2)
        end
      end
      #--------------------------------------------------------------------------
      # ○ パラメータ描画 - 2
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_parameter2(dx, dy)
        # ATK ~ AGI
        param = {}
        if KGC::Commands.enemy_defeated?(enemy.id)
          param[:atk]   = enemy.atk
          param[:def]   = enemy.def
          param[:spi]   = enemy.spi
          param[:agi]   = enemy.agi
        else
          param[:atk] = param[:def] = param[:spi] = param[:agi] =
            KGC::EnemyGuide::UNDEFEATED_PARAMETER
        end

        dw = (width - 32) / 2
        self.contents.font.color = system_color
        self.contents.draw_text(dx,      dy,       80, WLH, Vocab.atk)
        self.contents.draw_text(dx + dw, dy,       80, WLH, Vocab.def)
        self.contents.draw_text(dx,      dy + WLH, 80, WLH, Vocab.spi)
        self.contents.draw_text(dx + dw, dy + WLH, 80, WLH, Vocab.agi)
        dx += 80
        self.contents.font.color = normal_color
        self.contents.draw_text(dx,      dy,       48, WLH, param[:atk], 2)
        self.contents.draw_text(dx + dw, dy,       48, WLH, param[:def], 2)
        self.contents.draw_text(dx     , dy + WLH, 48, WLH, param[:spi], 2)
        self.contents.draw_text(dx + dw, dy + WLH, 48, WLH, param[:agi], 2)
        return dy + WLH * 2
      end
      #--------------------------------------------------------------------------
      # ○ 属性描画
      #     dx, dy : 描画先 X, Y
      #     rows   : 行数
      #--------------------------------------------------------------------------
      def draw_element(dx, dy, rows = 1)
        new_dy = dy + WLH * (rows * 2)
        self.contents.font.color = system_color
        self.contents.draw_text(dx, dy,              80, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:weak_element])
        self.contents.draw_text(dx, dy + WLH * rows, 80, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:resist_element])

        return new_dy unless KGC::Commands.enemy_defeated?(enemy.id)

        cols = (width - 112) / 24
        # 弱点属性
        draw_icon_list(dx + 80, dy, rows, cols,
          KGC::EnemyGuide::CHECK_ELEMENT_LIST,
          Proc.new { |i| enemy.element_ranks[i] < 3 },
          Proc.new { |i| KGC::EnemyGuide::ELEMENT_ICON[i] })
        # 耐性属性
        draw_icon_list(dx + 80, dy + WLH * rows, rows, cols,
          KGC::EnemyGuide::CHECK_ELEMENT_LIST,
          Proc.new { |i| enemy.element_ranks[i] > 3 },
          Proc.new { |i| KGC::EnemyGuide::ELEMENT_ICON[i] })
        return new_dy
      end
      #--------------------------------------------------------------------------
      # ○ アイコンリスト描画
      #     dx, dy     : 描画先 X, Y
      #     rows, cols : アイコン行/列数
      #     item_list  : 描画対象のリスト
      #     cond_proc  : 描画条件 Proc
      #     index_proc : アイコン index 取得用 Proc
      #--------------------------------------------------------------------------
      def draw_icon_list(dx, dy, rows, cols, item_list, cond_proc, index_proc)
        nc = 0  # 現在の列数
        nr = 0  # 現在の行数
        item_list.each { |item|
          next if item == nil
          next unless cond_proc.call(item)
          icon_index = index_proc.call(item)
          next if icon_index == nil || icon_index == 0

          draw_icon(icon_index, dx + nc * 24, dy + nr * 24)
          nc += 1
          if nc == cols
            # 次の行へ
            nc = 0
            nr += 1
            break if nr == rows  # 行制限オーバー
          end
        }
      end
      #--------------------------------------------------------------------------
      # ○ ステート描画
      #     dx, dy : 描画先 X, Y
      #     rows   : 行数
      #--------------------------------------------------------------------------
      def draw_state(dx, dy, rows = 1)
        new_dy = dy + WLH * (rows * 2)
        self.contents.font.color = system_color
        self.contents.draw_text(dx, dy,              80, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:weak_state])
        self.contents.draw_text(dx, dy + WLH * rows, 80, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:resist_state])

        return new_dy unless KGC::Commands.enemy_defeated?(enemy.id)

        cols = (width - 112) / 24
        # 弱点ステート
        draw_icon_list(dx + 80, dy, rows, cols,
          $data_states,
          Proc.new { |i| enemy.state_ranks[i.id] < 3 },
          Proc.new { |i| i.icon_index })
        # 無効ステート
        draw_icon_list(dx + 80, dy + WLH * rows, rows, cols,
          $data_states,
          Proc.new { |i| enemy.state_ranks[i.id] == 6 },
          Proc.new { |i| i.icon_index })
        return new_dy
      end
      #--------------------------------------------------------------------------
      # ○ EXP, Gold 描画
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_prize(dx, dy)
        param = {}
        if KGC::Commands.enemy_defeated?(enemy.id)
          param[:exp]  = enemy.exp
          param[:gold] = enemy.gold
          param[:ap]   = enemy.ap if $imported["EquipLearnSkill"]
        else
          param[:exp] = param[:gold] = param[:ap] =
            KGC::EnemyGuide::UNDEFEATED_PARAMETER
        end

        dw = (width - 32) / 2
        self.contents.font.color = system_color
        self.contents.draw_text(dx,      dy, 80, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:exp])
        self.contents.draw_text(dx + dw, dy, 80, WLH, Vocab.gold)
        if $imported["EquipLearnSkill"]
          self.contents.draw_text(dx, dy + WLH, 80, WLH, Vocab.ap)
        end

        # EXP, Gold
        dx += 76
        self.contents.font.color = normal_color
        self.contents.draw_text(dx,      dy, 52, WLH, param[:exp], 2)
        self.contents.draw_text(dx + dw, dy, 52, WLH, param[:gold], 2)
        if $imported["EquipLearnSkill"]
          self.contents.draw_text(dx, dy + WLH, 52, WLH, param[:ap], 2)
        end

        return dy + WLH * 2
      end
      #--------------------------------------------------------------------------
      # ○ ドロップアイテム描画
      #     dx, dy : 描画先 X, Y
      #     rows   : 行数
      #--------------------------------------------------------------------------
      def draw_drop_item(dx, dy, rows)
        new_dy = dy + WLH * rows
        dw = (width - 32) / 2
        self.contents.font.color = system_color
        self.contents.draw_text(dx,      dy, 128, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:treasure], 1)
        self.contents.draw_text(dx + dw, dy, 128, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:drop_prob], 2)

        return new_dy unless KGC::Commands.enemy_defeated?(enemy.id)

        # リスト作成
        drop_items = [enemy.drop_item1, enemy.drop_item2]
        if $imported["ExtraDropItem"]
          drop_items += enemy.extra_drop_items
        end
        drop_items.delete_if { |i| i.kind == 0 }
        if drop_items.size >= rows
          drop_items = drop_items[0...(rows - 1)]
        end

        dy += WLH
        drop_items.each_with_index { |item, i|
          # アイテム名描画
          case item.kind
          when 0
            next
          when 1
            drop_item = $data_items[item.item_id]
          when 2
            drop_item = $data_weapons[item.weapon_id]
          when 3
            drop_item = $data_armors[item.armor_id]
          end
          if KGC::Commands.enemy_item_dropped?(enemy.id, i)
            draw_item_name(drop_item, dx, dy)
          else
            draw_masked_item_name(drop_item, dx, dy)
          end
          # ドロップ率描画
          if $imported["ExtraDropItem"] && item.drop_prob > 0
            text = sprintf("%d%%", item.drop_prob)
          else
            text = "1/#{item.denominator}"
          end
          self.contents.draw_text(dx + dw, dy, 128, WLH, text, 2)
          dy += WLH
        }

        return new_dy
      end
      #--------------------------------------------------------------------------
      # ○ アイテム名をマスクして描画
      #     item    : アイテム (スキル、武器、防具でも可)
      #     x       : 描画先 X 座標
      #     y       : 描画先 Y 座標
      #     enabled : 有効フラグ。false のとき半透明で描画
      #--------------------------------------------------------------------------
      def draw_masked_item_name(item, x, y, enabled = true)
        return if item == nil

        draw_icon(item.icon_index, x, y, enabled)
        self.contents.font.color = normal_color
        self.contents.font.color.alpha = enabled ? 255 : 128
        mask = KGC::EnemyGuide::UNDROPPED_ITEM_NAME
        text = KGC.mask_string(item.name, mask)
        self.contents.draw_text(x + 24, y, 172, WLH, text)
      end
      #--------------------------------------------------------------------------
      # ○ 盗めるオブジェクト描画
      #     dx, dy : 描画先 X, Y
      #     rows   : 行数
      #--------------------------------------------------------------------------
      def draw_steal_object(dx, dy, rows)
        return unless $imported["Steal"]

        new_dy = dy + WLH * rows
        dw = (width - 32) / 2
        self.contents.font.color = system_color
        self.contents.draw_text(dx,      dy, 128, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:steal_obj], 1)
        self.contents.draw_text(dx + dw, dy, 128, WLH,
          KGC::EnemyGuide::PARAMETER_NAME[:steal_prob], 2)

        return new_dy unless KGC::Commands.enemy_defeated?(enemy.id)

        # リスト作成
        steal_objects = enemy.steal_objects.clone
        if steal_objects.size >= rows
          steal_objects = steal_objects[0...(rows - 1)]
        end

        dy += WLH
        steal_objects.each_with_index { |obj, i|
          if obj.kind == 4
            # Gold
            if KGC::Commands.enemy_object_stolen?(enemy.id, i)
              text = sprintf("%d%s", obj.gold, Vocab.gold)
            else
              mask = KGC::EnemyGuide::UNDROPPED_ITEM_NAME
              text = KGC.mask_string("aaa", mask)
            end
            self.contents.draw_text(dx + 24, dy, dw, WLH, text)
          else
            # Item
            case obj.kind
            when 1
              item = $data_items[obj.item_id]
            when 2
              item = $data_weapons[obj.weapon_id]
            when 3
              item = $data_armors[obj.armor_id]
            end
            if KGC::Commands.enemy_object_stolen?(enemy.id, i)
              draw_item_name(item, dx, dy)
            else
              draw_masked_item_name(item, dx, dy)
            end
          end
          # 成功率描画
          if obj.success_prob > 0
            text = sprintf("%d%%", obj.success_prob)
          else
            text = "1/#{obj.denominator}"
          end
          self.contents.draw_text(dx + dw, dy, 128, WLH, text, 2)
          dy += WLH
        }

        return new_dy
      end
      #--------------------------------------------------------------------------
      # ○ 説明文描画
      #     dx, dy : 描画先 X, Y
      #--------------------------------------------------------------------------
      def draw_description(dx, dy)
        return unless KGC::Commands.enemy_defeated?(enemy.id)

        dx += 4
        enemy.enemy_guide_description.each_line { |line|
          self.contents.draw_text(dx, dy, width - 32, WLH, line.chomp)
          dy += WLH
        }
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Scene_Map
    #==============================================================================

    class Scene_Map < Scene_Base
      #--------------------------------------------------------------------------
      # ● 画面切り替えの実行
      #--------------------------------------------------------------------------
      alias update_scene_change_KGC_EnemyGuide update_scene_change
      def update_scene_change
        return if $game_player.moving?    # プレイヤーの移動中?

        if $game_temp.next_scene == :enemy_guide
          call_enemy_guide
          return
        end

        update_scene_change_KGC_EnemyGuide
      end
      #--------------------------------------------------------------------------
      # ○ モンスター図鑑への切り替え
      #--------------------------------------------------------------------------
      def call_enemy_guide
        $game_temp.next_scene = nil
        $scene = Scene_EnemyGuide.new(0, Scene_EnemyGuide::HOST_MAP)
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Scene_Menu
    #==============================================================================

    class Scene_Menu < Scene_Base
      if KGC::EnemyGuide::USE_MENU_ENEMY_GUIDE_COMMAND
      #--------------------------------------------------------------------------
      # ● コマンドウィンドウの作成
      #--------------------------------------------------------------------------
      alias create_command_window_KGC_EnemyGuide create_command_window
      def create_command_window
        create_command_window_KGC_EnemyGuide

        return if $imported["CustomMenuCommand"]

        @__command_enemy_guide_index =
          @command_window.add_command(Vocab.enemy_guide)
        if @command_window.oy > 0
          @command_window.oy -= Window_Base::WLH
        end
        @command_window.index = @menu_index
      end
      end
      #--------------------------------------------------------------------------
      # ● コマンド選択の更新
      #--------------------------------------------------------------------------
      alias update_command_selection_KGC_EnemyGuide update_command_selection
      def update_command_selection
        current_menu_index = @__command_enemy_guide_index
        call_enemy_guide_flag = false

        if Input.trigger?(Input::C)
          case @command_window.index
          when @__command_enemy_guide_index  # モンスター図鑑
            call_enemy_guide_flag = true
          end
        end

        # モンスター図鑑に移行
        if call_enemy_guide_flag
          Sound.play_decision
          $scene = Scene_EnemyGuide.new(@__command_enemy_guide_index,
            Scene_EnemyGuide::HOST_MENU)
          return
        end

        update_command_selection_KGC_EnemyGuide
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Scene_EnemyGuide
    #------------------------------------------------------------------------------
    #   モンスター図鑑画面の処理を行うクラスです。
    #==============================================================================

    class Scene_EnemyGuide < Scene_Base
      HOST_MENU   = 0
      HOST_MAP    = 1
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #     menu_index  : コマンドのカーソル初期位置
      #     host_scene  : 呼び出し元 (0..メニュー  1..マップ)
      #--------------------------------------------------------------------------
      def initialize(menu_index = 0, host_scene = HOST_MENU)
        @menu_index = menu_index
        @host_scene = host_scene
      end
      #--------------------------------------------------------------------------
      # ● 開始処理
      #--------------------------------------------------------------------------
      def start
        super
        create_menu_background
        if KGC::EnemyGuide::USE_BACKGROUND_IMAGE
          @back_sprite = Sprite.new
          begin
            @back_sprite.bitmap = Cache.system(KGC::EnemyGuide::BACKGROUND_FILENAME)
          rescue
            @back_sprite.bitmap = Bitmap.new(32, 32)
          end
        end

        @top_window = Window_EnemyGuideTop.new
        @enemy_window = Window_EnemyGuideList.new
        @status_window = Window_EnemyGuideStatus.new
        @status_window.enemy = @enemy_window.item
      end
      #--------------------------------------------------------------------------
      # ● 終了処理
      #--------------------------------------------------------------------------
      def terminate
        super
        dispose_menu_background
        if @back_sprite != nil
          @back_sprite.bitmap.dispose
          @back_sprite.dispose
        end
        @top_window.dispose
        @enemy_window.dispose
        @status_window.dispose
      end
      #--------------------------------------------------------------------------
      # ○ 元の画面へ戻る
      #--------------------------------------------------------------------------
      def return_scene
        case @host_scene
        when HOST_MENU
          $scene = Scene_Menu.new(@menu_index)
        when HOST_MAP
          $scene = Scene_Map.new
        end
      end
      #--------------------------------------------------------------------------
      # ● フレーム更新
      #--------------------------------------------------------------------------
      def update
        super
        update_menu_background
        @top_window.update
        @enemy_window.update
        @status_window.update
        if @enemy_window.active
          update_enemy_selection
        end
      end
      #--------------------------------------------------------------------------
      # ○ エネミー選択の更新
      #--------------------------------------------------------------------------
      def update_enemy_selection
        if @last_index != @enemy_window.index
          @status_window.enemy = @enemy_window.item
          @last_index = @enemy_window.index
        end

        if Input.trigger?(Input::B)
          Sound.play_cancel
          return_scene
        elsif Input.trigger?(Input::A) || Input.trigger?(Input::C)
          # スプライト表示切替
          Sound.play_decision
          @status_window.switch_sprite
        elsif Input.trigger?(Input::LEFT)
          # 左ページ
          Sound.play_cursor
          @status_window.shift_info_type(-1)
        elsif Input.trigger?(Input::RIGHT)
          # 右ページ
          Sound.play_cursor
          @status_window.shift_info_type(1)
        end
      end
    end
    -----------------오류 없나요?

  • ?
    Man... 2008.10.20 16:35
    제가 할 때는 잘만 되는데...
  • ?
    다크아머 2008.10.25 10:17
    좋아보이기는 한데... 쓸수 있으려나
  • ?
    우끼끼 2008.10.25 19:20
    ㄳㄳ
  • ?
    데이다라 2008.11.09 14:10
    어떻게 여는지..
  • ?
    r.k.c(rpg king chobo) 2008.11.11 19:53
    ㄳ합니다.
  • profile
    요시2 2008.11.16 18:51
    좋은 자료입니다.
  • ?
    데비 2008.11.30 21:42
    좋은자료 감사합니다-
  • ?
    PerSoNa 2008.12.05 22:31
    좋은자료 감사합니다.
  • ?
    D.S.Y 2008.12.08 20:50
    감사합니다.
  • profile
    미니♂ban♀ 2008.12.18 15:17
    RPGXP나 RPGVX나 몬스터 도감은 꼭 있군요.
  • ?
    꼽등이 2008.12.31 11:16
    최고입니다 !!+_+
  • ?
    플로아 2009.01.10 14:40
    ㄳㄳ
  • ?
    우끼끼 2009.01.10 17:35
    아 왜 전 되지 않을까요...;
  • ?
    Mok 2009.01.12 04:04
    왜 제 게임에 적용시키면 몹 이름이 회색으로 뜨면서 능치가 ???로 나올까요~?
  • ?
    rpgxp마스터 2009.01.24 12:23
    몬스터 도감에 몬스터 기록이 한정되어 있던데
    어떻게 조정하죠?
  • ?
    TANESIA 2009.01.27 12:23
    감사 사감
  • ?
    TANESIA 2009.01.27 12:58
    몬스터 도감 등록된 몬스터 최대수 변경은 어케함??
  • ?
    꿀꿀이 2009.02.14 02:29
    포켓몬!!!
  • ?
    castalia 2009.02.17 16:06
    으음... 오류가....;;
  • ?
    유스갈 2009.02.24 09:53
    잘쓸께요
  • ?
    제3의눈 2009.03.23 01:38
    감사합니다~
  • ?
    정검중 2009.04.25 15:38
    이거 현제편리하게사용중이라는 ㅎㅎ
  • ?
    드랍 2009.06.06 12:27
    감사요 잘쓸게요~!!!
  • ?
    너구링 2009.06.10 23:32
    좋다!!
  • ?
    lhh9606 2009.06.13 12:18
    엑알도 가능한나여??
  • ?
    Zero_Som 2009.06.13 12:20

    액알스크립트하고 충돌하려나..

  • ?
    페트릭스타 2009.06.28 09:33

    잘씀^^

  • ?
    나이슈goo 2009.06.30 16:24

    완전좋음~!

  • ?
    푸른에나 2009.08.17 10:52

    오류 ㅜㅠ

  • ?
    라이라니 2009.10.06 18:39
    감사합니다~~~
  • ?
    매그너몬 2009.10.07 22:37

    최고인듯...

    이런거 만들어두면 턴알이라도 도감채울려고 맵돌아다닐텐데..

  • ?
    영란 2009.10.15 22:20
    잘쓰겠습니다
  • ?
    1000℃ 복숭아 2009.10.20 14:50

    감사합니다!

     


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
577 풍선대화 메세지시스템 32 file RPGbooster 2008.10.11 6126
576 맵/타일 월드맵 스크립트 49 아방스 2008.09.07 6123
575 기타 게임시간&밤낮 54 file 허걱 2009.02.14 6111
» 몬스터 도감 [수정] 68 file RPGbooster 2008.10.08 6074
573 퀘스트 디아블로 스타일 퀘스트 시스템(번역) 38 file 훈덕 2009.02.03 6049
572 기타 캐릭터 소개화면 16 file 좀비사냥꾼 2009.03.29 6044
571 스킬 합성샾 스크립트 ^^ [동영상 포함] 6 file 아방스 2008.09.23 6038
570 전투 포켓몬 스크립트 한글화 완료 26 file 서울냥이 2010.10.11 6028
569 파티 대규모파티 KGC스크립 50 file RPGbooster 2008.10.08 6012
568 기타 작은 게이지바 표시 스크립트 44 file 허걱 2009.02.05 5979
567 메시지 대화창효과 8 078656577er 2009.10.20 5972
566 전투 ActBattle 전투 스크립트 13 file 사람이라면? 2010.08.16 5962
565 메뉴 창 크기 변경 스크립트 6 file Incubus 2008.05.25 5945
564 기타 빛 이펙트 71 file DEVIL<Li Patanis Roni Kraudus> 2008.06.06 5860
563 전투 지형에 따른 전투배경화면 표시 스크립트!! 30 file 레오 2008.09.17 5855
562 체력 게이지바 스크립트 30 아방스 2008.09.01 5829
561 액알 스크립트 33 츠키아 2008.08.11 5826
560 이동 및 탈것 3D 던젼 스크립트 38 아방스 2010.12.06 5772
559 스킬 무기 업그레이드 시스템 27 file 담먹캐 2009.11.01 5757
558 타이틀/게임오버 RPG VX - 타이틀 스크린 스크립트 23 아방스 2008.01.24 5740
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32