| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 2 |  
| 积分 | 0 |  
| 经验 | 16983 |  
| 最后登录 | 2016-9-4 |  
| 在线时间 | 331 小时 |  
 Lv1.梦旅人 
	梦石0 星屑48 在线时间331 小时注册时间2012-5-4帖子158 | 
| 
RT,战斗结算脚本在此:
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  复制代码#◆◇◆◇◆  アクティブレベルアップVXA ver 1.01  ◇◆◇◆◇
# 開発者用・高速数字描写機構 ver 1.11 以降必須
#  サポート掲示板 http://www2.ezbbs.net/21/minto-aaa/
#   by みんと
=begin
■ 更新履歴
○ ver 1.01(2012/01/21)
多人数PTで落ちるミスを修正
○ ver 1.00(2012/01/20)
公開
■ 説明
なるべく下の方にセクションを作成し、
本スクリプトを導入してください。
戦闘終了時のリザルト表示を
カシャカシャEXP獲得表示に変更します。
ゲージもアクティブで変動し、
いっぱいになったらレベルアップします。
また、その際は専用のグラフィックに変更されます。
画像はサンプルのものを使用していただいて構いません。
演出はCボタン(Enterキー)でカットできます。
=end
#==============================================================================
# ☆ MINTO
#------------------------------------------------------------------------------
#   様々なフラグを扱うメインモジュールです。
#==============================================================================
module MINTO
  
  # アクティブレベルアップVXを有効化 ( true で有効 / false で無効 )
  RGSS["Active_Lv_UpVX"] = true
  
end
# アクティブレベルアップVXが有効な場合に以降の処理を実行する
if MINTO::RGSS["Active_Lv_UpVX"] == true then
#==============================================================================
# ☆ カスタマイズ
#------------------------------------------------------------------------------
#   機能のカスタマイズをここで行います。
#==============================================================================
module MINTO
  
  # 使用する顔グラグラフィックファイル名
  # Face_Name[ID] = ["通常時のファイル末尾名", "LVUP時のファイル末尾名"]
  # すべてピクチャーフォルダを参照します。
  # ※ ファイル名は機械的に参照します。
  # たとえば、Face_Name[1] = ["普", "笑"]と設定し、
  # ファイル名がActor1でインデックスが0の場合、
  # 実際のファイル名は Actor1_0普, Actor1_0笑 となります。
  # 原則、全アクター分設定してください。
  # nil の場合は「現在の設定グラフィック」を参照します。
  Face_Name = [] # 変更しない
  Face_Name[1] = [nil, nil]
  Face_Name[2] = [nil, nil]
  Face_Name[3] = [nil, nil]
  Face_Name[4] = [nil, nil]
  Face_Name[5] = [nil, nil]
  Face_Name[6] = [nil, nil]
  Face_Name[7] = [nil, nil]
  Face_Name[8] = [nil, nil]
  Face_Name[9] = [nil, nil]
  Face_Name[12] = [nil, nil]
  Face_Name[13] = [nil, nil]
  Face_Name[14] = [nil, nil]
  Face_Name[15] = [nil, nil]
  Face_Name[16] = [nil, nil]
  Face_Name[17] = [nil, nil]
  Face_Name[18] = [nil, nil]
  Face_Name[19] = [nil, nil]
  Face_Name[20] = [nil, nil]
  Face_Name[21] = [nil, nil]
  Face_Name[22] = [nil, nil]
  Face_Name[23] = [nil, nil]
  Face_Name[24] = [nil, nil]
  Face_Name[25] = [nil, nil]
  Face_Name[26] = [nil, nil]
  Face_Name[27] = [nil, nil]
  Face_Name[28] = [nil, nil]
  Face_Name[29] = [nil, nil]
  Face_Name[30] = [nil, nil]
  Face_Name[31] = [nil, nil]
  Face_Name[32] = [nil, nil]
  Face_Name[33] = [nil, nil]
  Face_Name[34] = [nil, nil]
  Face_Name[35] = [nil, nil]
  Face_Name[36] = [nil, nil]
  Face_Name[37] = [nil, nil]
  Face_Name[38] = [nil, nil]
  Face_Name[39] = [nil, nil]
  Face_Name[40] = [nil, nil]
  Face_Name[41] = [nil, nil]
  Face_Name[42] = [nil, nil]
  Face_Name[43] = [nil, nil]
  Face_Name[44] = [nil, nil]
  Face_Name[45] = [nil, nil]
  Face_Name[46] = [nil, nil]
  Face_Name[47] = [nil, nil]
  Face_Name[48] = [nil, nil]
  Face_Name[49] = [nil, nil]
  Face_Name[50] = [nil, nil]
  Face_Name[51] = [nil, nil]
  Face_Name[52] = [nil, nil]
  Face_Name[53] = [nil, nil]
  Face_Name[54] = [nil, nil]
  Face_Name[55] = [nil, nil]
  Face_Name[56] = [nil, nil]
  Face_Name[57] = [nil, nil]
  Face_Name[58] = [nil, nil]
  Face_Name[59] = [nil, nil]
  Face_Name[60] = [nil, nil]
  Face_Name[61] = [nil, nil]
  Face_Name[62] = [nil, nil]
  Face_Name[63] = [nil, nil]
  Face_Name[64] = [nil, nil]
  Face_Name[65] = [nil, nil]
  Face_Name[66] = [nil, nil]
  Face_Name[67] = [nil, nil]
  Face_Name[68] = [nil, nil]
  Face_Name[69] = [nil, nil]
  
  # 確保するメンバーサイズ
  # 他サイトさんの戦闘メンバー拡張スクリプトを導入している場合は、
  # その最大数を設定してください
  Max_Size = 4
  
  # 演出用の最終レベル
  #(他サイトさんのレベル限界変更スクリプトを導入している場合は、
  # その最終値を入力してください)
  Final_Level = 99
  
  # 空EXPゲージの名前
  Base_EXP_Gauge = "gauge" 
  
  # 本体EXPゲージの名前
  A_EXP_Gauge = "gauge_exp2"
  
  # 演出時間フレーム
  #(1秒間が基本的に60フレームです。
  # ただし、入手EXPがそれ未満の場合はEXP分のフレーム時間になります)
  LVUP_Frame = 300
  
  # ゲージ加算SE([ファイル名, ボリューム, ピッチ)
  # ※ マシンスペックが高くないと、おそらく処理落ちします
  #    不要な場合はSE名に "" を設定してください
  Gauge_SE = ["Decision1", 80, 400]
  
  # LVUP時に鳴らすSE([ファイル名, ボリューム, ピッチ)
  LVUP_SE = ["Up4", 100, 150]
  
  #--------------------------------------------------------------------------
  # ● KGC Softwareスクリプトの検索
  #    key : スクリプトキー
  #--------------------------------------------------------------------------
  def self.search_kgc(key)
    # 指定されたスクリプトが有効かどうか調べる
    $imported != nil and $imported[key] == true
  end
end
#==============================================================================
# ■ Mint_Picture_Number
#------------------------------------------------------------------------------
#  ピクチャー数字のスプライト表示を扱うクラスです。
#   このクラスは数値の高速再描写に特化したクラスとなっています。
#==============================================================================
class Mint_Picture_Number
  #--------------------------------------------------------------------------
  # ● ストリングポップ
  #    string : 求められた文字列のピクチャーの名前
  #    x_plus : 外部からのX座標の調整用
  #    y_plus : 外部からのY座標の調整用 
  #--------------------------------------------------------------------------
  def string_pop(string = "", x_plus = 0, y_plus = 0)
    # string が無効なら処理を終了
    return if string == ""
    # 配列の nil をなくす
    #@string_pop_sprite.compact!
    #@string_pop_duration.compact!
    # スプライトを生成
    string_pop_sprite = Sprite.new
    # 画像を描写
    if Scene_Menu.method_defined?("snapshot_for_background") then
      string_pop_sprite.bitmap = Cache.picture(string)
    else
      string_pop_sprite.bitmap = RPG::Cache.picture(string)
    end
    # 座標データを代入
    string_pop_sprite.x = @x.to_i + x_plus
    string_pop_sprite.y = @y.to_i + y_plus
    string_pop_sprite.z = 10001
    # 配列の先頭にシフト
    @string_pop_sprite.push(string_pop_sprite)
    @string_pop_duration.push(40)
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #    battler : バトラー
  #--------------------------------------------------------------------------
  def update(battler = nil)
    # 1つでもストリングポップが表示中の場合
    if @string_pop_sprite.size >= 1
      # 表示中のストリングポップを1つずつ処理する
      for i in 0...@string_pop_sprite.size
        # ストリングポップを代入
        string = @string_pop_sprite[i]
        # スプライトが無効な場合
        if string.nil?
          # 次の処理へ
          next
        end
        # 不透明度が0の場合
        if string.opacity <= 0
          # ストリングポップを解放
          #dispose_string_pop(i)
          # 次の処理へ
          next
        end
        # カウントを減らす
        @string_pop_duration[i] -= 1
        # 残りカウントに応じて分岐
        case @string_pop_duration[i]
        when 36..39
          string.y -= 4
          string.blend_type = 1
        when 33..37
          string.y -= 2
          string.blend_type = 1
        when 32..34
          string.y += 2
          string.blend_type = 0
        when 25..32
          string.y += 4
          string.blend_type = 0
        end
        # 透明度をカウントに応じて下げる
        string.opacity = 255 - ((12 - @string_pop_duration[i]) * 26)
      end
      # 配列の nil を無くす
      #@string_pop_sprite.compact!
      #@string_pop_duration.compact!
    end
  end
