# ▽△▽ XRXSv9. BaST-VX.BM2. インフォメッセージ ▽△▽ # # publish 2010/ 4/20 # update - # #============================================================================== # カスタマイズポイント #============================================================================== module XRXSV9 # # 背景に使う画像(Graphics/System) # BMBack = "InfoFrame" # # 以下の文字を含む場合、その文の無効化 # (スキル・ステートメッセージはこれで無効化します) # BMCurWords = [ "唱えた", "放った", "攻撃!", "吐いた", "起こした", "歌った", "にらみつけた", "仕掛けた", "した!", "上げた", "始めた" ] # # スキルとアイテムの 名前のみ表示機能を使う? # (↑によって無効化されたスキル等のみ有効になります) # BMSkillItemNamePop = true end #============================================================================== # ■ 用語の無効化 -「インフォメッセージ」では""を指定した部分は表示しません #============================================================================== module Vocab # 戦闘基本メッセージ Emerge = "" # 戦闘行動 DoAttack = "" DoGuard = "" DoEscape = "逃げだした" # クリティカルヒット CriticalToEnemy = "" CriticalToActor = "" # アクター対象の行動結果 ActorDamage = "" ActorLoss = "" ActorDrain = "" ActorNoDamage = "" ActorNoHit = "" ActorEvasion = "" ActorRecovery = "" # 敵キャラ対象の行動結果 EnemyDamage = "" EnemyLoss = "" EnemyDrain = "" EnemyNoDamage = "" EnemyNoHit = "" EnemyEvasion = "" EnemyRecovery = "" # 物理攻撃以外のスキル、アイテムの効果がなかった ActionFailure = "" end #============================================================================== # ■ バトルメッセージ #============================================================================== class Window_BattleMessage < Window_Message #-------------------------------------------------------------------------- # ● オブジェクト初期化 * #-------------------------------------------------------------------------- def initialize super self.openness = 255 self.opacity = 0 self.y = 0 self.contents.font.size = 18 @lines = [] @draw_duration = 0 refresh end #-------------------------------------------------------------------------- # ▽ メッセージの開始 #-------------------------------------------------------------------------- def start_message super self.opacity = (@text.empty? ? 0 : 255) end #-------------------------------------------------------------------------- # ● クリア #-------------------------------------------------------------------------- alias xrxsv9bm1_clear clear def clear xrxsv9bm1_clear self.opacity = 0 end #-------------------------------------------------------------------------- # スキルとアイテムのセット #-------------------------------------------------------------------------- if XRXSV9::BMSkillItemNamePop def set(object) case object when RPG::Item, RPG::Skill add_instant_text(object.name) end end end #-------------------------------------------------------------------------- # ● 文章の追加 * #-------------------------------------------------------------------------- def add_instant_text(text) return if text.empty? for word in XRXSV9::BMCurWords return if text.include?(word) end @lines[0] = text draw_line(0) end #-------------------------------------------------------------------------- # ● 文章の置き換え * #-------------------------------------------------------------------------- def replace_instant_text(text) return if text.empty? for word in XRXSV9::BMCurWords return if text.include?(word) end @lines[0] = text draw_line(0) end #-------------------------------------------------------------------------- # ● 行の描画 * #-------------------------------------------------------------------------- def draw_line(index) return if index >= 1 self.opacity = 0 rect = Rect.new(0, 0, contents.width, 38) self.contents.clear_rect(rect) draw_lineback self.contents.draw_text(rect, @lines[index], 1) end def draw_lineback bitmap = Cache.system(XRXSV9::BMBack) x = (self.contents.width - bitmap.width) / 2 self.contents.blt(x, 0, bitmap, bitmap.rect) end end