#============================================================================== # ■ VX-RGSS2-21 精霊システム [status] by Claimh #------------------------------------------------------------------------------ # ★精霊ステータス画面 # $scene = Scene_SpiritStatus.new(spirit_index, menu_index) # spirit_index : 精霊Index(省略時は0) # menu_index : メニューIndex(省略時は-1 = Mapに戻る) #============================================================================== #============================================================================== # ■ Window_Status #============================================================================== class Window_Status < Window_Base #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- alias refresh_spirit refresh def refresh refresh_spirit draw_partner_name(@actor, 288, 0) end end #============================================================================== # ■ Window_SpiritStatus #============================================================================== class Window_SpiritStatus < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(spirit) super(0, 0, 544, 416) @spirit = spirit refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 0, 108, WLH, @spirit.name) draw_actor_level(@spirit, 200, 0) draw_actor_face(@spirit, 340, 0) # self.contents.font.color = system_color self.contents.draw_text(24, WLH*1, 80, WLH, "EXP") self.contents.draw_text(24, WLH*2, 80, WLH, "NEXT") self.contents.draw_text(24, WLH*4, 120, WLH, "能力付与") self.contents.draw_text(180, WLH*4, 120, WLH, "スキル") # self.contents.font.color = normal_color self.contents.draw_text(24 + 80, WLH*1, 84, WLH, @spirit.exp_s, 2) self.contents.draw_text(24 + 80, WLH*2, 84, WLH, @spirit.next_rest_exp_s, 2) draw_partner_name2(@spirit, 24, WLH*3) for i in 0..5 draw_actor_parameter(@spirit, 24+20, WLH*(i+5), i) end =begin # とりあえず、オプション能力表示はしない n = 11 txt = [] txt.push("クリティカル頻発") if @spirit.critical_bonus txt.push("強力防御") if @spirit.super_guard txt.push("薬の知識") if @spirit.pharmacology txt.push("ターン内先制") if @spirit.fast_attack txt.push("連続攻撃") if @spirit.dual_attack txt.push("クリティカル防止") if @spirit.prevent_critical txt.push("消費 MP 半分") if @spirit.half_mp_cost txt.push("取得経験値 2 倍") if @spirit.double_exp_gain txt.push("HP 自動回復") if @spirit.auto_hp_recover for i in 0...txt.size self.contents.draw_text(24+20, WLH*(i+11), 200, WLH, txt[i]) end =end skills = @spirit.skills clumn = 2 # 列数 for i in 0...skills.size x = 180+20 + (i % clumn) * 150 y = WLH*(i/clumn+5) draw_item_name(skills[i], x, y) end end #-------------------------------------------------------------------------- # ● パラメータの描画 #-------------------------------------------------------------------------- def draw_actor_parameter(spirit, x, y, type) case type when 0 parameter_name = "最大"+$data_system.terms.hp parameter_value = spirit.maxhp when 1 parameter_name = "最大"+$data_system.terms.mp parameter_value = spirit.maxmp when 2 parameter_name = $data_system.terms.atk parameter_value = spirit.atk when 3 parameter_name = $data_system.terms.def parameter_value = spirit.def when 4 parameter_name = $data_system.terms.spi parameter_value = spirit.spi when 5 parameter_name = $data_system.terms.agi parameter_value = spirit.agi end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, WLH, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 80, y, 36, WLH, parameter_value.to_s, 2) end end #============================================================================== # ■ Scene_SpiritStatus #============================================================================== class Scene_SpiritStatus < Scene_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(spirit_index=0, menu_index=-1) @spirit_index = spirit_index @menu_index = menu_index end #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background id = $game_party.spirits[@spirit_index] @status_window = Window_SpiritStatus.new($game_party.spirit[id]) end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- def terminate super dispose_menu_background @status_window.dispose end #---------------------------------------------------------------------------- # ● シーン終了 #---------------------------------------------------------------------------- def exit_scene $scene = @menu_index < 0 ? Scene_Map.new : Scene_Menu.new(@menu_index) end #---------------------------------------------------------------------------- # ● フレーム更新 #---------------------------------------------------------------------------- def update if Input.trigger?(Input::B) Sound.play_cancel exit_scene elsif Input.trigger?(Input::R) Sound.play_cursor @spirit_index = (@spirit_index + 1) % $game_party.spirits.size $scene = Scene_SpiritStatus.new(@spirit_index, @menu_index) elsif Input.trigger?(Input::L) Sound.play_cursor @spirit_index = (@spirit_index + $game_party.spirits.size - 1) % $game_party.spirits.size $scene = Scene_SpiritStatus.new(@spirit_index, @menu_index) end end end