end
#==============================================================================
# ■ MINTO_Number
#------------------------------------------------------------------------------
#  ピクチャーよる数字の表示を扱うモジュールです。
#   このモジュールは数値の高速描写に特化したモジュールとなっています。
#==============================================================================
module MINTO_Number
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  WIDHT  = -4 # 横幅調節値
  HEIGHT = 24 # 1カラーの高さ
  #--------------------------------------------------------------------------
  # ● 数字の描写
  #    x      : 描写先 X 座標
  #    y      : 描写先 Y 座標
  #    number : 描写する数字
  #    bitmap : 使用するビットマップ
  #    color  : 使用するカラーインデックス
  #    text   : 使用する画像ファイル名
  #--------------------------------------------------------------------------
  def self.draw_number(x, y, number, bitmap, color = 0, text = "String02")
    # ピクチャーの読み込み
    picture = Cache.picture(text)
    # ピクチャーの基本の横幅を取得する
    width_base = picture.width / 10.0
    # 求められた数字を一文字ずつ配列にする
    array = number.to_s.split(//)
    # ループ処理(イテレータ)
    (0...array.size).each do |i|
      # 描写座標を計算
      draw_x = array[i].to_i * width_base
      draw_y = HEIGHT * color
      # 描写座標を取得する
      rect = Rect.new(draw_x, draw_y, width_base, HEIGHT)
      # 数字を描写
      bitmap.blt(x + (i * (width_base + WIDHT)), y + 4, picture, rect)
    end
  end
end
#==============================================================================
# ■ Mint_Gauge_System_Active
#------------------------------------------------------------------------------
#  ピクチャーゲージのスプライト表示を扱うクラスです。
#   このクラスはゲージの高速再描写に特化したクラスとなっています。
#==============================================================================
class Mint_Gauge_System_Active
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #    gauge : ゲージ画像
  #--------------------------------------------------------------------------
  def initialize(x, y, z = 500, type = 0)
    # 空ゲージを読み込む
    gauge_base = Cache.picture(MINTO::Base_EXP_Gauge)
    # 空ゲージ用のスプライトを作成
    @sprite_gauge_base = Sprite.new
    # 座標を設定
    @sprite_gauge_base.x = x
    @sprite_gauge_base.y = y
    @sprite_gauge_base.z = z
    # スプライトを作成
    [url=home.php?mod=space&uid=114926]@sprite[/url] = @sprite_gauge_base.dup
    @sprite.x -= 16
    @sprite.y -= 16
    @sprite.z += 1
    @sprite.bitmap = Bitmap.new(64, 32)
    @sprite.bitmap.font.color.set(0, 200, 250)
    # 空ゲージを描写
    @sprite_gauge_base.bitmap = gauge_base
    # 本体ゲージを読み込む
    @gauge = gauge_initialize(type)
    # 本体ゲージ用の配列を作成
    @sprite_gauge = [Sprite.new]
    (1..6).each do |i|
      # 本体ゲージ用のスプライトを作成
      @sprite_gauge[i] = Sprite.new
      # 座標を設定
      @sprite_gauge[i].x = (x - i) + 8
      @sprite_gauge[i].y = y + i
      @sprite_gauge[i].z = z
    end
  end
  #--------------------------------------------------------------------------
  # ● ゲージ用ビットマップの作成
  #--------------------------------------------------------------------------
  def gauge_initialize(type)
    # タイプに応じて分岐
    case type
    when 0
      # ゲージの読み込み
      gauge = Cache.picture(MINTO::A_EXP_Gauge)
    end
    # 本体ゲージ用のスプライトを作成
    sprite_gauge = []
    (1..100).each do |i|
      # 本体ゲージ用のビットマップを作成
      sprite_gauge[i] = Bitmap.new(i, 1)
      # 本体ゲージ用の描写範囲を計算
      dest_rect = Rect.new(0, 0, i, 1)
      sprite_gauge[i].stretch_blt(dest_rect, gauge, gauge.rect)
    end
    return sprite_gauge
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # スプライトを解放
    for s in @sprite_gauge
      s.dispose
    end
    @sprite_gauge_base.bitmap.dispose
    @sprite_gauge_base.dispose
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
  # ● 縁文字描写
  #--------------------------------------------------------------------------
  def draw_frame_text(x, y, width, height, text, ag = 0)
    # 元の色を保存
    ori_color = @sprite.bitmap.font.color.clone
    # 縁の色を定義
    @sprite.bitmap.font.color.set(0, 0, 0)
    # 縁文字を描写
    @sprite.bitmap.draw_text(x-1, y, width, height, text, ag)
    @sprite.bitmap.draw_text(x+1, y, width, height, text, ag)
    @sprite.bitmap.draw_text(x, y-1, width, height, text, ag)
    @sprite.bitmap.draw_text(x, y+1, width, height, text, ag)
    # 元の色に戻す
    @sprite.bitmap.font.color = ori_color
    # 本体の文字を描写
    @sprite.bitmap.draw_text(x, y, width, height, text, ag)
  end
  #--------------------------------------------------------------------------
  # ● 可視状態の取得
  #--------------------------------------------------------------------------
  def visible
    # 先頭の可視状態を返す
    return @sprite_gauge[1].visible
  end
  #--------------------------------------------------------------------------
  # ● 可視状態の変更
  #    visible : 新しい可視状態
  #--------------------------------------------------------------------------
  def visible=(visible)
    # 可視状態の変更(イテレータ)
    (1..6).each{|i| @sprite_gauge[i].visible = visible}
    @sprite_gauge_base.visible = visible
  end
  #--------------------------------------------------------------------------
  # ● レートの設定
  #    rate : ゲージの減少率
  #--------------------------------------------------------------------------
  def set_rate(rate)
    rate = [[rate, 100].min, 0].max
    # ゲージを実際に描写
    @sprite_gauge[1].bitmap = @gauge[rate]
    @sprite_gauge[2].bitmap = @gauge[rate]
    @sprite_gauge[3].bitmap = @gauge[rate]
    @sprite_gauge[4].bitmap = @gauge[rate]
    @sprite_gauge[5].bitmap = @gauge[rate]
    @sprite_gauge[6].bitmap = @gauge[rate]
  end
end
#==============================================================================
# ■ Game_Temp
#------------------------------------------------------------------------------
#  セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン
# スタンスは $game_temp で参照されます。
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :after_battle_phase       # アフターバトルフェーズ中フラグ
end
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● EXPリストの取得
  #--------------------------------------------------------------------------
  def exp_list
    return @exp_list
  end
  #--------------------------------------------------------------------------
  # ● ゲージ用のEXP_NEXT の取得
  #--------------------------------------------------------------------------
  def minto_next_exp(lv, exp)
    exp_rate = exp_for_level(lv + 1) - exp_for_level(lv)
    next_exp = exp_for_level(lv + 1) - exp
    rate = (next_exp * 100) / exp_rate
    if exp_for_level(lv + 1) == 0
      rate = 100
    end
    return 100 - rate
  end
  #--------------------------------------------------------------------------
  # ● 次のレベルまでの EXP 取得
  #--------------------------------------------------------------------------
  def next_rest_exp2(lv, exp)
    return exp_for_level(lv + 1) > 0 ? (exp_for_level(lv + 1) - exp) : 0
  end
  #--------------------------------------------------------------------------
  # ● 次のレベルの経験値を取得
  #--------------------------------------------------------------------------
  def next_level_exp
    exp_for_level([url=home.php?mod=space&uid=22147]@level[/url] + 1)
  end
  #--------------------------------------------------------------------------
  # ○ AP 獲得(KGC[EquipLearnSkill]再定義)
  #    ap   : AP の増加量
  #    show : マスタースキル表示フラグ
  #--------------------------------------------------------------------------
  def gain_ap(ap, show)
    # 最終スキルを記憶
    last_full_ap_skills = full_ap_skills
    # 装備品により習得しているスキルに AP を加算
    equipment_skills(true).each do |skill|
      # APの変更
      change_ap(skill, skill_ap(skill.id) + ap)
    end
    # マスタースキル表示フラグが有効で、且つスキル要素が異なっている場合
    if show == true and (last_full_ap_skills != full_ap_skills) then
      # メソッドを返す(スキル習得)
      return true
    end
    # メソッドを返す(スキル未習得)
    return false
  end
  #--------------------------------------------------------------------------
  # ○ マスターしたスキルの表示(KGC[EquipLearnSkill]再定義)
  #    new_skills : 新しくマスターしたスキルの配列
  #--------------------------------------------------------------------------
  def display_full_ap_skills(new_skills)
    # 無効化(処理を行わない)
    return
  end
end
#==============================================================================
# ■ Game_Troop
#------------------------------------------------------------------------------
#  敵グループおよび戦闘に関するデータを扱うクラスです。バトルイベントの処理も
# 行います。このクラスのインスタンスは $game_troop で参照されます。
#==============================================================================
class Game_Troop < Game_Unit
  #--------------------------------------------------------------------------
  # ● 全滅判定の取得
  #--------------------------------------------------------------------------
  def all_dead?
    # スーパークラスの処理に以降
    bool = super
    # 勝利確定の場合
    if bool then
      # アフターバトルフェーズ中でない場合
      unless $game_temp.after_battle_phase then
        # アフターバトルフェーズを予約する
        $game_temp.after_battle_phase = true
        # アフターバトルフェーズ準備
        SceneManager.scene.reservation_after_battle_phase
      end
    end
    # メソッドを返す
    return bool
  end
  #--------------------------------------------------------------------------
  # ● ドロップアイテムの配列作成)
  #    forcing : 強制フラグ
  #--------------------------------------------------------------------------
  def make_drop_items(forcing = false)
    # 強制フラグがオフの場合
    if forcing == false then
      # メソッドを返す
      return []
    end
    return dead_members.inject([]) {|r, enemy| r += enemy.make_drop_items }
  end
end
#==============================================================================
# ■ Game_Message
#------------------------------------------------------------------------------
#  文章や選択肢などを表示するメッセージウィンドウの状態を扱うクラスです。この
# クラスのインスタンスは $game_message で参照されます。
#==============================================================================
class Game_Message
  #--------------------------------------------------------------------------
  # ● テキストの追加
  #--------------------------------------------------------------------------
  alias :minto_rgss3_3_add :add
  def add(text)
    # アフターバトルフェーズが予約されている場合
    if $game_temp.after_battle_phase
      # メソッドを返す
      return
    end
    # 元の処理を実行
    minto_rgss3_3_add(text)
  end
end
#==============================================================================
# ■ Window_BattleMessage
#------------------------------------------------------------------------------
#  戦闘中に表示するメッセージウィンドウです。通常のメッセージウィンドウの機能
# に加え、戦闘進行のナレーションを表示する機能を持ちます。
#==============================================================================
class Window_BattleMessage < Window_Message
  #--------------------------------------------------------------------------
  # ● 可視状態の変更
  #    visible : 新しい可視状態
  #--------------------------------------------------------------------------
  def visible=(visible)
    # アフターバトルフェーズ中の場合
    if $game_temp.after_battle_phase == true then
      # スーパークラスを実行(文章の無効化)
      super(visible)
      # メッセージを不可視にする
      $game_message.visible = false
      # メッセージとそれに係わるフラグを無効化
      $game_message.texts.clear
    # アフターバトルフェーズ中でない場合
    else
      # スーパークラスを実行(通常の処理)
      super(visible)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias :update_Active_Lv_UpVX :update
  def update
    # 元の処理を実行
    update_Active_Lv_UpVX
    # アフターバトルフェーズ中の場合
    if $game_temp.after_battle_phase == true then
      # ウィンドウを可視状態にする
      self.visible = true
    end
  end
end
#==============================================================================
# ■ Window_BattleResult
#------------------------------------------------------------------------------
#  バトル終了時に、獲得した EXP やゴールドなどを表示するウィンドウです。
#==============================================================================
class Window_BattleResult < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     exp       : EXP
  #     gold      : ゴールド
  #     treasures : トレジャー
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures, ap, gage_window)
    super(320, 0, 224, 416)
    self.opacity = 255
    self.z = 0x270f
    # 各データを保管
    [url=home.php?mod=space&uid=13302]@exp[/url] = [exp, 999999].min
    [url=home.php?mod=space&uid=236945]@gold[/url] = [gold, 999999].min
    @ap = ap
    @puls = 0
    @items = {}
    @gage_window = gage_window
    # 文字の表示形式を調節
    self.contents.font.italic = true
    # テキストの配列を作成
    text_array = ["EXP", Vocab::currency_unit]
    # APが0以外の場合
    if @ap != 0 then
      # 用語[AP]を追加
      text_array << "AP"
      @puls = 48
    end
    # ループ処理
    for i in 0...text_array.size do
      # テキストを取得
      text = text_array[i]
      # テキスト表示
      frame_text(4, 8 + 50 * i, 224, 25, text, system_color)
      # アンダーライン描写
      self.contents.fill_rect(4, 40 + 50 * i, 224, 1, system_color)
    end
    # 文字の表示形式を戻す
    self.contents.font.italic = false
    # 入手アイテムが1つでも存在する場合
    if treasures.to_a != [] then
      # ループ処理
      for item in treasures do
        # 無効な個数の場合
        if @items[item] == nil then
          # 個数を初期化
          @items[item] = 0
        end
        # 個数を加算
        @items[item] += 1
        # アイテムを入手
        $game_party.gain_item(item, 1)
      end
      # 重複するアイテムを削除
      treasures.uniq!
      # トレジャー用のテキストを表示
      frame_text(4, 24 * 4 + @puls, 256, 24, "入手道具", system_color)
      # 入手アイテム名のY座標
      y = 24 * 5 + @puls
      # ループ処理
      for item in treasures do
        # 入手アイテムを描写
        draw_item_name(item, 4, y)
        y += 24
      end
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 縁文字描写
  #--------------------------------------------------------------------------
  def frame_text(x, y, width, height, text, color, ag = 0)
    self.contents.font.color.set(0, 0, 0)
    self.contents.font.shadow = false
    self.contents.draw_text(x-1, y, width, height, text, ag)
    self.contents.draw_text(x+1, y, width, height, text, ag)
    self.contents.draw_text(x, y-1, width, height, text, ag)
    self.contents.draw_text(x, y+1, width, height, text, ag)
    self.contents.font.color = color
    self.contents.draw_text(x, y, width, height, text, ag)
  end
  #--------------------------------------------------------------------------
  # ● アイテム名の描画
  #     item : アイテム
  #     x    : 描画先 X 座標
  #     y    : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y)
    # 無効なアイテムの場合
    if item == nil then
      # メソッドを返す
      return
    end
    # アイテムのアイコンを描写
    draw_icon(item.icon_index, x, y, true)
    # アイテム名を縁取りして描写
    frame_text(x + 28, y, 112, 24, item.name, normal_color)
    # 対象アイテムを2つ以上入手している場合
    if @items[item] >= 2 then
      # アイテムの入手個数を描写
      frame_text(-24, y, 188, 24, "×", normal_color, 2)
      frame_text(0, y, 188, 24, @items[item].to_s, normal_color, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.openness = 1
    @gage_window.openness = 1
    @gage_window.visible = true
    # 16フレーム待つ
    16.times do
      # ウィンドウを開く
      self.openness += 16
      @gage_window.openness += 16
      # ゲーム画面を更新
      Graphics.update
    end
    # EXPを描写
    MINTO_Number.draw_number(96, 4, @exp, self.contents, 1)
    # ゴールドを描写
    MINTO_Number.draw_number(96, 52, @gold, self.contents, 1)
    # APが0以外の場合
    if @ap != 0 then
      # APを描写
      MINTO_Number.draw_number(96, 100, @ap, self.contents, 1)
    end
    # ゲージウィンドウをリフレッシュ
    @gage_window.refresh_exp
  end
end
#==============================================================================
# ■ Window_Active_Exp
#------------------------------------------------------------------------------
#  獲得したEXPに応じて、ゲージを変動させるウィンドウです。
#==============================================================================
class Window_Active_Exp < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #    exp : EXP
  #--------------------------------------------------------------------------
  def initialize(exp, skills, last_exp, last_level)
    super(0, 0, 320, 416)
    edge = Cache.picture("Blue_Edge")
    @exp = exp
    # EXP表示用の配列を作成
    @text = []
    # LV表示用の配列を作成
    @lv = []
    # EXPゲージ用の配列
    @exp_gauge = []
    # スキル保存用の配列
    @skills = []
    # 最終EXP用の配列
    @last_exp = last_exp
    # 最終レベル用の配列
    @last_level = last_level
    # ループ処理
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # 配列を初期化
      @skills[i] = []
      # ループ処理
      for id in 0...skills[i].size do
        # スキルが有効な場合
        if skills[i] != nil and skills[i][id] != nil then
          # 最終スキルの配列の複製を作成
          @skills[i] << skills[i][id].id
        end
      end
    end
    # 演出スキップフラグをクリア
    @skip = false
    self.opacity = 255
    self.z = 9999
    # スプライトを作成
    @sprite = Sprite.new
    # スプライトのビットマップを作成
    @sprite.bitmap = Bitmap.new(width - 32, height - 32)
    # スプライトのデータを設定
    @sprite.x = self.x + 16
    @sprite.y = self.y + 16
    @sprite.z = 10000
    # グラフィック用のスプライトを作成
    @sprite3 = @sprite.dup
    @sprite3.z = 9999
    @sprite3.bitmap = Bitmap.new(width - 32, 416)
    @sprite3.visible = false
    # ループ処理
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      dest_rect = Rect.new(0, 16 + (96 * i), 352 * 81 / 100, 108 * 81 / 100)
      @sprite3.bitmap.stretch_blt(dest_rect, edge, edge.rect)
    end
    # グラフィック用のスプライトを作成
    @sprite2 = @sprite.dup
    @sprite2.z = 9999
    @sprite2.bitmap = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # ● プラス座標の取得
  #--------------------------------------------------------------------------
  def puls_y
    size = MINTO::Max_Size
    return (96.0 * (4.0 / size.to_f)).to_i
  end
  #--------------------------------------------------------------------------
  # ● 修正座標の取得
  #    y : Y座標
  #--------------------------------------------------------------------------
  def y_pass(y)
    size = MINTO::Max_Size
    return (y * (4.0 / size.to_f)).to_i
  end
  #--------------------------------------------------------------------------
  # ● スプライトの作成
  #--------------------------------------------------------------------------
  def sprite_set
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # アクターを取得
      actor = $game_party.all_members[i]
      # 座標を取得
      y = i * puls_y
      # アクター名を描写
      frame_text(4, y, 164, 24, actor.name, normal_color)
      # 用語を描写
      frame_text(12, y + y_pass(36), 64, 24, "LV", system_color)
      frame_text(128, y + y_pass(66), 64, 24, "NEXT", system_color, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 顔グラフィックの描画
  #     face_name  : 顔グラフィック ファイル名
  #     face_index : 顔グラフィック インデックス
  #     x          : 描画先 X 座標
  #     y          : 描画先 Y 座標
  #     size       : 表示サイズ
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, x, y, size = puls_y)
    rect = Rect.new(0, 0, 0, 0)
    rect.x = (face_index % 4 * 96 + (96 - size) / 2)
    rect.y = (face_index / 4 * 96 + (96 - size) / 2)
    rect.width = puls_y.to_m(96)
    rect.height = puls_y.to_m(96)
    # 対象の範囲を消す
    @sprite2.bitmap.fill_rect(x, y, puls_y, puls_y, Color.new(0, 0, 0, 0))
    @sprite2.bitmap.blt(x + 76, y, Cache.face(face_name), rect)
  end
  #--------------------------------------------------------------------------
  # ● グラフィックの作成
  #    actor : アクター
  #    x     : 描写先のX座標
  #    y     : 描写先のY座標
  #    index : インデックス
  #    type  : 描写タイプ
  #--------------------------------------------------------------------------
  def graphic_set(actor, x, y, index, type)
    # 顔グラフィックの配列
    face = []
    # 顔グラフィック末尾名が有効な場合
    unless MINTO::Face_Name[actor.id][type].nil? then
      # ファイル名を作成
      file_name = "#{actor.face_name}_#{actor.face_index}"
      # ファイル末尾名を取得
      file_name += MINTO::Face_Name[actor.id][type]
      # 顔グラフィックを読み込む
      face[index] = Cache.picture(file_name)
      # 対象の範囲を消す
      rect = Rect.new(x, y, puls_y, puls_y)
      @sprite2.bitmap.fill_rect(rect, Color.new(0, 0, 0, 0))
      # 顔グラフィックを描写
      @sprite2.bitmap.blt(x, y, face[index], Rect.new(0, 0, puls_y, puls_y))
    # 顔グラフィック末尾名が無効な場合
    else
      # 現在の設定グラフィックを描写
      draw_face(actor.face_name, actor.face_index, x, y)
    end
  end
  #--------------------------------------------------------------------------
  # ● 縁文字描写
  #--------------------------------------------------------------------------
  def frame_text(x, y, width, height, text, color, ag = 0)
    @sprite.bitmap.font.color.set(0, 0, 0)
    @sprite.bitmap.font.shadow = false
    @sprite.bitmap.draw_text(x-1, y, width, height, text, ag)
    @sprite.bitmap.draw_text(x+1, y, width, height, text, ag)
    @sprite.bitmap.draw_text(x, y-1, width, height, text, ag)
    @sprite.bitmap.draw_text(x, y+1, width, height, text, ag)
    @sprite.bitmap.font.color = color
    @sprite.bitmap.draw_text(x, y, width, height, text, ag)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュEXP
  #--------------------------------------------------------------------------
  def refresh_exp
    # 可視フラグをオン
    self.visible = true
    @sprite3.visible = true
    # 用語を描写
    sprite_set
    # 更新フレーム数を作成
    thyme = @exp < MINTO::LVUP_Frame ? @exp.abs : MINTO::LVUP_Frame
    rate_p = @exp < MINTO::LVUP_Frame ? @exp.abs : MINTO::LVUP_Frame
    # EXPの配列
    exp = []
    # LVの配列
    last_lv = []
    # 最終EXPの配列
    last_exp = []
    # レベルアップフラグ
    level_up = []
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      actor = $game_party.all_members[i]
      # 座標を取得
      x = 160
      y = i * puls_y
      # LV表示用のピクチャー数字を作成
      @lv[i] = Mint_Picture_Number.new(52, y + y_pass(52), 2, 10000)
      # NEXT_EXP表示用のピクチャー数字を作成
      @text[i] = Mint_Picture_Number.new(x + 40, y + y_pass(82), 6, 10000)
      # EXPゲージを作成
      @exp_gauge[i] = Mint_Gauge_System_Active.new(x + 8, 
      y + y_pass(102), 9999)
      # 最終LevelとEXPを代入
      last_lv[i] = @last_level[i].to_i
      last_exp[i] = @last_exp[i].to_i
      # EXPの獲得が可能な場合
      if actor.exist? then
        # 入手EXPがLVUP_Frame以上なら、LVUP_Frameで割ってその余りを求める
        if @exp > MINTO::LVUP_Frame then
          last_exp[i] += @exp % MINTO::LVUP_Frame
          # 経験値2倍の場合
          if actor.final_exp_rate >= 2
            # 倍率補正を考慮
            for to_loop in 0...(actor.final_exp_rate - 1) do
              last_exp[i] += @exp % MINTO::LVUP_Frame
            end
          end
        end
      end
      # グラフィックを描写
      graphic_set(actor, 0, y, actor.id, 0)
    end
    # 更新フレームがなくなるまで繰り返す
    thyme.times do
      # グラフィックをクリア
      @sprite2.bitmap.clear
      # Cボタンが押された場合
      if Input.trigger?(Input::C)
        # スキップフラグをオン
        @skip = true
      end
      # スキップしない場合
      if @skip != true then
        # ゲージ加算SEが有効な場合
        if MINTO::Gauge_SE[0] != "" then
          # SEデータを代入
          data = MINTO::Gauge_SE
          # ゲージ加算SEを演奏
          Audio.se_play("Audio/SE/#{data[0]}", data[1], data[2])
        end
      end
      # パーティー人数分だけ繰り返す
      for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
        # アクターを代入
        actor = $game_party.all_members[i]
        # EXPの獲得が可能な場合
        if actor.exist? then
          # 描写用のEXPを加算
          last_exp[i] += (@exp / rate_p)
          # 経験値倍率補正がある場合
          if actor.final_exp_rate >= 2
            # 倍率補正を考慮
            for to_loop in 0...(actor.final_exp_rate - 1) do
              last_exp[i] += (@exp / rate_p)
            end
          end
        end
        # NEXT_EXPを取得
        next_p = actor.next_rest_exp2(last_lv[i], last_exp[i])
        # NEXT_EXPが文字列ではない場合
        if next_p.is_a?(Numeric) then
          # 最低値を0に設定
          next_p = next_p.to_min(0)
          # アクターのマザーデータを取得
          d_actor = $data_actors[actor.id]
          # 最終レベルを代入
          final_level = MINTO::Final_Level
          # レベルアップが可能な場合
          # (NEXT_EXPが0で且つ、最終レベルがMAXレベル未満の場合)
          if next_p == 0 and last_lv[i] < final_level then
            # 描写用のLVを加算
            last_lv[i] += 1
            # スキル習得判定
            for skill in actor.class.learnings do
              # レベル条件を満たしている場合
              if last_lv[i] >= skill.level then
                # 最終スキルに存在しない場合
                unless @skills[i].include?(skill.skill_id) then
                  # 最終スキルに保存
                  @skills[i].push(skill.skill_id)
                  # NewSkill表示
                  @lv[i].string_pop("NewSkill", 144, y_pass(-32))
                end
              end
            end
            # スキップしない場合
            if @skip != true then
              # SEデータを代入
              data = MINTO::LVUP_SE
              # SEを演奏する
              Audio.se_play("Audio/SE/#{data[0]}", data[1], data[2])
            end
            # 限界レベルを取得
            last_lv[i] = [last_lv[i], final_level].min
            # LVUP表示
            @lv[i].string_pop("lvup", 144)
            # レベルアップフラグを設定
            level_up[i] = true
          end
          # レベルアップが有効な場合
          if level_up[i] == true then
            # グラフィックを描写
            graphic_set(actor, 0, (i * puls_y), actor.id, 1)
          else
            # グラフィックを描写
            graphic_set(actor, 0, (i * puls_y), actor.id, 0)
          end
        end
        # ゲージの長さを算出
        n = actor.next_rest_exp2(last_lv[i], last_exp[i])
        rate = actor.minto_next_exp(last_lv[i], last_exp[i]).to_max(0, 100)
        # ゲージを更新
        @exp_gauge[i].set_rate(rate)
        # NEXT_EXPを描写
        @text[i].set_text(n.to_min(0))
        # 最終レベルを描写
        @lv[i].set_text(last_lv[i])
        # LVUP表示を更新
        @lv[i].update
      end
      # スキップフラグがオフの場合
      if @skip == false then
        # ゲーム画面を更新
        Graphics.update
        # 入力情報を更新
        Input.update
      end
    end
    # 必須ウェイトタイム(変更しない)
    thyme = 0
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # LVUP表示カウントを取得する
      size = @lv[i].string_pop_duration.size
      count = @lv[i].string_pop_duration[size - 1].to_i
      # thyme より count の方が高ければ thyme を上書き
      if count > thyme then
        thyme = count
      end
    end
    # 必須ウェイトタイムが1以上の限り更新する
    while thyme >= 1 do
      # パーティー人数分だけ繰り返す
      for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
        # LVUP表示を更新
        @lv[i].update
      end
      # カウントを減らす
      thyme -= 1
      # ゲーム画面を更新
      Graphics.update
    end
    # 入力情報を更新
    Input.update
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新(スキル習得)
  #    learning_skill : 新たにスキルを習得したかどうかのフラグ
  #--------------------------------------------------------------------------
  def update_skill(learning_skill)
    # SkillLearningSE演奏フラグ
    learning = 0
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # アクターを代入
      actor = $game_party.all_members[i]
      # EXPの獲得が可能な場合
      if $game_party.existing_members.include?(actor) then
        # スキル数が増えている場合
        if learning_skill[actor] == true then
          # SkillLearning表示
          @lv[i].string_pop("learning", -64, y_pass(-32))
          # SEを演奏する
          learning = 1
        end
      end
    end
    # 一人でもスキルを習得した場合
    if learning == 1 then
      # SEデータを代入
      data = MINTO::LVUP_SE
      # SEを演奏する
      Audio.se_play("Audio/SE/#{data[0]}", data[1], data[2])
    end
    # 必須ウェイトタイム(変更しない)
    thyme = 0
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # LVUP表示カウントを取得する
      count = @lv[i].string_pop_duration[0].to_i
      # thyme より count の方が高ければ thyme を上書き
      if count > thyme then
        thyme = count
      end
    end
    # ループ処理(必須ウェイトタイム)
    thyme.times do
      # パーティー人数分だけ繰り返す
      for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
        # LVUP表示を更新
        @lv[i].update
      end
      # ゲーム画面を更新
      Graphics.update
    end
    # 入力情報を更新
    Input.update
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ループ処理
    for sprite in @text + @lv + @exp_gauge do
      # 特殊スプライトを解放
      sprite.dispose
    end
    # スプライトを解放
    @sprite.bitmap.dispose
    @sprite.dispose
    @sprite2.bitmap.dispose
    @sprite2.dispose
    @sprite3.bitmap.dispose
    @sprite3.dispose
    # スーパークラスを実行
    super
  end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  メニュー画面の処理を行うクラスです。
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ● 背景として使うためのスナップショット作成
  #--------------------------------------------------------------------------
  def snapshot_for_background
  end
end
#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :last_exp                 # 最終EXP
  attr_reader   :last_level               # 最終レベル
  attr_reader   :last_skills              # 最終スキルの配列
  attr_accessor :active_gauge_window      # ゲージウィンドウ
  #--------------------------------------------------------------------------
  # ● 終了処理
  #--------------------------------------------------------------------------
  alias :terminate_Active_Lv_UpVX :terminate
  def terminate
    # アクティブゲージウィンドウが有効な場合
    if @active_gauge_window != nil then
      # アクティブゲージウィンドウを解放
      @active_gauge_window.dispose
      # バトルリザルトウィンドウを解放
      @result_window.dispose
    end
    # アフターバトルフェーズをクリア
    $game_temp.after_battle_phase = false
    # 元の処理を実行
    terminate_Active_Lv_UpVX
  end
  #--------------------------------------------------------------------------
  # ● 終了前処理
  #--------------------------------------------------------------------------
  alias :minto_rgss3_3_pre_terminate :pre_terminate
  def pre_terminate
    # アフターバトルフェーズ中の場合
    if $game_temp.after_battle_phase == true then
      # アフターバトルフェーズの開始
      start_after_battle_phase
      # ループ処理
      loop do
        # ゲーム画面を更新
        Graphics.update
        # 入力情報を更新
        Input.update
        # C ボタンが押された場合
        if Input.trigger?(Input::C) == true then
          break
        end
      end
    end
    # 元の処理を実行
    minto_rgss3_3_pre_terminate
  end
  #--------------------------------------------------------------------------
  # ● アフターバトルフェーズの準備
  #--------------------------------------------------------------------------
  def reservation_after_battle_phase
    # 最終EXPとレベルを初期化
    @last_exp = []
    @last_level = []
    # 最終スキルの配列
    @last_skills = []
    # パーティー人数分だけ繰り返す
    for i in 0...$game_party.all_members.size.to_m(MINTO::Max_Size) do
      # アクターを取得
      actor = $game_party.all_members[i]
      # 最終EXPを保存
      @last_exp[i] = actor.exp.to_i
      # 最終レベルを保存
      @last_level[i] = actor.level.to_i
      # 最終スキルの取得
      @last_skills[i] = actor.skills.dec
    end
    # リザルトデータを記憶
    @exp = $game_troop.exp_total
    @gold = $game_troop.gold_total
    @drop_items = $game_troop.make_drop_items(true)
    @ap = 0
  end
  #--------------------------------------------------------------------------
  # ● アフターバトルフェーズの開始
  #--------------------------------------------------------------------------
  def start_after_battle_phase
    # アクティブゲージウィンドウを作成
    @active_gauge_window = Window_Active_Exp.new(@exp, @last_skills, 
    @last_exp, @last_level)
    # バトルリザルトウィンドウを作成
    @result_window = Window_BattleResult.new(@exp, @gold, @drop_items, @ap,
    @active_gauge_window)
  end
end
end
这是jp管理器…………复制代码#◆◇◆◇◆  レベルアップポップスクリプトVXA ver 1.01  ◇◆◇◆◇
#  サポート掲示板 http://www2.ezbbs.net/21/minto-aaa/
#   by みんと
=begin
■ 更新履歴
○ ver 1.01(2012/01/21)
多人数PTに対応
○ ver 1.00(2012/01/21)
公開
 
■ 説明
VX版とは違い、アクティブレベルアップVXAなしでも動作します。
アクティブレベルアップVXAを導入している場合は、
アクティブレベルアップVXAよりも下にセクションを作成し、導入してください。
レベルアップした際の詳細な情報を1つずつ素早く表示します。
スキルを習得した場合は習得したスキル名を表示します。
立ち絵の表示にも対応しています。
=end
#==============================================================================
# ☆ MINTO
#------------------------------------------------------------------------------
#   様々なフラグを扱うメインモジュールです。
#==============================================================================
module MINTO
  
  # レベルアップポップスクリプトVXAを有効化 ( true で有効 / false で無効 )
  RGSS["レベルアップポップスクリプトVXA"] = true
  
end
# レベルアップポップスクリプトVXAが有効な場合に以降の処理を実行する
if MINTO::RGSS["レベルアップポップスクリプトVXA"] == true then
  
#==============================================================================
# ☆ カスタマイズ
#------------------------------------------------------------------------------
#   機能のカスタマイズをここで行います。
#==============================================================================
module MINTO
  
  # 使用する立ち絵グラグラフィックファイル名
  # Face_Name_L[ID] = "ファイル末尾名"
  # すべてピクチャーフォルダを参照します。
  # ※ ファイル名は機械的に参照します。
  # たとえば、Face_Name[1] = "L" と設定し、
  # ファイル名がActor1でインデックスが0の場合、
  # 実際のファイル名は Actor1-0L となります。
  # 原則、全アクター分設定してください。
  # nil の場合は「現在の設定グラフィック」を参照します。
  Face_Name_L = [] # 変更しない
  Face_Name_L[1] = nil
  Face_Name_L[2] = nil
  Face_Name_L[3] = nil
  Face_Name_L[4] = nil
  Face_Name_L[5] = nil
  Face_Name_L[6] = "L"
  Face_Name_L[7] = "L"
  Face_Name_L[8] = "L"
  Face_Name_L[9] = "L"
  Face_Name_L[10] = "L"
  Face_Name_L[11] = "L"
  Face_Name_L[12] = "L"
  Face_Name_L[13] = "L"
  Face_Name_L[14] = "L"
  Face_Name_L[15] = "L"
  Face_Name_L[16] = "L"
  Face_Name_L[17] = "L"
  Face_Name_L[18] = "L"
  Face_Name_L[19] = "L"
  Face_Name_L[20] = "L"
  Face_Name_L[21] = "L"
  Face_Name_L[22] = "L"
  Face_Name_L[23] = "L"
  Face_Name_L[24] = "L"
  Face_Name_L[25] = "L"
  Face_Name_L[26] = "L"
  Face_Name_L[27] = "L"
  Face_Name_L[28] = "L"
  Face_Name_L[29] = "L"
  Face_Name_L[30] = "L"
  Face_Name_L[31] = "L"
  Face_Name_L[32] = "L"
  Face_Name_L[33] = "L"
  Face_Name_L[34] = "L"
  Face_Name_L[35] = "L"
  Face_Name_L[36] = "L"
  Face_Name_L[37] = "L"
  Face_Name_L[38] = "L"
  Face_Name_L[39] = "L"
  Face_Name_L[40] = "L"
  Face_Name_L[41] = "L"
  Face_Name_L[42] = "L"
  Face_Name_L[43] = "L"
  Face_Name_L[44] = "L"
  Face_Name_L[45] = "L"
  Face_Name_L[46] = "L"
  Face_Name_L[47] = "L"
  Face_Name_L[48] = "L"
  Face_Name_L[49] = "L"
  Face_Name_L[50] = "L"
  Face_Name_L[51] = "L"
  Face_Name_L[52] = "L"
  Face_Name_L[53] = "L"
  Face_Name_L[54] = "L"
  Face_Name_L[55] = "L"
  Face_Name_L[56] = "L"
  Face_Name_L[57] = "L"
  Face_Name_L[58] = "L"
  Face_Name_L[59] = "L"
  Face_Name_L[60] = "L"
  Face_Name_L[61] = "L"
  Face_Name_L[62] = "L"
  Face_Name_L[63] = "L"
  Face_Name_L[64] = "L"
  Face_Name_L[65] = "L"
  Face_Name_L[66] = "L"
  Face_Name_L[67] = "L"
  Face_Name_L[68] = "L"
  Face_Name_L[69] = "L"
  
  # パラメータ上昇時のSE(名前、音量、ピッチ)
  SE_Data = ["Audio/SE/Heal7", 100, 150]
  
  # スキル習得時のSE(名前、音量、ピッチ)
  Skill_SE_Data = ["Audio/SE/Up4", 100, 150]
  
end
#==============================================================================
# ■ Bitmap
#------------------------------------------------------------------------------
#  画像そのものを扱う組み込みクラスです。
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # ● 指定範囲のクリア
  #--------------------------------------------------------------------------
  def rect_clear(x, y, width, height)
    # 対象の範囲を消す
    rect = Rect.new(x, y, width, height)
    self.fill_rect(rect, Color.new(0, 0, 0, 0))
  end
end
#==============================================================================
# ■ Window
#------------------------------------------------------------------------------
#  ゲーム内の全てのウィンドウのスーパークラスです。
#   内部的には複数のスプライトで構成されています。
#==============================================================================
class Window
  #--------------------------------------------------------------------------
  # ● ウィンドウのセンタリング
  #--------------------------------------------------------------------------
  def centering
    # ウィンドウを画面の中央に配置する
    self.x = (Graphics.width - self.width)  / 2
    self.y = (Graphics.height - self.height) / 2
  end
end
#==============================================================================
# ■ Game_Temp
#------------------------------------------------------------------------------
#  セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン
# スタンスは $game_temp で参照されます。
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :after_battle_phase       # アフターバトルフェーズ中フラグ
end
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 基本通常能力値の取得
  #--------------------------------------------------------------------------
  def base_param(param_id)
    return param_base(param_id)
  end
  #--------------------------------------------------------------------------
  # ● レベルアップメッセージの表示
  #     new_skills : 新しく習得したスキルの配列
  #--------------------------------------------------------------------------
  def display_level_up(new_skills)
    # 何もなかった事にする
  end
end
#==============================================================================
# ■ Game_Troop
#------------------------------------------------------------------------------
#  敵グループおよび戦闘に関するデータを扱うクラスです。バトルイベントの処理も
# 行います。このクラスのインスタンスは $game_troop で参照されます。
#==============================================================================
class Game_Troop < Game_Unit
  #--------------------------------------------------------------------------
  # ● 全滅判定の取得
  #--------------------------------------------------------------------------
  def all_dead?
    # スーパークラスの処理に以降
    bool = super
    # 勝利確定の場合
    if bool then
      # アフターバトルフェーズ中でない場合
      unless $game_temp.after_battle_phase then
        # アフターバトルフェーズを予約する
        $game_temp.after_battle_phase = true
        # アクティブレベルアップVXAが有効な場合
        if MINTO::RGSS["Active_Lv_UpVX"]
          # アフターバトルフェーズ準備
          SceneManager.scene.reservation_after_battle_phase
        end
        # 第二アフターバトルフェーズ準備
        SceneManager.scene.reservation_second_after_battle_phase
      end
    end
    # メソッドを返す
    return bool
  end
end
#==============================================================================
# ■ Window_Lvup_Data
#------------------------------------------------------------------------------
#   Lvup時のデータを表示するウィンドウです。
#==============================================================================
class Window_Lvup_Data < Window_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :data                     # データ
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 512, 320)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 10016
    self.visible = false
    @data = {}
    centering
  end
  #--------------------------------------------------------------------------
  # ● グラフィックの作成
  #    actor : アクター
  #    x     : 描写先のX座標
  #    y     : 描写先のY座標
  #--------------------------------------------------------------------------
  def graphic_set(actor, x, y)
    # 顔グラフィック末尾名が有効な場合
    unless MINTO::Face_Name_L[actor.id].nil? then
      # ファイル名を作成
      file_name = "#{actor.face_name}-#{actor.face_index}"
      # ファイル末尾名を取得
      file_name += MINTO::Face_Name_L[actor.id]
      # 顔グラフィックを読み込む
      face = Cache.picture(file_name)
      # 顔グラフィックを描写
      self.contents.blt(x, y, face, face.rect)
    # 顔グラフィック末尾名が無効な場合
    else
      # 現在の設定グラフィックを描写
      draw_face(actor.face_name, actor.face_index, x, y)
    end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #    actor : アクター
  #--------------------------------------------------------------------------
  def refresh(actor)
    x = 160
    self.contents.clear
    # アクター名を描写
    self.contents.font.color = normal_color
    self.contents.draw_text(x * 0, 24 * 0, 224, 24, actor.name)
    # アクターグラフィックを描写
    graphic_set(actor, 240, 0)
    # 用語を描写
    self.contents.font.color = system_color
    self.contents.draw_text(x * 0, 24 * 1, 96, 24, "Level")
    for i in 0...8 do
      self.contents.draw_text(x * 0, 24 * (i + 2), 96, 24, Vocab::param(i))
    end
    self.contents.font.color = normal_color
    # パラメータを描写
    for i in 0...@data[actor].size do
      draw_status(actor, i)
    end
  end
  #--------------------------------------------------------------------------
  # ● 能力の描写
  #    actor : アクター
  #    index : 項目
  #--------------------------------------------------------------------------
  def draw_status(actor, index)
    # 描写座標を設定
    x = 96
    y = 24 + (index * 24)
    # 描写範囲をクリア
    self.contents.rect_clear(x, y, 48, 24)
    # 能力値を描写
    self.contents.draw_text(x, y, 96, 24, @data[actor][index].to_s)
  end
