#============================================================================== # ■ 簡易勝利メッセージ #------------------------------------------------------------------------------ # 一言メッセージを戦闘勝利時に画面上部に表示できます # # *月の下の宿 # URL:http://gekkasou.shiteyattari.com/ #============================================================================== module An Vic_Message = { #通常設定 #アクターID => ["メッセージ候補1","メッセージ候補2",...以下略], 1 => ["「これがいわゆる主人公補正ってやつさ」"], 2 => ["「話にならないな」", "「またいつでもかかって来い」"], } #↓消さないでください Vic_EMes = {} #強制メッセージ #変数が特定の値の時、設定したメッセージを優先します #強制メッセージの判別に使う変数 Vic_EVar = 10 #Vic_E_Mes[変数の値] = [アクター番号,"メッセージ"] Vic_EMes[1] = [1, "「10番の変数が1になってるな」"] end class Scene_Battle #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- alias an_vic_mes_terminate terminate def terminate @an_message_window.dispose if @an_message_window != nil an_vic_mes_terminate end #-------------------------------------------------------------------------- # ● 勝利の処理 #-------------------------------------------------------------------------- alias an_vic_mes_process_victory process_victory def process_victory an_mes_array = [] if An::Vic_EMes.has_key?($game_variables[An::Vic_EVar]) an_data1 = $game_actors[An::Vic_EMes[$game_variables[An::Vic_EVar]][0]] an_data2 = An::Vic_EMes[$game_variables[An::Vic_EVar]][1] an_message = true else for actor in $game_party.existing_members if !An::Vic_Message[actor.id].nil? an_mes_array << actor.id an_message = true end end an_rand = an_mes_array[rand(an_mes_array.size)] an_data1 = $game_actors[an_rand] an_data2 = An::Vic_Message[an_rand][rand(An::Vic_Message[an_rand].size)] end if an_message @an_message_window = Window_Base.new(0, 0, 544, 80) @an_message_window.contents.draw_text(0, 0, 544, 24, an_data1.name) @an_message_window.contents.draw_text(0, 24, 544, 24, an_data2) end an_vic_mes_process_victory end end #Ver1.01