| 赞 | 29 |
| VIP | |
| 好人卡 | |
| 积分 | 31 |
| 经验 | |
| 最后登录 | 2014-4-25 |
| 在线时间 | 27 小时 |
- 梦石
- 0
- 星屑
- 1687
- 在线时间
- 27 小时
- 注册时间
- 2014-3-6
- 回帖
- 1
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 瀨織津姬 于 2014-3-30 16:51 编辑
- #==============================================================================
- #
- # リザルトウィンドウv1.5
- #
- #
- # ○KGC様の多人数パーティと併用できるようにしてありますが
- # パーティメンバー数があまりにも多い場合、ウィンドウが画面に収まりきりません
- # その場合、VIEW_STAND_BY_MEMBERSをfalseにすれば
- # 待機メンバーの情報は表示されません。
- #
- #==============================================================================
- module BBL
- #==============================================================================
- # ■ カスタマイズ
- #==============================================================================
- # リザルト画面の早送りを禁止するなら false にしてください
- SKIP_PM = true
- # リザルト画面の早送りボタンです
- SKIP_KEY = Input::C
- # 早送り時のカウント増加数です
- # ※この数値を増やすと早送り速度が上がります
- # (WAIT_TIMEと同値にすると、スキップ機能になります)
- SKIP_COUNT = 1
- # リザルト画面でのウェイト時間(というかループ回数です)
- WAIT_TIME = 200
-
- #---------------------------------------------------------------------------
- # リザルト画面配置設定
- # ※リザルト画面のメンバーリスト部分の配置やサイズを設定できます
- # ここでの数値にあわせて、その他のウィンドウサイズも変更されます
- # ※リザルトウィンドウとスキルウィンドウの横幅を画面二等分する場合の
- # 数値の例を記載しておきます
- # WINDOW_WIDTH = 272
- # WINDOW_ACTOR_X = 0
- # WINDOW_ACTOR_LEVEL = 48
- # WINDOW_EXP_GAUGE_X = 112
- # WINDOW_EXP_X = 112
- #---------------------------------------------------------------------------
- # リザルト画面の横幅です
- WINDOW_WIDTH = 304
- # リザルト画面に表示するアクター画像の位置です
- WINDOW_ACTOR_X = 8
- # リザルト画面に表示するアクターレベルの位置です
- WINDOW_ACTOR_LEVEL = 64
- # リザルト画面に表示する経験値ゲージの位置です
- WINDOW_EXP_GAUGE_X = 136
- # リザルト画面に表示するNext経験値の位置です
- WINDOW_EXP_X = 136
- # アクターひとり分の縦幅です
- ACTOR_HEIGHT = 40
-
- # EXPバーのグラデーションカラーです
- # ※EXP_COLOR1(左側)からEXP_COLOR2(右側)にバーのグラデーションが流れます
- EXP_COLOR1 = Color.new(105, 255, 132)
- EXP_COLOR2 = Color.new(20, 180, 45)
-
- # レベルアップ時のLV数値描画の色です
- LVUP_COLOR = Color.new(255, 220, 0)
-
- # リザルト画面でアクターの歩行グラフィックを表示する場合は 0
- # 名前を表示する場合は 1
- # ※アクターの名前が6文字以上だとLV表示と重なっちゃいます
- VIEW_ACTOR = 0
-
- # EXPウィンドウに表示する経験値の用語です
- VIEW_EXP = "Exp"
-
- # EXPウィンドウに表示するお金の用語です
- VIEW_GOLD = "金"
-
- # アイテム獲得時のアイテムウィンドウに表示する用語です
- VIEW_ITEM = "道具"
-
- # スキル習得時に表示する用語です
- VIEW_SKILL = " "
-
- # リザルト画面更新中に音を鳴らさないなら false にしてください
- EXP_SOUND = true
- # レベルアップ時に音を鳴らさないなら false にしてください
- LVUP_SOUND = true
- # アイテム獲得時に音を鳴らさないなら false にしてください
- ITEM_SOUND = true
-
- # リザルト画面更新中に音を鳴らす場合のSEファイル名です
- # ("ファイル名", ボリューム, ピッチ)
- EXP_SOUND_FILE = RPG::SE.new("Decision1", 80, 110)
-
- # リザルト画面更新中に音を鳴らす場合の間隔です
- # ※(WAIT_TIME ÷ EXP_SOUND_COUNT)回だけ音が連続で鳴ります
- EXP_SOUND_COUNT = 3
-
- # レベルアップ時に音を鳴らす場合のSEファイル名です
- # ("ファイル名", ボリューム, ピッチ)
- LVUP_SOUND_FILE = RPG::SE.new("encount", 80, 100)
-
- # アイテム獲得時に音を鳴らす場合のSEファイル名です
- # ("ファイル名", ボリューム, ピッチ)
- ITEM_SOUND_FILE = RPG::SE.new("Chime2", 80, 100)
-
- # KGCさんの装備スキルでAP獲得を導入している場合のみ設定してください
- # スキルマスター時に表示する用語です
- VIEW_SKILL_MASTER = "MASTER SKILL"
- # 多人数パーティも導入してる場合は待機メンバーにAPを獲得させるか
- # 設定してください
- STAND_BY_GAIN_AP = true
- # 待機メンバーのAP獲得率を設定できます
- # 数値の意味は多人数パーティのSTAND_BY_EXP_RATEと同じです
- STAND_BY_AP_RATE = 500
- # スキルマスター時に音を鳴らさないなら false にしてください
- SKILL_MASTER_SOUND = false
- # スキルマスター時に音を鳴らす場合のSEファイル名です
- # ("ファイル名", ボリューム, ピッチ)
- SKILL_MASTER_SOUND_FILE = RPG::SE.new("Up", 80, 100)
- #----------------------------------------------------------------------------
- # 習得スキルウィンドウのアクター画像位置微調整
- # ※アクターの歩行サイズ(32x32)を変更している方用です
- # 通常は、編集する必要はありません
- #----------------------------------------------------------------------------
- # 習得スキルウィンドウ1行分の縦幅です
- SKILL_ACTOR_HEIGHT = 24
- # 習得スキルウィンドウに描画するアクター画像の横幅です
- # ※この値によって、後に表示するスキル名のX座標も変更されます
- SKILL_ACTOR_WIDTH = 40
- # 習得スキルウィンドウに描画するアクター画像のX座標です
- SKILL_ACTOR_X = 20
- # 習得スキルウィンドウに描画するアクター画像のY座標です
- SKILL_ACTOR_Y = 32
- # アクター画像で表示させたくない部分のY座標です
- # ※足元の座標を0として、CLEAR_ACTOR_Yより下の画像が消えます
- CLEAR_ACTOR_Y = 10
-
- # KGCさんの多人数パーティを導入している際
- # リザルト画面に待機メンバーを表示させない場合はfalseにしてください
- VIEW_STAND_BY_MEMBERS = true
-
- #==============================================================================
- # ☆ ここからおまけ
- #
- # ターンボーナス
- # 指定ターン以内にバトルに勝利するとEXPとGOLDにボーナスが適応されます
- #
- # ノーダメージボーナス
- # 敵からダメージを受けないで勝利するとEXPとGOLDにボーナスが適応されます
- #
- #==============================================================================
-
- # ターンボーナスを有効にする場合は true にしてください
- TURN_BONUS = false
- # ターンボーナスの無効ターンです
- # ※TURN_BONUS_LIMIT = 2 の場合
- # 2ターン経過する前に勝利した場合ボーナスが適応されます
- TURN_BONUS_LIMIT = 2
- # リザルト画面でターンボーナスの条件を満たした際に表示する用語です
- TURN_BONUS_WORD = "ターンボーナス"
- # ターンボーナスの用語を表示する際の色です
- TURN_BONUS_COLOR = Color.new(255, 255, 150)
-
- # ノーダメージボーナスを有効にする場合は true にしてください
- # ※敵からダメージを受けないで勝利した場合、EXPとGOLDにボーナスを適応します
- NO_DAMAGE_BONUS = true
- # リザルト画面でノーダメージボーナスの条件を満たした際に表示する用語です
- NO_DAMAGE_WORD = "No Damage Bouns"
- # ノーダメージボーナスの用語を表示する際の色です
- NO_DAMAGE_COLOR = Color.new(255, 255, 150)
-
- # ボーナスが有効な場合のEXP増加レートです
- # (EXP_BONUS_RATE = 150 でEXPを通常の150%獲得します)
- EXP_BONUS_RATE = 120
- # ボーナスが有効な場合のGOLD増加レートです
- # (GOLD_BONUS_RATE = 150 でGOLDを通常の150%獲得します)
- GOLD_BONUS_RATE = 120
- # ※TURN_BONUSとNO_DAMAGE_BONUSを両方有効にした上でバトル中両条件を満たした場合
- # それぞれのBONUS_RATEが倍になります
- #==============================================================================
- # ■ カスタマイズ終了
- #==============================================================================
- end
- #==============================================================================
- # ■ KGC多人数パーティ用
- #==============================================================================
- $imported = {} if $imported == nil
- #==============================================================================
- # ■ Game_Actor
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :level_up_flug # レベルアップフラグ
- attr_accessor :new_skills # 新しく覚えたスキルの配列
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # actor_id : アクター ID
- #--------------------------------------------------------------------------
- alias initialize_BBL initialize
- def initialize(actor_id)
- initialize_BBL(actor_id)
- @new_skills = []
- end
- #--------------------------------------------------------------------------
- # ● 次のレベルまでの経験値の取得
- #--------------------------------------------------------------------------
- def next_rest_exp
- return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp) : 0
- end
- #--------------------------------------------------------------------------
- # ● 次のレベルまでの経験値の最大値の取得
- #--------------------------------------------------------------------------
- def next_max_exp
- return @exp_list[@level+1] - @exp_list[@level]
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 勝利の処理(再定義)
- #--------------------------------------------------------------------------
- def process_victory # 再定義
- @info_viewport.visible = false
- @message_window.visible = false
- #~ RPG::BGM.stop
- $game_system.battle_end_me.play
- unless $BTEST
- #~ $game_temp.map_bgm.play
- $game_temp.map_bgs.play
- end
- display_result
- battle_end(0)
- end
- #--------------------------------------------------------------------------
- # ○ リザルト画面表示
- #--------------------------------------------------------------------------
- def display_result
- members = $game_party.all_members if $imported["LargeParty"]
- members = $game_party.members unless $imported["LargeParty"]
- # レベルアップフラグ初期化
- for actor in members
- actor.level_up_flug = false
- end
- drop_items = $game_troop.make_drop_items
- for item in drop_items
- $game_party.gain_item(item, 1)
- end
- exp = $game_troop.exp_total
- gold = $game_troop.gold_total
- if $imported["EquipLearnSkill"]
- ap = $game_troop.ap_total
- else
- ap = 0
- end
-
- # 各ウィンドウ作成
- @resultitem_window = Window_ResultItem.new(drop_items) if drop_items != []
- @result_window = Window_Result.new
- @resultexp_window = Window_ResultNextExp.new(exp)
- @expview_window = Window_ResultExp.new(exp, gold, ap)
- @result_skill_window = Window_ResultSkill.new
- @result_skill_window.visible = false
- # RESULT_WINDOWのY座標
- @result_window.y = 208 - ((@result_window.height - @expview_window.height) / 2)
- @resultexp_window.y = @result_window.y
-
- # ドロップアイテムがあった場合
- if drop_items != []
- BBL::ITEM_SOUND_FILE.play if BBL::ITEM_SOUND == true
- # ITEM_WINDOWとRESULT_WINDOWの縦幅が画面の下枠を超える場合、全体の位置を上に調整
- if @result_window.height + @resultitem_window.height > 416 - @result_window.y
- @result_window.y = 416 - (@result_window.height + @resultitem_window.height)
- @resultexp_window.y = @result_window.y
- end
- # RESULT_WINDOWのY座標がEXP_WINDOWの縦幅よりも少ない場合、全体の位置を下に調整
- if @result_window.y < @expview_window.height
- @result_window.y = @expview_window.height
- @resultexp_window.y = @result_window.y
- end
- # アイテムウィンドウのY座標
- @resultitem_window.y = @result_window.y + @result_window.height if @resultitem_window != nil
- # 各ウィンドウのHEIGHTの合計が画面の枠を超える場合、全体のウィンドウ位置を調整と
- # ITEM_WINDOWの横幅を調整
- if @result_window.height + @resultitem_window.height + @expview_window.height > 416
- @result_window.x = @resultexp_window.x = @expview_window.x = 0
- @result_window.y = 208 - ((@result_window.height - @expview_window.height) / 2)
- @resultexp_window.y = @result_window.y
- @resultitem_window.x = @result_window.width
- @resultitem_window.y = (@result_window.y + @result_window.height) - @resultitem_window.height
- @resultitem_window.width = 544 - @result_window.width
- else
- # ITEM_WINDOWのX座標と横幅をRESULT_WINDOWにあわせる
- @resultitem_window.width = @result_window.width
- @resultitem_window.x = @result_window.x
- end
- end
- # EXPウィンドウのY座標
- @expview_window.y = @result_window.y - @expview_window.height
- # スキルウィンドウのY座標
- @result_skill_window.y = @expview_window.y
-
- #---------------------------------------------------------------------------
- # KGC 装備スキル用
- #---------------------------------------------------------------------------
- if $imported["EquipLearnSkill"]
- @result_skillkgc_window = Window_ResultSkill_KGC.new
- @result_skillkgc_window.visible = false
- skills = []
- members.each { |actor|
- last_full_ap_skills = actor.full_ap_skills
- unless actor.dead?
- member = actor.battle_member? if $imported["LargeParty"]
- member = actor.exist? unless $imported["LargeParty"]
- if member
- actor.gain_ap(ap, false)
- else
- if BBL::STAND_BY_GAIN_AP
- stand_by_ap = ap
- stand_by_ap = ap * (BBL::STAND_BY_AP_RATE / 1000.0)
- actor.gain_ap(stand_by_ap.round, false)
- end
- end
- end
- if actor.full_ap_skills != last_full_ap_skills
- new_full_ap_skills = actor.full_ap_skills - last_full_ap_skills
- unless new_full_ap_skills.empty?
- for i in 0...new_full_ap_skills.size
- skills.push([new_full_ap_skills[i].name, actor.id])
- end
- @result_skillkgc_window.visible = true
- @result_skillkgc_window.refresh(skills)
- @result_skillkgc_window.y = @expview_window.y
- @result_skill_window.y = @result_skillkgc_window.y + @result_skillkgc_window.height
- BBL::SKILL_MASTER_SOUND_FILE.play if BBL::SKILL_MASTER_SOUND
- end
- end
- }
- end
- #---------------------------------------------------------------------------
-
- # リザルト画面更新
- @count = 0
- @se_count = 0
- skills = []
- loop do
- if BBL::SKIP_PM == true
- @count += BBL::SKIP_COUNT if Input.press?(BBL::SKIP_KEY)
- end
- if BBL::EXP_SOUND == true
- BBL::EXP_SOUND_FILE.play if @se_count == 0 and exp != 0
- @se_count += 1
- @se_count = 0 if @se_count == BBL::EXP_SOUND_COUNT
- end
- @count += 1
- @count = BBL::WAIT_TIME if @count > BBL::WAIT_TIME
- @resultexp_window.update(exp, @count)
- for actor in members
- unless actor.new_skills.empty?
- for i in 0...actor.new_skills.size
- skills.push([actor.new_skills[i].name, actor.id])
- end
- @result_skill_window.visible = true
- @result_skill_window.refresh(skills)
- actor.new_skills = []
- end
- end
- break if @count == BBL::WAIT_TIME
- update_basic
- end
- @resultexp_window.update(exp, @count) # 補助
- wait(30) if @result_skill_window.visible
- # EXP獲得
- $game_party.members.each { |actor|
- actor.gain_exp(exp, false) if actor.exist?
- }
- if $imported["LargeParty"]
- exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
- $game_party.stand_by_members.each { |actor|
- actor.gain_exp(exp, false) if actor.exist?
- }
- end
- # ゴールド獲得
- $game_party.gain_gold(gold)
- loop do
- update_basic
- break if Input.trigger?(Input::C)
- end
-
- # 各ウィンドウの解放
- @result_window.dispose
- @expview_window.dispose
- @resultexp_window.dispose
- @result_skill_window.dispose
- @resultitem_window.dispose if @resultitem_window != nil
- @result_skillkgc_window.dispose if $imported["EquipLearnSkill"]
- end
- end
- #==============================================================================
- # ■ Window_ResultExp
- # リザルト画面で獲得EXPを表示するウィンドウです
- #==============================================================================
- class Window_ResultExp < Window_Base
- WIDTH = BBL::WINDOW_WIDTH # ウィンドウの横幅
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(exp, gold, ap)
- i = 2
- if BBL::NO_DAMAGE_BONUS
- i += 1 unless $game_temp.damage_flug
- end
- if BBL::TURN_BONUS
- i += 1 if $game_temp.turn_bonus
- end
- if $imported["EquipLearnSkill"]
- i += 1 if ap > 0
- end
- super(0, 0, WIDTH+80, WLH * i + 32)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh(exp, gold, ap)
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh(exp, gold, ap)
- self.contents.clear
- i = 0
- max_hit = $game_variables[152]
- max_damage = $game_variables[153]
- if BBL::TURN_BONUS
- if $game_temp.turn_bonus
- self.contents.font.color = BBL::TURN_BONUS_COLOR
- self.contents.draw_text(4, WLH * i, 272, WLH, BBL::TURN_BONUS_WORD)
- i += 1
- end
- end
- if BBL::NO_DAMAGE_BONUS
- unless $game_temp.damage_flug
- self.contents.font.color = BBL::NO_DAMAGE_COLOR
- self.contents.draw_text(4, WLH * i, 272, WLH, BBL::NO_DAMAGE_WORD)
- i += 1
- end
- end
- self.contents.font.color = system_color
- exp_width = contents.text_size(BBL::VIEW_EXP).width
- gold_width = contents.text_size(BBL::VIEW_GOLD).width
- self.contents.draw_text(4, WLH * i, exp_width, WLH, BBL::VIEW_EXP)
- self.contents.draw_text(4, WLH * i + WLH, gold_width, WLH, BBL::VIEW_GOLD)
- self.contents.font.color = normal_color
- x = [exp_width, gold_width].max
- if BBL::TURN_BONUS || BBL::NO_DAMAGE_BONUS
- exp_rate = 100
- gold_rate = 100
- if $game_temp.damage_flug == false && BBL::NO_DAMAGE_BONUS
- exp_rate += BBL::EXP_BONUS_RATE - 100
- gold_rate += BBL::GOLD_BONUS_RATE - 100
- end
- if $game_temp.turn_bonus && BBL::TURN_BONUS
- exp_rate += BBL::EXP_BONUS_RATE - 100
- gold_rate += BBL::GOLD_BONUS_RATE - 100
- end
- if $game_temp.damage_flug == false || $game_temp.turn_bonus
- exp1 = (exp / (exp_rate / 100.0)).round
- exp2 = exp - exp1
- total_exp = exp1, " + ", exp2
- total_exp = exp if exp == 0
- gold1 = (gold / (gold_rate / 100.0)).round
- gold2 = gold - gold1
- total_gold = gold1, " + ", gold2
- total_gold = gold if gold == 0
- self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, total_exp)
- self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, total_gold)
- else
- self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, exp)
- self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, gold)
- end
- else
- self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, exp)
- self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, gold)
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x + 176, WLH * i, 304 - 32, 24, "Chain")
- self.contents.draw_text(x + 176, WLH * i + WLH, 304 - 32, 24, "Damage")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 256, WLH * i, 304 - 32, 24, max_hit)
- self.contents.draw_text(x + 256, WLH * i + WLH, 304 - 32, 24, max_damage)
- if ap > 0
- i += 1
- self.contents.draw_text(x + 32, WLH * i + WLH, 304 - 32, 24, ap)
- self.contents.font.color = system_color
- self.contents.draw_text(4, WLH * i + WLH, gold_width, WLH, KGC::EquipLearnSkill::VOCAB_AP)
- end
- end
- end
- #==============================================================================
- # ■ Window_ResultItem
- # リザルト画面で獲得アイテムを表示するウィンドウです
- #==============================================================================
- class Window_ResultItem < Window_Base
- WIDTH = 544 - BBL::WINDOW_WIDTH
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(drop_items)
- x = BBL::WINDOW_WIDTH
- super(x, 0, WIDTH, (drop_items.size * WLH) + WLH + 32)
- refresh(drop_items)
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh(drop_items)
- self.contents.clear
- x = 4
- item_width = contents.text_size(BBL::VIEW_ITEM).width
- self.contents.font.color = system_color
- self.contents.draw_text(x, 0, item_width, WLH, BBL::VIEW_ITEM)
- y = WLH
- for item in drop_items
- draw_item_name(item, 4, y)
- y += WLH
- end
- end
- #--------------------------------------------------------------------------
- # ● アイテム名の描画
- # item : アイテム (スキル、武器、防具でも可)
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # enabled : 有効フラグ。false のとき半透明で描画
- #--------------------------------------------------------------------------
- def draw_item_name(item, x, y, enabled = true)
- 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
- self.contents.draw_text(x + 24, y, WIDTH - 56, WLH, item.name)
- end
- end
- end
- #==============================================================================
- # ■ Window_Result
- # リザルト画面でアクターの情報を表示するウィンドウです
- #==============================================================================
- class Window_Result < Window_Base
- HEIGHT = BBL::ACTOR_HEIGHT # アクター1人分の高さ
- WIDTH = BBL::WINDOW_WIDTH # ウィンドウの横幅
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- @members = $game_party.members
- if $imported["LargeParty"] && BBL::VIEW_STAND_BY_MEMBERS
- @members = $game_party.all_members
- end
- super(0, 0, WIDTH, (@members.size * HEIGHT) + 32)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.y = 208 - (height / 2)
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- name_width = []
- actor_x = BBL::WINDOW_ACTOR_X
- level_x = BBL::WINDOW_ACTOR_LEVEL
- gauge_x = BBL::WINDOW_EXP_GAUGE_X
- lv_width = contents.text_size(Vocab::level_a).width
- for actor in @members
- x = 4
- y = actor.index * HEIGHT unless $imported["LargeParty"]
- y = actor.party_index * HEIGHT if $imported["LargeParty"]
- sy = (HEIGHT / 2) - 16
- case BBL::VIEW_ACTOR
- when 0;draw_actor_graphic(actor, actor_x + 16, y + HEIGHT - sy)
- when 1;draw_actor_name(actor, actor_x, y + HEIGHT - 20 - sy)
- end
- self.contents.font.size = 20
- self.contents.font.color = system_color
- self.contents.draw_text(level_x, y + HEIGHT - 20 - sy, lv_width, WLH, Vocab::level_a)
- self.contents.draw_text(gauge_x, y + HEIGHT - 28 - sy, 64, WLH, "Next")
- end
- end
- end
- #==============================================================================
- # ■ Window_ResultSkill
- # リザルト画面で習得したスキルを表示するウィンドウです
- #==============================================================================
- HEIGHT = BBL::SKILL_ACTOR_HEIGHT
- WIDTH = 544 - BBL::WINDOW_WIDTH
- GWIDTH = BBL::SKILL_ACTOR_WIDTH
- class Window_ResultSkill < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- x = BBL::WINDOW_WIDTH
- super(x, 0, WIDTH, WLH + 32)
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh(skills)
- self.contents.clear
- text_width = contents.text_size(BBL::VIEW_SKILL).width
- self.height = skills.size * HEIGHT + WLH + 32
- self.contents = Bitmap.new(width - 32, height - 32)
- x = 0
- self.contents.font.color = system_color
- self.contents.draw_text(x, 0, text_width, WLH, BBL::VIEW_SKILL)
- last_id = 9999
- text_x = x + GWIDTH
- sy = BBL::SKILL_ACTOR_Y
- sx = BBL::SKILL_ACTOR_X
- for i in 0...skills.size
- actor = $data_actors[skills[i][1]]
- unless last_id == skills[i][1]
- draw_actor_graphic(actor, x + sx, sy + WLH + HEIGHT * i)
- end
- self.contents.font.color = normal_color
- self.contents.draw_text(text_x, WLH + HEIGHT * i, WIDTH - (32 + text_x), WLH, skills[i][0])
- last_id = skills[i][1]
- end
- end
- #--------------------------------------------------------------------------
- # ○ 歩行グラフィックの描画 (再定義)
- # character_name : 歩行グラフィック ファイル名
- # character_index : 歩行グラフィック インデックス
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # opacity : 不透明度
- #--------------------------------------------------------------------------
- def draw_character(character_name, character_index, x, y, opacity = 255)
- return if character_name == nil
- bitmap = Cache.character(character_name)
- sign = character_name[/^[\!\$]./]
- if sign != nil and sign.include?('$')
- cw = bitmap.width / 3
- ch = bitmap.height / 4
- else
- cw = bitmap.width / 12
- ch = bitmap.height / 8
- end
- n = character_index
- src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
- self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
- gheight = BBL::CLEAR_ACTOR_Y
- self.contents.clear_rect(x - cw / 2, y - gheight, GWIDTH, gheight)
- end
- end
- #==============================================================================
- # ■ Window_ResultNextExp
- # リザルト画面で動的な情報を表示するウィンドウです
- #==============================================================================
- class Window_ResultNextExp < Window_Base
- HEIGHT = BBL::ACTOR_HEIGHT # アクター1人分の高さ
- WIDTH = BBL::WINDOW_WIDTH # ウィンドウの横幅
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(exp)
- @members = $game_party.all_members if $imported["LargeParty"]
- @members = $game_party.members unless $imported["LargeParty"]
- super(0, 0, WIDTH, (@members.size * HEIGHT) + 32)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.y = 208 - (height / 2)
- self.opacity = 0
- end
- #--------------------------------------------------------------------------
- # ● EXP表示更新
- #--------------------------------------------------------------------------
- def update(exp_s, count)
- self.contents.clear
- level_x = BBL::WINDOW_ACTOR_LEVEL
- gauge_x = BBL::WINDOW_EXP_GAUGE_X
- exp_x = BBL::WINDOW_EXP_X
- for actor in @members
- # 装備の経験値2倍を適応
- exp = exp_s
- exp = exp_s * 2 if actor.double_exp_gain
- # KGC経験値&ゴールド変化適応
- exp = exp_s * actor.exp_gain_rate / 100 if $imported["VariableExpGold"]
- x = 56
- y = actor.index * HEIGHT unless $imported["LargeParty"]
- y = actor.party_index * HEIGHT if $imported["LargeParty"]
- sy = (HEIGHT / 2) - 16
- update_actor_level(actor, level_x, y + HEIGHT - 20 - sy) if view_member?(actor)
- update_actor_nextexp(actor, exp_x, y + HEIGHT - 28 - sy, exp, count)
- update_actor_exp_gauge(actor, gauge_x, y + HEIGHT - 22 - sy, exp, count) if view_member?(actor)
- end
- end
- #--------------------------------------------------------------------------
- # ○ レベル描画の更新
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- #--------------------------------------------------------------------------
- def update_actor_level(actor, x, y)
- self.contents.font.color = BBL::LVUP_COLOR if actor.level_up_flug == true
- self.contents.draw_text(x + 32, y, 24, WLH, actor.level)
- end
- #--------------------------------------------------------------------------
- # ○ NEXTEXP表示更新
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # width : 幅
- #--------------------------------------------------------------------------
- def update_actor_nextexp(actor, x, y, exp, count, width = 120)
- if actor.level == 300
- self.contents.draw_text(x, y, width, WLH, "MAX", 2)
- return
- end
- exp = 0 if actor.dead?
- if $imported["LargeParty"]
- unless actor.battle_member?
- exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
- end
- end
- gwc = exp * count / BBL::WAIT_TIME
- self.contents.font.color = normal_color
- if actor.next_rest_exp_s - gwc <= 0
- last_skills = actor.skills
- # KGCスキルCP制適応
- last_skills = actor.all_skills if $imported["SkillCPSystem"]
- actor.level_up
- actor.level_up_flug = true
- BBL::LVUP_SOUND_FILE.play if BBL::LVUP_SOUND == true
- actor.new_skills = actor.skills - last_skills
- # KGCスキルCP制適応
- actor.new_skills = actor.all_skills - last_skills if $imported["SkillCPSystem"]
- end
- if actor.next_max_exp > 0
- self.contents.draw_text(x, y, width, WLH, actor.next_rest_exp_s - gwc, 2) if view_member?(actor)
- else
- xr = x + width
- end
- end
- #--------------------------------------------------------------------------
- # ☆ EXP ゲージの描画(リザルト)
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # width : 幅
- #--------------------------------------------------------------------------
- def update_actor_exp_gauge(actor, x, y, exp, count, width = 120)
- color1 = BBL::EXP_COLOR1
- color2 = BBL::EXP_COLOR2
- if actor.level == 300
- self.contents.gradient_fill_rect(x, y + WLH - 8, width, 6, color1, color2)
- return
- end
- exp = 0 if actor.dead?
- if $imported["LargeParty"]
- unless actor.battle_member?
- exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
- end
- end
- max = actor.next_max_exp
- gw = width * (max - actor.next_rest_exp) / max
- exp = width * exp / max
- gwc = exp * count / BBL::WAIT_TIME + gw
- color1 = BBL::EXP_COLOR1
- color2 = BBL::EXP_COLOR2
- self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
- self.contents.gradient_fill_rect(x, y + WLH - 8, gwc, 6, color1, color2)
- end
- #--------------------------------------------------------------------------
- # ☆ 描画判定
- # KGC多人数パーティ導入時、待機メンバーの情報を描画するか判定
- #--------------------------------------------------------------------------
- def view_member?(actor)
- if $imported["LargeParty"]
- unless BBL::VIEW_STAND_BY_MEMBERS
- return false unless actor.battle_member?
- end
- end
- return true
- end
- end
- if $imported["EquipLearnSkill"]
- #==============================================================================
- # ■ Window_ResultSkill_KGC
- # マスターしたスキルを表示するウィンドウです
- # KGC 装備スキル導入時
- #==============================================================================
- HEIGHT = BBL::SKILL_ACTOR_HEIGHT
- WIDTH = 544 - BBL::WINDOW_WIDTH
- GWIDTH = BBL::SKILL_ACTOR_WIDTH
- class Window_ResultSkill_KGC < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- x = BBL::WINDOW_WIDTH
- super(x, 0, WIDTH, WLH + 32)
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh(skills)
- self.contents.clear
- text_width = contents.text_size(BBL::VIEW_SKILL_MASTER).width
- self.height = skills.size * HEIGHT + WLH + 32
- self.contents = Bitmap.new(width - 32, height - 32)
- x = 0
- self.contents.font.color = system_color
- self.contents.draw_text(x, 0, text_width, WLH, BBL::VIEW_SKILL_MASTER)
- last_id = 9999
- text_x = x + GWIDTH
- sy = BBL::SKILL_ACTOR_Y
- sx = BBL::SKILL_ACTOR_X
- for i in 0...skills.size
- actor = $data_actors[skills[i][1]]
- unless last_id == skills[i][1]
- draw_actor_graphic(actor, x + sx, sy + WLH + HEIGHT * i)
- end
- self.contents.font.color = normal_color
- self.contents.draw_text(text_x, WLH + HEIGHT * i, WIDTH - (32 + text_x), WLH, skills[i][0])
- last_id = skills[i][1]
- end
- end
- #--------------------------------------------------------------------------
- # ○ 歩行グラフィックの描画 (再定義)
- # character_name : 歩行グラフィック ファイル名
- # character_index : 歩行グラフィック インデックス
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # opacity : 不透明度
- #--------------------------------------------------------------------------
- def draw_character(character_name, character_index, x, y, opacity = 255)
- return if character_name == nil
- bitmap = Cache.character(character_name)
- sign = character_name[/^[\!\$]./]
- if sign != nil and sign.include?('$')
- cw = bitmap.width / 3
- ch = bitmap.height / 4
- else
- cw = bitmap.width / 12
- ch = bitmap.height / 8
- end
- n = character_index
- src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
- self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
- gheight = BBL::CLEAR_ACTOR_Y
- self.contents.clear_rect(x - cw / 2, y - gheight, GWIDTH, gheight)
- end
- end
- end
- if BBL::TURN_BONUS || BBL::NO_DAMAGE_BONUS
- #==============================================================================
- # ここからおまけ
- #==============================================================================
- # ■ Game_Temp
- #==============================================================================
- class Game_Temp
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :damage_flug # 被ダメージフラグ
- attr_accessor :turn_bonus # ターンボーナスフラグ
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias initialize_BBL initialize
- def initialize
- initialize_BBL
- @damage_flug = false
- @turn_bonus = true
- end
- end
- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler
- #--------------------------------------------------------------------------
- # ● 通常攻撃によるダメージ計算(追加定義)
- #--------------------------------------------------------------------------
- alias make_attack_damage_value_BBL make_attack_damage_value
- def make_attack_damage_value(attacker)
- # 元の処理
- make_attack_damage_value_BBL(attacker)
- # ダメージフラグ
- if $game_temp.damage_flug == false
- if @hp_damage > 0
- $game_temp.damage_flug = true unless attacker.actor?
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● スキルまたはアイテムによるダメージ計算(追加定義)
- #--------------------------------------------------------------------------
- alias make_obj_damage_value_BBL make_obj_damage_value
- def make_obj_damage_value(user, obj) # 追加定義
- # 元の処理
- make_obj_damage_value_BBL(user, obj)
- # ダメージフラグ
- if $game_temp.damage_flug == false
- if @hp_damage > 0
- $game_temp.damage_flug = true unless user.actor?
- end
- end
- end
- end
- #==============================================================================
- # ■ Game_Troop
- #==============================================================================
- class Game_Troop < Game_Unit
- #--------------------------------------------------------------------------
- # ● 経験値の合計計算(追加定義)
- #--------------------------------------------------------------------------
- alias exp_total_BBL exp_total
- def exp_total # 追加定義
- exp = exp_total_BBL
- rate = 100
- if BBL::NO_DAMAGE_BONUS
- if $game_temp.damage_flug == false
- rate += BBL::EXP_BONUS_RATE - 100
- end
- end
- if BBL::TURN_BONUS
- if $game_temp.turn_bonus
- rate += BBL::EXP_BONUS_RATE - 100
- end
- end
- exp = ((exp * rate) / 100).round
- return exp
- end
- #--------------------------------------------------------------------------
- # ● お金の合計計算(追加定義)
- #--------------------------------------------------------------------------
- alias gold_total_BBL gold_total
- def gold_total # 追加定義
- gold = gold_total_BBL
- rate = 100
- if BBL::NO_DAMAGE_BONUS
- if $game_temp.damage_flug == false
- rate += BBL::GOLD_BONUS_RATE - 100
- end
- end
- if BBL::TURN_BONUS
- if $game_temp.turn_bonus
- rate += BBL::GOLD_BONUS_RATE - 100
- end
- end
- gold = ((gold * rate) / 100).round
- return gold
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 戦闘終了(追加定義)
- #--------------------------------------------------------------------------
- alias battle_end_BBL battle_end
- def battle_end(result) # 追加定義
- $game_temp.damage_flug = false # ダメージフラグ初期化
- $game_temp.turn_bonus = true # ターンボーナス初期化
- # 元の処理
- battle_end_BBL(result)
- end
- #--------------------------------------------------------------------------
- # ● ターン終了(追加定義)
- #--------------------------------------------------------------------------
- alias turn_end_BBL turn_end
- def turn_end # 追加定義
- if $game_troop.turn_count == BBL::TURN_BONUS_LIMIT
- $game_temp.turn_bonus = false
- end
- # 元の処理
- turn_end_BBL
- end
- end
- end
复制代码
这个脚本是这样的
问题就是出在升满级的时候
比如99升100的时候就会出现这个错误
请问下应该怎么解决 |
-
评分
-
查看全部评分
|