end
#==============================================================================
# ■ Window_BattleCenter_Help
#------------------------------------------------------------------------------
#  戦闘画面で任意の文章を表示するウィンドウです。
#==============================================================================
class Window_BattleCenter_Help < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 64, 56)
    self.z = 20000
    self.visible = false
    create_contents
    @message_duration = 0
    @save_text = ""
    @text = []
    @text_y = 0
    @text_x = 0
    @text_type = 0
    @text_index = 0
    @text_width = []
    @speed = 1
  end
  #--------------------------------------------------------------------------
  # ● テキスト設定
  #    text : スプライトに表示する文字列
  #--------------------------------------------------------------------------
  def set_text(text)
    # 求められたテキストが無効な場合
    if text.to_s == "" then
      # 表示カウントを設定
      @message_duration = 8
      # メソッドを終了
      return
    end
    self.active = true
    # 終了記号を追加
    text += "\\bw"
    # スプライトを可視状態にする
    self.visible = true
    # 各データを初期化
    @save_text = ""
    @text = []
    @text_width = []
    @text_index = 0
    @text_type = 0
    @speed = 1
    self.pause = false
    self.opacity = 192
    self.contents_opacity = 255
    # 表示カウントを設定
    @message_duration = 16
    # 文字を複製
    data = text.dup
    # 各制御文字を仮変換
    data.gsub!(/\\\\/) { "\000" }
    data.gsub!(/\\[Cc]\[([0-9]+)\]/) { "" }
    data.gsub!(/\\[Bb][Ww]/) { "" }
    # ウィンドウのサイズを調節
    self.width = 32 + (self.contents.text_size(data).width)
    self.height = 56
    # センター表示
    centering
    # ビットマップを再作成
    create_contents
    refresh(text.dup)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #    text : スプライトに表示する文字列
  #--------------------------------------------------------------------------
  def refresh(text)
    # 基本情報を初期化
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.bold = false
    self.contents.font.italic = false
    @text_x = 0
    @text_y = 0
    # 文章のインデックスを初期化
    @text_index = 0
    # 便宜上、"\\\\" を "\000" に変換
    text.gsub!(/\\\\/) { "\000" }
    # 各制御文字を実際のものに変換
    text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
    text.gsub!(/\\[Bb][Ww]/) { "\017" }
    @save_text = text.dup
  end
  #--------------------------------------------------------------------------
  # ● テキストの更新
  #--------------------------------------------------------------------------
  def text_update
    @text = @save_text.split(//)
    # 無効な文字列の場合
    if @text[@text_index] == nil then
      # メソッドを返す
      return false
    end
    # スプライトを可視状態にする
    self.visible = true
    # テキストを取得
    c = @text[@text_index]
    # \\ の場合
    if c == "\000" then
      # 本来の文字に戻す
      c = "\\"
    # \C[n] の場合
    elsif c == "\001" then
      # 制御文字を処理
      @save_text.sub!(/\[([0-9]+)\]/, "")
      # 文字色のIDを取得
      color = $1.to_i
      # 文字色のIDが有効な場合
      if color >= 0 then
        # 文字色を変更
        self.contents.font.color = text_color(color)
      end
      # インデックスを進める
      @text_index += 1
      # メソッドを返す
      return true
    # \BW の場合
    elsif c == "\017" then
      # 文章の表示速度を初期化
      @speed = 0
      # ポーズサインを表示する
      self.pause = true
      # ボタン待ちフラグをオン
      @press = true
      # インデックスを進める
      @text_index += 1
      # メソッドを返す
      return true
    end
    # 文字を描画
    self.contents.draw_text(@text_x, 0, 40, 24, c)
    # @text_x に描画した文字の幅を加算
    @text_x += self.contents.text_size(c).width
    # インデックスを進める
    @text_index += 1
    return true
  end
  #--------------------------------------------------------------------------
  # ● ウェイトの終了
  #--------------------------------------------------------------------------
  def wait_end
    # ボタン入力待ちフラグをオフ
    @press = false
    # ポーズサインを非表示にする
    self.pause = false
    # ウィンドウを不可視にする
    self.visible = false
    # ボタン入力待ちフラグをオフ
    @press = false
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ボタン入力待ちフラグがオンの場合
    if @press == true then
      super
      # C ボタンが押された場合
      if Input.trigger?(Input::C) == true then
        # ウェイトの終了
        wait_end
      end
      # メソッドを返す
      return
    end
    # 更新が可能なフレームでない場合
    if @speed != 0 and (Graphics.frame_count % @speed != 0) then
      # メソッドを返す
      return
    end
    # テロップを更新中の場合
    if text_update == true then
      # スピードが 0 の場合
      if @speed == 0 then
        update
      end
      # メソッドを返す
      return
    else
      # 文章の表示速度を最速化
      @speed = 1
    end
  end
end
#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● 終了処理
  #--------------------------------------------------------------------------
  alias :terminate_MITO_RGSS3_04 :terminate
  def terminate
    # 元の処理を実行
    terminate_MITO_RGSS3_04
    # レベルアップウィンドウが有効な場合
    unless @lvup_window.nil?
      # レベルアップウィンドウを解放
      @lvup_window.dispose
      # センターヘルプウィンドウを解放
      @center_help_window.dispose
    end
  end
  #--------------------------------------------------------------------------
  # ● 終了前処理
  #--------------------------------------------------------------------------
  alias :pre_terminate_MITO_RGSS3_04 :pre_terminate
  def pre_terminate
    # アフターバトルフェーズ中の場合
    if $game_temp.after_battle_phase == true then
      # アクティブレベルアップVXAが有効な場合
      if MINTO::RGSS["Active_Lv_UpVX"]
        # アフターバトルフェーズの開始
        start_after_battle_phase
        # ポーズサインを表示する
        @active_gauge_window.pause = true
        # ループ処理
        loop do
          # ゲーム画面を更新
          Graphics.update
          # 入力情報を更新
          Input.update
          # ウィンドウを更新
          @active_gauge_window.update
          # C ボタンが押された場合
          if Input.trigger?(Input::C) == true then
            break
          end
        end
      end
      # 第二アフターバトルフェーズの開始
      start_second_after_battle_phase
    end
    # アフターバトルフェーズをクリア
    $game_temp.after_battle_phase = false
    # 元の処理を実行
    pre_terminate_MITO_RGSS3_04
  end
  #--------------------------------------------------------------------------
  # ● 第二アフターバトルフェーズの準備
  #--------------------------------------------------------------------------
  def reservation_second_after_battle_phase
    # レベルアップウィンドウを作成
    @lvup_window = Window_Lvup_Data.new
    # センターヘルプウィンドウを作成
    @center_help_window = Window_BattleCenter_Help.new
    @last_skills_array = []
    # ループ処理(パーティー)
    for i in 0...$game_party.all_members.size do
      # アクターを取得
      actor = $game_party.all_members[i]
      # 最終能力値を保存
      save_last_parameter(actor)
      # スキルを保存
      @last_skills_array[i] = actor.skills.dup
    end
  end
  #--------------------------------------------------------------------------
  # ● 第二アフターバトルフェーズの開始
  #--------------------------------------------------------------------------
  def start_second_after_battle_phase
    # レベルアップモーション
    level_up_motion
  end
  #--------------------------------------------------------------------------
  # ● 最終能力値の記憶
  #    actor : アクター
  #--------------------------------------------------------------------------
  def save_last_parameter(actor)
    @lvup_window.data[actor] = []
    @lvup_window.data[actor][0] = actor.level
    @lvup_window.data[actor][1] = actor.base_param(0)
    @lvup_window.data[actor][2] = actor.base_param(1)
    @lvup_window.data[actor][3] = actor.base_param(2)
    @lvup_window.data[actor][4] = actor.base_param(3)
    @lvup_window.data[actor][5] = actor.base_param(4)
    @lvup_window.data[actor][6] = actor.base_param(5)
    @lvup_window.data[actor][7] = actor.base_param(6)
    @lvup_window.data[actor][8] = actor.base_param(7)
    @lvup_window.data[actor][9] = actor.base_param(8)
    @lvup_window.data[actor][10] = actor.base_param(9)
    @lvup_window.data[actor][11] = actor.base_param(10)
    @lvup_window.data[actor][12] = actor.base_param(11)
    @lvup_window.data[actor][13] = actor.base_param(12)
    @lvup_window.data[actor][14] = actor.base_param(13)
    @lvup_window.data[actor][15] = actor.base_param(14)
    @lvup_window.data[actor][16] = actor.base_param(15)
    @lvup_window.data[actor][17] = actor.base_param(16)
    @lvup_window.data[actor][18] = actor.base_param(17)
    @lvup_window.data[actor][19] = actor.base_param(18)
    @lvup_window.data[actor][20] = actor.base_param(19)
    @lvup_window.data[actor][21] = actor.base_param(20)
    @lvup_window.data[actor][22] = actor.base_param(21)
    @lvup_window.data[actor][23] = actor.base_param(22)
    @lvup_window.data[actor][24] = actor.base_param(23)
    @lvup_window.data[actor][25] = actor.base_param(24)
    @lvup_window.data[actor][26] = actor.base_param(25)
    @lvup_window.data[actor][27] = actor.base_param(26)
    @lvup_window.data[actor][28] = actor.base_param(27)
    @lvup_window.data[actor][29] = actor.base_param(28)
    @lvup_window.data[actor][30] = actor.base_param(29)
    @lvup_window.data[actor][31] = actor.base_param(30)
    @lvup_window.data[actor][32] = actor.base_param(31)
    @lvup_window.data[actor][33] = actor.base_param(32)
    @lvup_window.data[actor][34] = actor.base_param(33)
    @lvup_window.data[actor][35] = actor.base_param(34)
    @lvup_window.data[actor][36] = actor.base_param(35)
    @lvup_window.data[actor][37] = actor.base_param(36)
    @lvup_window.data[actor][38] = actor.base_param(37)
    @lvup_window.data[actor][39] = actor.base_param(38)
    @lvup_window.data[actor][40] = actor.base_param(39)
    @lvup_window.data[actor][41] = actor.base_param(40)
    @lvup_window.data[actor][42] = actor.base_param(41)
    @lvup_window.data[actor][43] = actor.base_param(42)
    @lvup_window.data[actor][44] = actor.base_param(43)
    @lvup_window.data[actor][45] = actor.base_param(44)
    @lvup_window.data[actor][46] = actor.base_param(45)
    @lvup_window.data[actor][47] = actor.base_param(46)
    @lvup_window.data[actor][48] = actor.base_param(47)
    @lvup_window.data[actor][49] = actor.base_param(48)
    @lvup_window.data[actor][50] = actor.base_param(49)
    @lvup_window.data[actor][51] = actor.base_param(50)
    @lvup_window.data[actor][52] = actor.base_param(51)
    @lvup_window.data[actor][53] = actor.base_param(52)
    @lvup_window.data[actor][54] = actor.base_param(53)
    @lvup_window.data[actor][55] = actor.base_param(54)
    @lvup_window.data[actor][56] = actor.base_param(55)
    @lvup_window.data[actor][57] = actor.base_param(56)
    @lvup_window.data[actor][58] = actor.base_param(57)
    @lvup_window.data[actor][59] = actor.base_param(58)
    @lvup_window.data[actor][60] = actor.base_param(59)
    @lvup_window.data[actor][61] = actor.base_param(60)
    @lvup_window.data[actor][62] = actor.base_param(61)
    @lvup_window.data[actor][63] = actor.base_param(62)
    @lvup_window.data[actor][64] = actor.base_param(63)
    @lvup_window.data[actor][65] = actor.base_param(64)
    @lvup_window.data[actor][66] = actor.base_param(65)
    @lvup_window.data[actor][67] = actor.base_param(66)
    @lvup_window.data[actor][68] = actor.base_param(67)
    @lvup_window.data[actor][69] = actor.base_param(68)
  end
  #--------------------------------------------------------------------------
  # ● 現在のパラメータの取得
  #    actor : アクター
  #    index : 項目
  #--------------------------------------------------------------------------
  def look_parameter(actor, index)
    # 項目に応じて分岐
    case index
    when 0 then
      return actor.level
    else
      return actor.base_param(index - 1)
    end
  end
  #--------------------------------------------------------------------------
  # ● 習得したスキルの表示
  #    actor : アクター
  #--------------------------------------------------------------------------
  def learning_skills_pop(actor)
    learning_skills = []
    # ループ処理
    for skill in actor.skills do
      # 未収得のスキルの場合
      unless @last_skills_array[actor.index].include?(skill) then
        # 習得したスキルを取得
        learning_skills.push(skill)
      end
    end
    # スキルを習得していない場合
    if learning_skills.empty? then
      # メソッドを返す
      return
    end
    # ループ処理
    for skill in learning_skills do
      wait_count = 128
      # 習得MEを演奏
      data = MINTO::Skill_SE_Data
      Audio.se_play(data[0], data[1], data[2])
      # スキル名を表示
      @center_help_window.set_text("\\c[1]#{skill.name}\\c[0]技能習得!")
      # 表示が終わるまでループ
      while @center_help_window.visible == true do
        # ゲーム画面を更新
        Graphics.update
        # 入力情報を更新
        Input.update
        # センターヘルプウィンドウを更新
        @center_help_window.update
        wait_count -= 1
        if wait_count.zero? then
          @center_help_window.wait_end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● レベルアップモーション
  #--------------------------------------------------------------------------
  def level_up_motion
    # ポップ作成
    @pop = Mint_Pop.new
    # ループ処理(パーティー)
    for id in 0...$game_party.all_members.size do
      # アクターを取得
      actor = $game_party.all_members[id]
      # レベルが上がっていない場合
      if @lvup_window.data[actor][0] == actor.level then
        # 次のアクターへ
        next
      end
      # パラメータウィンドウをリフレッシュ
      @lvup_window.refresh(actor)
      # レベルが上がっている場合
      if @lvup_window.data[actor][0] < actor.level then
        # パラメータウィンドウを表示
        @lvup_window.visible = true
        # ループ処理
        for i in (0..8) do
          # 描写座標を設定
          x = 144
          y = 66 + (i * 24)
          # 上昇したパラメータを読み込む
          parameter = look_parameter(actor, i)
          # 結果を収納する
          string = "+#{parameter - @lvup_window.data[actor][i]}"
          # 上昇後のパラメータを設定
          @lvup_window.data[actor][i] = parameter
          # パラメータウィンドウをリフレッシュ
          @lvup_window.draw_status(actor, i)
          # ポップ描写
          @pop.string_pop(string, x, y)
          # ウェイトカウントを設定
          wait = i == 8 ? 160 : 6
          # ポップSEを演奏
          data = MINTO::SE_Data
          Audio.se_play(data[0], data[1], data[2])
          # フレーム更新
          wait.times do
            # ゲーム画面を更新
            Graphics.update
            # 入力情報を更新
            Input.update
            # スプライトセットを更新
            @spriteset.update
            # ポップを更新
            @pop.update
            # パラメータウィンドウを更新
            @lvup_window.update
            # 最終インデックスの場合
            if i == 8 then
              # ポーズサインを表示する
              @lvup_window.pause = true
              # C ボタンが押された場合
              if Input.trigger?(Input::C) == true then
                # ポーズサインを非表示にする
                @lvup_window.pause = false
                # 更新を中断
                break
              end
            end
          end
        end
      end
      # 習得したスキルを表示
      learning_skills_pop(actor)
      # ポップを解放
      @pop.dispose
    end
    # ポーズサインを表示する
    @lvup_window.pause = true
    # ループ処理
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # ウィンドウを更新
      @lvup_window.update
      # C ボタンが押された場合
      if Input.trigger?(Input::C) == true then
        break
      end
    end
    # パラメータウィンドウを閉じる
    @lvup_window.visible = false
  end
end
#==============================================================================
# ■ Mint_Pop
#------------------------------------------------------------------------------
#  数字のスプライト表示を扱うクラスです。
#==============================================================================
class Mint_Pop
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @string_pop_sprite = []
    @string_pop_duration = []
  end
  #--------------------------------------------------------------------------
  # ● ストリングポップ
  #    string : 求められた文字列
  #    x      : X座標
  #    y      : Y座標
  #--------------------------------------------------------------------------
  def string_pop(string = "", x = 0, y = 0)
    # string が無効なら処理を終了
    return if string == ""
    wlh = 24
    # スプライトを生成
    string_pop_sprite = Sprite.new
    # 文字を描写
    string_pop_sprite.bitmap = Bitmap.new(96, 40)
    string_pop_sprite.bitmap.font.size = 17
    string_pop_sprite.bitmap.font.shadow = false
    string_pop_sprite.bitmap.font.color.set(0, 0, 0)
    string_pop_sprite.bitmap.draw_text(-1, 12-1, 96, wlh, string, 1)
    string_pop_sprite.bitmap.draw_text(+1, 12-1, 96, wlh, string, 1)
    string_pop_sprite.bitmap.draw_text(-1, 12+1, 96, wlh, string, 1)
    string_pop_sprite.bitmap.draw_text(+1, 12+1, 96, wlh, string, 1)
    string_pop_sprite.bitmap.font.color.set(128, 255, 224)
    string_pop_sprite.bitmap.draw_text(0, 12, 96, wlh, string, 1)
    # 座標データを代入
    string_pop_sprite.x = x
    string_pop_sprite.y = y
    string_pop_sprite.z = 10032
    # 配列の先頭にシフト
    @string_pop_sprite.unshift(string_pop_sprite)
    @string_pop_duration.unshift(40)      
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    # ループ処理
    for i in 0...@string_pop_sprite.size do
      # 有効なスプライトの場合
      unless @string_pop_sprite[i].nil? then
        # スプライトを解放
        @string_pop_sprite[i].bitmap.dispose
        @string_pop_sprite[i].dispose
        @string_pop_sprite[i] = nil
        @string_pop_duration[i] = nil
      end
    end
    # 配列内容をクリア
    @string_pop_sprite.clear
    @string_pop_duration.clear
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # 1つでもストリングポップが表示中の場合
    if @string_pop_sprite.size > 0
      # 表示中のストリングポップを1つずつ処理する
      for i in 0...@string_pop_sprite.size
        # ストリングポップを代入
        string = @string_pop_sprite[i]
        # カウントが0の場合
        if @string_pop_duration[i] == 0
          # 次の処理へ
          next
        end
        # カウントを減らす
        @string_pop_duration[i] -= 1
        # 残りカウントに応じて分岐
        case @string_pop_duration[i]
        when 36..39
          string.y -= 4
          string.blend_type = 1
        when 33..37
          string.y -= 2
          string.blend_type = 1
        when 32..34
          string.y += 2
          string.blend_type = 0
        when 25..32
          string.y += 4
          string.blend_type = 0
        end
      end
    end
  end
end
end
麻烦大大帮忙撒………………复制代码#==============================================================================
# 
# ▼ Yanfly Engine Ace - JP Manager v1.00
# -- Last Updated: 2012.01.07
# -- Level: Normal, Hard
# -- Requires: n/a
# 
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-JPManager"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.07 - Started Script and Finished.
# 
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script provides a base for JP implementation. JP is a currency similar
# to EXP that's gained through performing actions and leveling up in addition
# to killing enemies. This script provides modifiers that adjust the gains for
# JP through rates, individual gains per skill or item, and per enemy. Though
# this script provides no usage of JP by itself, future Yanfly Engine Ace
# scripts may make use of it.
# 
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
# 
# -----------------------------------------------------------------------------
# Actor Notetags - These notetags go in the actors notebox in the database.
# -----------------------------------------------------------------------------
# <jp rate: x%>
# Changes the JP earned rate to x%. This affects JP earned and not JP directly
# gained. If this notetag isn't used, the object will default to 100%.
# 
# -----------------------------------------------------------------------------
# Class Notetags - These notetags go in the class notebox in the database.
# -----------------------------------------------------------------------------
# <jp rate: x%>
# Changes the JP earned rate to x%. This affects JP earned and not JP directly
# gained. If this notetag isn't used, the object will default to 100%.
# 
# -----------------------------------------------------------------------------
# Skill Notetags - These notetags go in the skills notebox in the database.
# -----------------------------------------------------------------------------
# <jp gain: x>
# When the actor successfully hits an target with this action, the actor will
# earn x JP. If this notetag isn't used, the amount of JP earned will equal to
# the ACTION_JP constant in the module.
# 
# -----------------------------------------------------------------------------
# Item Notetags - These notetags go in the items notebox in the database.
# -----------------------------------------------------------------------------
# <jp gain: x>
# When the actor successfully hits an target with this action, the actor will
# earn x JP. If this notetag isn't used, the amount of JP earned will equal to
# the ACTION_JP constant in the module.
# 
# -----------------------------------------------------------------------------
# Weapon Notetags - These notetags go in the weapon notebox in the database.
# -----------------------------------------------------------------------------
# <jp rate: x%>
# Changes the JP earned rate to x%. This affects JP earned and not JP directly
# gained. If this notetag isn't used, the object will default to 100%.
# 
# -----------------------------------------------------------------------------
# Armour Notetags - These notetags go in the armour notebox in the database.
# -----------------------------------------------------------------------------
# <jp rate: x%>
# Changes the JP earned rate to x%. This affects JP earned and not JP directly
# gained. If this notetag isn't used, the object will default to 100%.
# 
# -----------------------------------------------------------------------------
# Enemy Notetags - These notetags go in the enemy notebox in the database.
# -----------------------------------------------------------------------------
# <jp gain: x>
# Changes the amount of JP gained for killing the enemy to x. If this notetag
# isn't used, then the default JP gain will be equal to the amount set in the
# module through the constant ENEMY_KILL.
# 
# -----------------------------------------------------------------------------
# State Notetags - These notetags go in the states notebox in the database.
# -----------------------------------------------------------------------------
# <jp rate: x%>
# Changes the JP earned rate to x%. This affects JP earned and not JP directly
# gained. If this notetag isn't used, the object will default to 100%.
# 
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# $game_actors[x].earn_jp(y)
# $game_actors[x].earn_jp(y, z)
# This will cause actor x to earn y amount of JP. JP earned will be modified by
# any JP Rate traits provided through notetags. If z is used, z will be the
# class the JP is earned for.
# 
# $game_actors[x].gain_jp(y)
# $game_actors[x].gain_jp(y, z)
# This will cause actor x to gain y amount of JP. JP gained this way will not
# be modified by any JP Rate traits provided through notetags. If z is used,
# z will be the class the JP is gained for.
# 
# $game_actors[x].lose_jp(y)
# $game_actors[x].lose_jp(y, z)
# This will cause actor x to lose y amount of JP. JP lost this way will not be
# modified by any JP Rate traits provided through notetags. If z is used, z
# will be the class the JP is lost from.
# 
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
# 
# This script is compatible with Yanfly Engine Ace - Victory Aftermath v1.03+.
# If you wish to have Victory Aftermath display JP gains, make sure the version
# is 1.03+. Script placement of these two scripts don't matter.
# 
#==============================================================================
module YEA
  module JP
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - General JP Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This adjusts the way JP appears visually in your game. Change the icon
    # used and the vocabulary used here. Furthermore, adjust the maximum amount
    # of JP that an actor can have at a time.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    ICON   = 0           # Icon index used to represent JP.
    VOCAB  = "JP"        # What JP will be called in your game.
    MAX_JP = 99999999    # Maximum JP an actor can have.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Default JP Gain Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The following constants adjust how much JP is earned by default through
    # enemy kills, leveling up, and performing actions.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    ENEMY_KILL = 10     # JP earned for the whole party.
    LEVEL_UP   = 50    # JP earned when leveling up!
    ACTION_JP  = 1      # JP earned per successful hit.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Victory Message -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This adjusts the victory message shown for the default battle system and
    # the Yanfly Engine Ace - Victory Aftermath script (if used together).
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    VICTORY_MESSAGE   = "%s has earned %s %s!"
    VICTORY_AFTERMATH = "+%s%s"
    
  end # JP
end # YEA
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
  module REGEXP
  module BASEITEM
    
    JP_RATE = /<(?:JP_RATE|jp rate):[ ](\d+)([%%])>/i
    
  end # BASEITEM
  module USABLEITEM
    
    JP_GAIN = /<(?:JP_GAIN|jp gain):[ ](\d+)>/i
    
  end # USABLEITEM
  module ENEMY
    
    JP_GAIN = /<(?:JP_GAIN|jp gain):[ ](\d+)>/i
    
  end # ENEMY
  end # REGEXP
end # YEA
#==============================================================================
# ■ Vocab
#==============================================================================
module Vocab
  
  #--------------------------------------------------------------------------
  # new method: self.jp
  #--------------------------------------------------------------------------
  def self.jp
    return YEA::JP::VOCAB
  end
  
end # Vocab
#==============================================================================
# ■ Icon
#==============================================================================
module Icon
  
  #--------------------------------------------------------------------------
  # self.jp
  #--------------------------------------------------------------------------
  def self.jp; return YEA::JP::ICON; end
    
end # Icon
#==============================================================================
# ■ Numeric
#==============================================================================
class Numeric
  
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
    
end # Numeric
#==============================================================================
# ■ DataManager
#==============================================================================
module DataManager
  
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_jp load_database; end
  def self.load_database
    load_database_jp
    load_notetags_jp
  end
  
  #--------------------------------------------------------------------------
  # new method: load_notetags_jp
  #--------------------------------------------------------------------------
  def self.load_notetags_jp
    groups = [$data_actors, $data_classes, $data_weapons, $data_armors,
      $data_states, $data_enemies, $data_items, $data_skills]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_jp
      end
    end
  end
  
end # DataManager
#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
class RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :jp_rate
  
  #--------------------------------------------------------------------------
  # common cache: load_notetags_jp
  #--------------------------------------------------------------------------
  def load_notetags_jp
    @jp_rate = 1.0
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::BASEITEM::JP_RATE
        @jp_rate = $1.to_i * 0.01
      #---
      end
    } # self.note.split
    #---
  end
  
