赞 | 1 |
VIP | 16 |
好人卡 | 23 |
积分 | 0 |
经验 | 49509 |
最后登录 | 2016-1-9 |
在线时间 | 2459 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 2459 小时
- 注册时间
- 2011-12-18
- 帖子
- 1484
|
用这两个试试 我用过没有问题可以
这个是破限脚本- #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
- #_/ ◆ 限界突破 - KGC_LimitBreak ◆ VX ◆
- #_/ ◇ Last update : 2008/01/09 ◇
- #_/----------------------------------------------------------------------------
- #_/ ゲーム中の各種上限値を変更します。
- #_/============================================================================
- #_/ 再定義が多いので、「素材」の最上部に導入してください。
- #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
- #==============================================================================
- # ★ カスタマイズ項目 - Customize ★
- #==============================================================================
- module KGC
- module LimitBreak
- # ◆ 能力値算出方式
- # 0..データベース通り。
- # (100以降は計算式として PARAMETER_CALC_EXP を使用)
- #
- # 1..データベースを用いた2次関数。
- # a:レベル1の値 b:レベル2の値 c:レベル3の値 x:現レベル
- # として、
- # ax^2 + bx + c
- # を用いて能力値を算出。
- #
- # 2..データベースを用いた1次関数。
- # b:レベル2の値 c:レベル3の値 x:現レベル
- # として、
- # bx + c
- # を用いて能力値を算出。
- # (レベル 2 と 3 の値を使うのは、2次関数方式との使い分けを楽にするため)
- PARAMETER_CALC_METHOD = 0
- # ◆ レベル 100 以降の能力値計算式
- # PARAMETER_CALC_METHOD = 0 のときに使用します。
- # 【 level..現レベル param[x]..レベル x の能力値 】
- # この計算結果をレベル 99 の能力値に加算します。
- PARAMETER_CALC_EXP = "(param[99] - param[98]) * (level - 99)"
- # ◆ アクターのレベル上限
- ACTOR_FINAL_LEVEL = [] # ← これは消さないこと!
- # ここから下に、アクターごとの最終レベルを
- # ACTOR_FINAL_LEVEL[アクターID] = 最終レベル
- # という形式で設定します。
- # <例> ↓ アクター 1 の最終レベル 999
- ACTOR_FINAL_LEVEL[1] = 999
- # ◆ アクターのレベル上限 (デフォルト)
- # 上限を指定しなかった場合は、この値を最終レベルとして使用します。
- ACTOR_FINAL_LEVEL_DEFAULT = 999
- # ◆ アクターの経験値上限
- ACTOR_EXP_LIMIT = 99999999
- # ◆ アクターの MaxHP 上限
- ACTOR_MAXHP_LIMIT = 99999
- # ◆ アクターの MaxMP 上限
- ACTOR_MAXMP_LIMIT = 99999
- # ◆ アクターの攻撃力、防御力、精神力、敏捷性上限
- ACTOR_PARAMETER_LIMIT = 9999
- # ◆ エネミーの MaxHP 上限
- ENEMY_MAXHP_LIMIT = 9999999
- # ◆ エネミーの MaxMP 上限
- ENEMY_MAXMP_LIMIT = 9999999
- # ◆ エネミーの攻撃力、防御力、精神力、敏捷性上限
- ENEMY_PARAMETER_LIMIT = 9999
- # ◆ エネミーの能力値補正
- # エネミーの各種能力値をデータベースの ○% にします。
- # データベース通りにする場合は 100 にしてください。
- ENEMY_MAXHP_RATE = 100 # MaxHP
- ENEMY_MAXMP_RATE = 100 # MaxMP
- ENEMY_ATK_RATE = 100 # 攻撃力
- ENEMY_DEF_RATE = 100 # 防御力
- ENEMY_SPI_RATE = 100 # 精神力
- ENEMY_AGI_RATE = 100 # 敏捷性
- # ◆ 所持金上限
- GOLD_LIMIT = 99999999
- # ◆ アイテム所持数上限
- ITEM_NUMBER_LIMIT = 999
- module_function
- #--------------------------------------------------------------------------
- # ○ 敵能力値直接指定
- # ここで、敵の MaxHP などを直接指定することができます。
- # データベースに入りきらない数値を指定する場合に使用してください。
- #--------------------------------------------------------------------------
- def set_enemy_parameters
- # <例> ID:10 の敵の MaxHP を 2000000 にする場合
- #$data_enemies[10].maxhp = 2000000
- # <例> ID:16 の敵の攻撃力を 5000 にする場合
- # $data_enemies[16].atk = 5000
- # <例> ID:20 の敵の防御力を2倍にする場合
- # $data_enemies[20].def *= 2
- end
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- $imported = {} if $imported == nil
- $imported["LimitBreak"] = true
- module KGC::LimitBreak
- # 正規表現を定義
- module Regexp
- # ベースアイテム
- module BaseItem
- # 所持数上限
- NUMBER_LIMIT = /<(?:NUMBER_LIMIT|所持数上限)[ ]*(\d+)>/i
- end
- end
- module_function
- #--------------------------------------------------------------------------
- # ○ 敵の能力補正を適用
- #--------------------------------------------------------------------------
- def revise_enemy_parameters
- (1...$data_enemies.size).each { |i|
- enemy = $data_enemies[i]
- enemy.maxhp = enemy.maxhp * ENEMY_MAXHP_RATE / 100
- enemy.maxmp = enemy.maxmp * ENEMY_MAXMP_RATE / 100
- enemy.atk = enemy.atk * ENEMY_ATK_RATE / 100
- enemy.def = enemy.def * ENEMY_DEF_RATE / 100
- enemy.spi = enemy.spi * ENEMY_SPI_RATE / 100
- enemy.agi = enemy.agi * ENEMY_AGI_RATE / 100
- }
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ RPG::BaseItem
- #==============================================================================
- class RPG::BaseItem
- #--------------------------------------------------------------------------
- # ○ 限界突破のキャッシュ生成
- #--------------------------------------------------------------------------
- def create_limit_break_cache
- @__number_limit = KGC::LimitBreak::ITEM_NUMBER_LIMIT
- self.note.split(/[\r\n]+/).each { |line|
- if line =~ KGC::LimitBreak::Regexp::BaseItem::NUMBER_LIMIT
- # 所持数上限
- @__number_limit = $1.to_i
- end
- }
- end
- #--------------------------------------------------------------------------
- # ○ 所持数上限取得
- #--------------------------------------------------------------------------
- def number_limit
- create_limit_break_cache if @__number_limit == nil
- return @__number_limit
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler
- #--------------------------------------------------------------------------
- # ● MaxHP の制限値取得
- #--------------------------------------------------------------------------
- def maxhp_limit
- return KGC::LimitBreak::ENEMY_MAXHP_LIMIT
- end
- #--------------------------------------------------------------------------
- # ○ MaxMP の制限値取得
- #--------------------------------------------------------------------------
- def maxmp_limit
- return KGC::LimitBreak::ENEMY_MAXMP_LIMIT
- end
- #--------------------------------------------------------------------------
- # ● MaxMP の取得
- #--------------------------------------------------------------------------
- def maxmp
- return [[base_maxmp + @maxmp_plus, 0].max, maxmp_limit].min
- end
- #--------------------------------------------------------------------------
- # ○ 各種パラメータの制限値取得
- #--------------------------------------------------------------------------
- def parameter_limit
- return KGC::LimitBreak::ENEMY_PARAMETER_LIMIT
- end
- #--------------------------------------------------------------------------
- # ● 攻撃力の取得
- #--------------------------------------------------------------------------
- def atk
- n = [base_atk + @atk_plus, 1].max
- states.each { |state| n *= state.atk_rate / 100.0 }
- n = [[Integer(n), 1].max, parameter_limit].min
- return n
- end
- #--------------------------------------------------------------------------
- # ● 防御力の取得
- #--------------------------------------------------------------------------
- def def
- n = [base_def + @def_plus, 1].max
- states.each { |state| n *= state.def_rate / 100.0 }
- n = [[Integer(n), 1].max, parameter_limit].min
- return n
- end
- #--------------------------------------------------------------------------
- # ● 精神力の取得
- #--------------------------------------------------------------------------
- def spi
- n = [base_spi + @spi_plus, 1].max
- states.each { |state| n *= state.spi_rate / 100.0 }
- n = [[Integer(n), 1].max, parameter_limit].min
- return n
- end
- #--------------------------------------------------------------------------
- # ● 敏捷性の取得
- #--------------------------------------------------------------------------
- def agi
- n = [base_agi + @agi_plus, 1].max
- states.each { |state| n *= state.agi_rate / 100.0 }
- n = [[Integer(n), 1].max, parameter_limit].min
- return n
- end
- #--------------------------------------------------------------------------
- # ● MaxHP の設定
- # new_maxhp : 新しい MaxHP
- #--------------------------------------------------------------------------
- def maxhp=(new_maxhp)
- @maxhp_plus += new_maxhp - self.maxhp
- @maxhp_plus = [[@maxhp_plus, -maxhp_limit].max, maxhp_limit].min
- @hp = [@hp, self.maxhp].min
- end
- #--------------------------------------------------------------------------
- # ● MaxMP の設定
- # new_maxmp : 新しい MaxMP
- #--------------------------------------------------------------------------
- def maxmp=(new_maxmp)
- @maxmp_plus += new_maxmp - self.maxmp
- @maxmp_plus = [[@maxmp_plus, -maxmp_limit].max, maxmp_limit].min
- @mp = [@mp, self.maxmp].min
- end
- #--------------------------------------------------------------------------
- # ● 攻撃力の設定
- # new_atk : 新しい攻撃力
- #--------------------------------------------------------------------------
- def atk=(new_atk)
- @atk_plus += new_atk - self.atk
- @atk_plus = [[@atk_plus, -parameter_limit].max, parameter_limit].min
- end
- #--------------------------------------------------------------------------
- # ● 防御力の設定
- # new_def : 新しい防御力
- #--------------------------------------------------------------------------
- def def=(new_def)
- @def_plus += new_def - self.def
- @def_plus = [[@def_plus, -parameter_limit].max, parameter_limit].min
- end
- #--------------------------------------------------------------------------
- # ● 精神力の設定
- # new_spi : 新しい精神力
- #--------------------------------------------------------------------------
- def spi=(new_spi)
- @spi_plus += new_spi - self.spi
- @spi_plus = [[@spi_plus, -parameter_limit].max, parameter_limit].min
- end
- #--------------------------------------------------------------------------
- # ● 敏捷性の設定
- # agi : 新しい敏捷性
- #--------------------------------------------------------------------------
- def agi=(new_agi)
- @agi_plus += new_agi - self.agi
- @agi_plus = [[@agi_plus, -parameter_limit].max, parameter_limit].min
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Game_Actor
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 経験値計算
- #--------------------------------------------------------------------------
- def make_exp_list
- @exp_list = Array.new(final_level + 2)
- @exp_list[1] = @exp_list[final_level + 1] = 0
- m = actor.exp_basis
- n = 0.75 + actor.exp_inflation / 200.0
- (2..final_level).each { |i|
- @exp_list[i] = @exp_list[i-1] + Integer(m)
- m *= 1 + n
- n *= 0.9
- }
- end
- #--------------------------------------------------------------------------
- # ○ 最終レベルの取得
- #--------------------------------------------------------------------------
- def final_level
- n = KGC::LimitBreak::ACTOR_FINAL_LEVEL[self.id]
- return (n != nil ? n : KGC::LimitBreak::ACTOR_FINAL_LEVEL_DEFAULT)
- end
- #--------------------------------------------------------------------------
- # ● MaxHP の制限値取得
- #--------------------------------------------------------------------------
- def maxhp_limit
- return KGC::LimitBreak::ACTOR_MAXHP_LIMIT
- end
- #--------------------------------------------------------------------------
- # ○ MaxMP の制限値取得
- #--------------------------------------------------------------------------
- def maxmp_limit
- return KGC::LimitBreak::ACTOR_MAXMP_LIMIT
- end
- #--------------------------------------------------------------------------
- # ○ 各種パラメータの制限値取得
- #--------------------------------------------------------------------------
- def parameter_limit
- return KGC::LimitBreak::ACTOR_PARAMETER_LIMIT
- end
- #--------------------------------------------------------------------------
- # ○ 経験値の制限値取得
- #--------------------------------------------------------------------------
- def exp_limit
- return KGC::LimitBreak::ACTOR_EXP_LIMIT
- end
- #--------------------------------------------------------------------------
- # ● 経験値の変更
- # exp : 新しい経験値
- # show : レベルアップ表示フラグ
- #--------------------------------------------------------------------------
- def change_exp(exp, show)
- last_level = @level
- last_skills = skills
- @exp = [[exp, exp_limit].min, 0].max
- while @exp >= @exp_list[@level+1] && @exp_list[@level+1] > 0
- level_up
- end
- while @exp < @exp_list[@level]
- level_down
- end
- @hp = [@hp, maxhp].min
- @mp = [@mp, maxmp].min
- if show && @level > last_level
- display_level_up(skills - last_skills)
- end
- end
- #--------------------------------------------------------------------------
- # ● レベルの変更
- # level : 新しいレベル
- # show : レベルアップ表示フラグ
- #--------------------------------------------------------------------------
- def change_level(level, show)
- level = [[level, final_level].min, 1].max
- change_exp(@exp_list[level], show)
- end
- #--------------------------------------------------------------------------
- # ○ 基本パラメータの取得
- #--------------------------------------------------------------------------
- def base_parameter(type)
- case KGC::LimitBreak::PARAMETER_CALC_METHOD
- when 0 # 数式定義
- if @level >= 100
- calc_text = KGC::LimitBreak::PARAMETER_CALC_EXP.dup
- calc_text.gsub!(/level/i) { "@level" }
- calc_text.gsub!(/param\[(\d+)\]/i) {
- "actor.parameters[type, #{$1.to_i}]"
- }
- return actor.parameters[type, 99] + eval(calc_text)
- end
- when 1 # 二次関数
- a = actor.parameters[type, 1]
- b = actor.parameters[type, 2]
- c = actor.parameters[type, 3]
- return ((a * @level + b) * @level + c)
- when 2 # 一次関数
- b = actor.parameters[type, 2]
- c = actor.parameters[type, 3]
- return (b * @level + c)
- end
- return actor.parameters[type, @level]
- end
- #--------------------------------------------------------------------------
- # ● 基本 MaxHP の取得
- #--------------------------------------------------------------------------
- def base_maxhp
- return base_parameter(0)
- end
- #--------------------------------------------------------------------------
- # ● 基本 MaxMP の取得
- #--------------------------------------------------------------------------
- def base_maxmp
- return base_parameter(1)
- end
- #--------------------------------------------------------------------------
- # ● 基本攻撃力の取得
- #--------------------------------------------------------------------------
- def base_atk
- n = base_parameter(2)
- equips.compact.each { |item| n += item.atk }
- return n
- end
- #--------------------------------------------------------------------------
- # ● 基本防御力の取得
- #--------------------------------------------------------------------------
- def base_def
- n = base_parameter(3)
- equips.compact.each { |item| n += item.def }
- return n
- end
- #--------------------------------------------------------------------------
- # ● 基本精神力の取得
- #--------------------------------------------------------------------------
- def base_spi
- n = base_parameter(4)
- equips.compact.each { |item| n += item.spi }
- return n
- end
- #--------------------------------------------------------------------------
- # ● 基本敏捷性の取得
- #--------------------------------------------------------------------------
- def base_agi
- n = base_parameter(5)
- equips.compact.each { |item| n += item.agi }
- return n
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Game_Party
- #==============================================================================
- class Game_Party < Game_Unit
- #--------------------------------------------------------------------------
- # ○ 所持金の制限値取得
- #--------------------------------------------------------------------------
- def gold_limit
- return KGC::LimitBreak::GOLD_LIMIT
- end
- #--------------------------------------------------------------------------
- # ● ゴールドの増加 (減少)
- # n : 金額
- #--------------------------------------------------------------------------
- def gain_gold(n)
- @gold = [[@gold + n, 0].max, gold_limit].min
- end
- #--------------------------------------------------------------------------
- # ● アイテムの増加 (減少)
- # item : アイテム
- # n : 個数
- # include_equip : 装備品も含める
- #--------------------------------------------------------------------------
- def gain_item(item, n, include_equip = false)
- number = item_number(item)
- case item
- when RPG::Item
- @items[item.id] = [[number + n, 0].max, item.number_limit].min
- when RPG::Weapon
- @weapons[item.id] = [[number + n, 0].max, item.number_limit].min
- when RPG::Armor
- @armors[item.id] = [[number + n, 0].max, item.number_limit].min
- end
- n += number
- if include_equip && n < 0
- members.each { |actor|
- while n < 0 && actor.equips.include?(item)
- actor.discard_equip(item)
- n += 1
- end
- }
- end
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Window_ShopBuy
- #==============================================================================
- class Window_ShopBuy < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- #--------------------------------------------------------------------------
- def draw_item(index)
- item = @data[index]
- number = $game_party.item_number(item)
- enabled = (item.price <= $game_party.gold && number < item.number_limit)
- rect = item_rect(index)
- self.contents.clear_rect(rect)
- draw_item_name(item, rect.x, rect.y, enabled)
- rect.width -= 4
- self.contents.draw_text(rect, item.price, 2)
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Scene_Title
- #==============================================================================
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # ● データベースのロード
- #--------------------------------------------------------------------------
- alias load_database_KGC_LimitBreak load_database
- def load_database
- load_database_KGC_LimitBreak
- set_enemy_parameters
- end
- #--------------------------------------------------------------------------
- # ● 戦闘テスト用データベースのロード
- #--------------------------------------------------------------------------
- alias load_bt_database_KGC_LimitBreak load_bt_database
- def load_bt_database
- load_bt_database_KGC_LimitBreak
- set_enemy_parameters
- end
- #--------------------------------------------------------------------------
- # ○ エネミーの能力値を設定
- #--------------------------------------------------------------------------
- def set_enemy_parameters
- KGC::LimitBreak.revise_enemy_parameters
- KGC::LimitBreak.set_enemy_parameters
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Scene_File
- #==============================================================================
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # ● セーブデータの読み込み
- # file : 読み込み用ファイルオブジェクト (オープン済み)
- #--------------------------------------------------------------------------
- alias read_save_data_KGC_LimitBreak read_save_data
- def read_save_data(file)
- read_save_data_KGC_LimitBreak(file)
- (1...$data_actors.size).each { |i|
- actor = $game_actors[i]
- actor.make_exp_list
- # レベル上限チェック
- if actor.level > actor.final_level
- while actor.level > actor.final_level
- actor.level_down
- end
- # 減少した HP などを反映させるためのおまじない
- actor.change_level(actor.final_level, false)
- end
- }
- end
- end
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #==============================================================================
- # ■ Scene_Shop
- #==============================================================================
- class Scene_Shop < Scene_Base
- #--------------------------------------------------------------------------
- # ● 購入アイテム選択の更新
- #--------------------------------------------------------------------------
- def update_buy_selection
- @status_window.item = @buy_window.item
- if Input.trigger?(Input::B)
- Sound.play_cancel
- @command_window.active = true
- @dummy_window.visible = true
- @buy_window.active = false
- @buy_window.visible = false
- @status_window.visible = false
- @status_window.item = nil
- @help_window.set_text("")
- return
- end
- if Input.trigger?(Input::C)
- @item = @buy_window.item
- number = $game_party.item_number(@item)
- if @item == nil || @item.price > $game_party.gold ||
- number == @item.number_limit
- Sound.play_buzzer
- else
- Sound.play_decision
- max = (@item.price == 0 ?
- @item.number_limit : $game_party.gold / @item.price)
- max = [max, @item.number_limit - number].min
- @buy_window.active = false
- @buy_window.visible = false
- @number_window.set(@item, max, @item.price)
- @number_window.active = true
- @number_window.visible = true
- end
- end
- end
- end
复制代码 这个是升级提示- =======================================================================
- #★升级提示★
- #-----------------------------------------------------------------------
- #★作者: Zhong_zw
- #★联系方式:66RPG.com论坛短信 或 [email protected]
- #★更新内容★:
- #1、把装备武器后的能力算上了。
- #2、能力增量显示
- #☆未解决:
- #刷新写的不合理,掉帧厉害(苦力活~~~最近没空,所以这个历史遗留问题还有待以后解决。)
- #=======================================================================
- class Game_Actor < Game_Battler
- attr_accessor :last_level
- def initialize(actor_id)
- super()
- setup(actor_id)
- @last_level = 0
- @last_skill_id = 0
- end
-
- def last_atk
- n=0
- for item in equips.compact do n += item.atk end
- return actor.parameters[2,@last_level] + n
- end
-
- def last_def
- n=0
- for item in equips.compact do n += item.def end
- return actor.parameters[3,@last_level] + n
- end
-
- def last_spi
- n=0
- for item in equips.compact do n += item.spi end
- return actor.parameters[4,@last_level] + n
- end
-
- def last_agi
- n=0
- for item in equips.compact do n += item.agi end
- return actor.parameters[5,@last_level] + n
- end
- def now_atk
- n=0
- for item in equips.compact do n += item.atk end
- return actor.parameters[2,@level] + n
- end
- def now_def
- n=0
- for item in equips.compact do n += item.def end
- return actor.parameters[3,@level] + n
- end
- def now_spi
- n=0
- for item in equips.compact do n += item.spi end
- return actor.parameters[4,@level] + n
- end
- def now_agi
- n=0
- for item in equips.compact do n += item.agi end
- return actor.parameters[5,@level] + n
- end
- def change_exp(exp, show)
- @last_level = @level
- last_skills = skills
-
- @exp = [[exp, 9999999].min, 0].max
- while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
- level_up
- end
- while @exp < @exp_list[@level]
- level_down
- end
- @hp = [@hp, maxhp].min
- @mp = [@mp, maxmp].min
- if show and @level > last_level
-
- zhonglevelup_push(skills - last_skills)
- end
- end
- #==========================================================================
- #★角色升级显示
- #==========================================================================
-
- def zhonglevelup_push(new_skills)
-
- text = [@actor_id,new_skills]
- $game_temp.levelup_texts.push(text)
- end
- end
- class Scene_Battle < Scene_Base
- def display_level_up
- exp = $game_troop.exp_total
- $game_party.remove_states_battle
- @message_window.contents_opacity = 0
- @message_window.opacity = 0
- @levelup_window = Window_zhonglevelup.new
- for actor in $game_party.existing_members
- last_level = actor.level
- last_skills = actor.skills
- actor.gain_exp(exp, true)
- end
-
- update_zhonglevelup
-
-
- end
- #==========================================================================
- #★等待升级窗口刷新
- #==========================================================================
- def update_zhonglevelup
- @levelup_window.update
- while @levelup_window.visible
- @levelup_window.update
- Graphics.update
- Input.update
- end
- end
-
- end
-
- class Game_Temp
- attr_accessor :levelup_texts
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias oldinitialize initialize
- def initialize
- @levelup_texts = []
- oldinitialize
- end
-
- end
- class Window_zhonglevelup < Window_Base
-
- attr_accessor :index
- def initialize
- super(122, 15, 350, 345)
- $game_temp.levelup_texts = []
- @index = 0
- @skill_index = 0
- @skill_window = Window_Base.new(122,23,260,36)
- @skill_window.opacity = 0
- @skill_window.z = self.z - 1
- @main_window = Window_Base.new(122,59,260,290)
- @main_window.opacity = 0
- @main_window.z = self.z - 1
-
- self.opacity = 0
- self.visible = false
-
- #update
-
- end
-
-
- #--------------------------------------------------------------------------
- # ★ $game_temp.levelup_texts = [角色id,新特技]
- #--------------------------------------------------------------------------
- def update
-
-
- zhonginputupdate if @index <= $game_temp.levelup_texts.size-1
-
- if @index <= $game_temp.levelup_texts.size-1
-
- self.visible = true
- @main_window.opacity = 150
- actor = $game_actors[$game_temp.levelup_texts[@index][0]]
- if @skill_index == 0 and $game_temp.levelup_texts[@index][1].size != 0
- @skill_index = $game_temp.levelup_texts[@index][1].size
- end
- level = actor.level
- last_level = actor.last_level
- atk = actor.now_atk
- now_def = actor.now_def
- spi = actor.now_spi
- agi = actor.now_agi
- last_atk = actor.last_atk
- last_def = actor.last_def
- last_spi = actor.last_spi
- last_agi = actor.last_agi
-
-
- self.contents.clear
-
- # x = 122
- # y = 58
- @skill_window.opacity = $game_temp.levelup_texts[@index][1].size != 0 ? 150 : 0
- skill_name = $game_temp.levelup_texts[@index][1][@skill_index - 1].name if @skill_index != 0
- level_name = Vocab::level
- atk_name = Vocab::atk
- def_name = Vocab::def
- spi_name = Vocab::spi
- agi_name = Vocab::agi
- font = self.contents.font.size
- x = 5
- y = 165
- self.contents.draw_text(x,y,60,60,atk_name)
- self.contents.draw_text(x,y+30,60,60,def_name)
- self.contents.draw_text(x,y+60,60,60,spi_name)
- self.contents.draw_text(x,y+90,60,60,agi_name)
- self.contents.draw_text(x + 45,y,60,60, last_atk)
- self.contents.draw_text(x + 45,y+30,60,60,last_def)
- self.contents.draw_text(x + 45,y+60,60,60,last_spi)
- self.contents.draw_text(x + 45,y + 90,60,60,last_agi)
- self.contents.draw_text(x,y-30,60,60,level_name)
- self.contents.draw_text(x + 45,y-30,60,60,last_level)
- self.contents.font.color = Color.new(0,255,255)
- self.contents.font.size = 16
- self.contents.draw_text(x + 77,y-30,60,60,"+ #{level - last_level}")
- self.contents.font.size = font
- self.contents.font.color = Color.new(0,255,0,255)
- self.contents.draw_text(x + 140,y-30,60,60,level)
-
- bitmap_1 = Bitmap.new("Graphics/system/箭头")
- rect_1 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
- self.contents.blt(x + 105,y - 18,bitmap_1,rect_1)
- if atk > last_atk
- self.contents.font.color = Color.new(0,255,255)
- self.contents.font.size = 16
- self.contents.draw_text(x + 77,y,60,60,"+ #{atk - last_atk}")
- self.contents.font.size = font
- self.contents.font.color = Color.new(0,255,0,255)
- self.contents.draw_text(x+140,y,60,60,atk)
- atk_opacity = 255
- else
- atk_opacity = 0
- end
-
-
- self.contents.blt(x+105,y+12,bitmap_1,rect_1,atk_opacity)
-
-
- if now_def > last_def
- self.contents.font.color = Color.new(0,255,255)
- self.contents.font.size = 16
- self.contents.draw_text(x + 77,y+30,60,60,"+ #{now_def - last_def}")
- self.contents.font.size = font
- self.contents.font.color = Color.new(0,255,0,255)
- self.contents.draw_text(x+140,y+30,60,60,now_def)
- def_opacity = 255
- else
- def_opacity = 0
- end
-
- self.contents.blt(x+105,y+42,bitmap_1,rect_1,def_opacity)
-
- if spi > last_spi
- self.contents.font.color = Color.new(0,255,255)
- self.contents.font.size = 16
- self.contents.draw_text(x + 77,y+60,60,60,"+ #{spi - last_spi}")
- self.contents.font.size = font
- self.contents.font.color = Color.new(0,255,0,255)
- self.contents.draw_text(x+140,y+60,60,60,spi)
- spi_opacity = 255
- else
- spi_opacity = 0
- end
-
-
- self.contents.blt(x+105,y+72,bitmap_1,rect_1,spi_opacity)
-
- if agi > last_agi
- self.contents.font.color = Color.new(0,255,255)
- self.contents.font.size = 16
- self.contents.draw_text(x + 77,y+90,60,60,"+ #{agi - last_agi}")
- self.contents.font.size = font
- self.contents.font.color = Color.new(0,255,0,255)
- self.contents.draw_text(x + 140,y + 90,60,60,agi)
- agi_opacity = 255
- else
- agi_opacity = 0
- end
-
- self.contents.blt(x+105,y+102,bitmap_1,rect_1,agi_opacity)
-
-
-
-
- self.contents.font.color = normal_color
- self.contents.font.size = 16
- self.contents.draw_text(60, -19, 120, 60,"学会了 #{skill_name}")if @skill_index != 0
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(61, -19,120,60," #{skill_name}")
- self.contents.font.size = font
- draw_face(actor.face_name, actor.face_index,3, 55, size = 80)
- draw_actor_name(actor, 92, 55)
- draw_actor_hp(actor, 95, 85)
- draw_actor_mp(actor, 95, 115)
-
- self.contents.font.color = normal_color
- actor.hp = [actor.maxhp,9999].min
- actor.mp = [actor.maxmp,9999].min
-
-
-
- else
- @main_window.visible = false
- @skill_window.visible =false
- self.visible = false
-
- end
-
-
-
- end
- #==========================================================================
- #★窗口按键刷新
- #==========================================================================
- def zhonginputupdate
- if Input.trigger?(Input::DOWN)
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
- end
- if Input.trigger?(Input::UP)
-
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
- end
- if Input.trigger?(Input::RIGHT)
-
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
-
- end
- if Input.trigger?(Input::LEFT)
-
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
-
- end
- if Input.trigger?(Input::B)
-
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
-
- end
- if Input.trigger?(Input::C)
- if @skill_index != 0
- @skill_index -= 1
- end
- @index += 1 if @skill_index == 0
-
- end
- end
-
- #==========================================================================
-
- def dispose
- super
- @skill_window.dispose
- @main_window.dispose
- end
-
-
- end
- class Scene_Map < Scene_Base
-
- def start
- super
- $game_map.refresh
- @spriteset = Spriteset_Map.new
- @message_window = Window_Message.new
- @levelup_window = Window_zhonglevelup.new
- @lus_window = Window_Base.new(122,23,260,36)
- @m_window = Window_Base.new(122,59,260,290)
- @m_window.opacity = 0
- @lus_window.opacity = 0
- @m_window.z = 9998
- @lus_window.z = 9998
- @levelup_window.z = 9999
- end
-
- def update
- super
- $game_map.interpreter.update
- $game_map.update
- $game_player.update
- $game_system.update
- @spriteset.update
- @message_window.update
-
- unless $game_message.visible
- update_levelup_window
- update_transfer_player
- update_encounter
- update_call_menu
- update_call_debug
- update_scene_change
- end
- end
-
- def update_levelup_window
- @levelup_window.update
- while @levelup_window.visible
-
- @lus_window.opacity = $game_temp.levelup_texts[@levelup_window.index][1].size != 0 ? 150 : 0
- @m_window.opacity = 150
- @levelup_window.update
- Graphics.update
- Input.update
- end
- @m_window.opacity = 0
- @lus_window.opacity = 0
-
- end
- def terminate
- super
- if $scene.is_a?(Scene_Battle) # バトル画面に切り替え中の場合
- @spriteset.dispose_characters # 背景作成のためにキャラを隠す
- end
- snapshot_for_background
- @spriteset.dispose
- @message_window.dispose
- @levelup_window.dispose
- @m_window.dispose
- @lus_window.dispose
- if $scene.is_a?(Scene_Battle) # バトル画面に切り替え中の場合
- perform_battle_transition # 戦闘前トランジション実行
- end
- end
- end
复制代码 |
|