end # RPG::BaseItem
#==============================================================================
# ■ RPG::UsableItem
#==============================================================================
class RPG::UsableItem < RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :jp_gain
  
  #--------------------------------------------------------------------------
  # common cache: load_notetags_jp
  #--------------------------------------------------------------------------
  def load_notetags_jp
    @jp_gain = YEA::JP::ACTION_JP
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::USABLEITEM::JP_GAIN
        @jp_gain = $1.to_i
      #---
      end
    } # self.note.split
    #---
  end
  
end # RPG::UsableItem
#==============================================================================
# ■ RPG::Enemy
#==============================================================================
class RPG::Enemy < RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :jp_gain
  
  #--------------------------------------------------------------------------
  # common cache: load_notetags_jp
  #--------------------------------------------------------------------------
  def load_notetags_jp
    @jp_gain = YEA::JP::ENEMY_KILL
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::ENEMY::JP_GAIN
        @jp_gain = $1.to_i
      #---
      end
    } # self.note.split
    #---
  end
  
end # RPG::Enemy
#==============================================================================
# ■ BattleManager
#==============================================================================
module BattleManager
  
  #--------------------------------------------------------------------------
  # alias method: display_exp
  #--------------------------------------------------------------------------
  unless $imported["YEA-VictoryAftermath"]
  class <<self; alias battlemanager_display_exp_jp display_exp; end
  def self.display_exp
    battlemanager_display_exp_jp
    gain_jp
  end
  end # $imported["YEA-VictoryAftermath"]
  
  #--------------------------------------------------------------------------
  # new method: gain_jp
  #--------------------------------------------------------------------------
  def self.gain_jp
    amount = $game_troop.jp_total
    fmt = YEA::JP::VICTORY_MESSAGE
    for member in $game_party.members
      member.earn_jp(amount)
      next if $imported["YEA-VictoryAftermath"]
      value = member.battle_jp_earned.group
      $game_message.add('\.' + sprintf(fmt, member.name, value, Vocab::jp))
    end
    wait_for_message unless $imported["YEA-VictoryAftermath"]
  end
  
end # BattleManager
#==============================================================================
# ■ Game_BattlerBase
#==============================================================================
class Game_BattlerBase
  
  #--------------------------------------------------------------------------
  # new method: jpr
  #--------------------------------------------------------------------------
  def jpr
    n = 1.0
    if actor?
      n *= self.actor.jp_rate
      n *= self.class.jp_rate
      for equip in equips
        next if equip.nil?
        n *= equip.jp_rate
      end
    end
    for state in states
      next if state.nil?
      n *= state.jp_rate
    end
    return n
  end
  
end # Game_BattlerBase
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :battle_jp_earned
  
  #--------------------------------------------------------------------------
  # alias method: on_battle_start
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_start_jp on_battle_start
  def on_battle_start
    game_battler_on_battle_start_jp
    @battle_jp_earned = 0
  end
  
  #--------------------------------------------------------------------------
  # alias method: on_battle_end
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_end_jp on_battle_end
  def on_battle_end
    game_battler_on_battle_end_jp
    @battle_jp_earned = 0
  end
  
  #--------------------------------------------------------------------------
  # alias method: item_user_effect
  #--------------------------------------------------------------------------
  alias game_battler_item_user_effect_jp item_user_effect
  def item_user_effect(user, item)
    game_battler_item_user_effect_jp(user, item)
    user.earn_jp(item.jp_gain) if user.actor?
  end
  
end # Game_Battler
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
  
  #--------------------------------------------------------------------------
  # alias method: setup
  #--------------------------------------------------------------------------
  alias game_actor_setup_jp setup
  def setup(actor_id)
    game_actor_setup_jp(actor_id)
    init_jp
  end
  
  #--------------------------------------------------------------------------
  # new method: init_jp
  #--------------------------------------------------------------------------
  def init_jp
    @jp = {}
    @jp[@class_id] = 0
  end
  
  #--------------------------------------------------------------------------
  # new method: earn_jp
  #--------------------------------------------------------------------------
  def earn_jp(jp, class_id = nil)
    gain_jp(jp * jpr, class_id)
  end
  
  #--------------------------------------------------------------------------
  # new method: gain_jp
  #--------------------------------------------------------------------------
  def gain_jp(jp, class_id = nil)
    init_jp if @jp.nil?
    class_id = @class_id if class_id.nil?
    @jp[class_id] = 0 if @jp[class_id].nil?
    @jp[class_id] += jp.to_i
    @jp[class_id] = [[@jp[class_id], YEA::JP::MAX_JP].min, 0].max
    @battle_jp_earned = 0 if @battle_jp_earned.nil? && $game_party.in_battle
    @battle_jp_earned += jp.to_i if $game_party.in_battle
  end
  
  #--------------------------------------------------------------------------
  # new method: lose_jp
  #--------------------------------------------------------------------------
  def lose_jp(jp, class_id = nil)
    gain_jp(-jp, class_id)
  end
  
  #--------------------------------------------------------------------------
  # new method: jp
  #--------------------------------------------------------------------------
  def jp(class_id = nil)
    class_id = @class_id if class_id.nil?
    @jp[class_id] = 0 if @jp[class_id].nil?
    return @jp[class_id]
  end
  
  #--------------------------------------------------------------------------
  # alias method: level_up
  #--------------------------------------------------------------------------
  alias game_actor_level_up_jp level_up
  def level_up
    game_actor_level_up_jp
    earn_jp(YEA::JP::LEVEL_UP)
  end
  
end # Game_Actor
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
  
  #--------------------------------------------------------------------------
  # new method: jp
  #--------------------------------------------------------------------------
  def jp
    return enemy.jp_gain
  end
  
end # Game_Enemy
#==============================================================================
# ■ Game_Troop
#==============================================================================
class Game_Troop < Game_Unit
  
  #--------------------------------------------------------------------------
  # new method: jp_total
  #--------------------------------------------------------------------------
  def jp_total
    dead_members.inject(0) {|r, enemy| r += enemy.jp }
  end
  
end # Game_Troop
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
  
  #--------------------------------------------------------------------------
  # new method: draw_actor_jp
  #--------------------------------------------------------------------------
  def draw_actor_jp(actor, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp.group, 2)
  end
  
  #--------------------------------------------------------------------------
  # new method: draw_actor_jp_class
  #--------------------------------------------------------------------------
  def draw_actor_jp_class(actor, class_id, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp(class_id).group, 2)
  end
  
end # Window_Base
#==============================================================================
# 
# ▼ End of File
# 
#==============================================================================
 | 
 |