#▽△▽ XRXSv9. BaST-VX.CP4. 予約スキルリスト ▽△▽ # # publish 2011/ 1/12 # update - # # # ※ミニフェイス機能が必要です。MeLT本体に含まれています。 # #============================================================================== # カスタマイズポイント #============================================================================== module XRXSV9 # # ファイル名 # BattleCPSkin_R = "BattleCPLineR" # # 用語 # CPEnemy_S = "ENEMY" CPEnemyIndex = ["A","B","C","D","E","F","G","H"] CPBoss_S = "BOSS" # # 先頭エネミーをボス表記するトループID配列 # CPBossBattleTroopID = [28,29,30] end #============================================================================== # ボスバトル?の取得 #============================================================================== class Game_Troop < Game_Unit def boss? return XRXSV9::CPBossBattleTroopID.include?(@troop_id) end end #============================================================================== # CP機能 - 表示セット #============================================================================== class Spriteset_CP def initialize(members, info_viewport = nil) @window = Window_SkillPlan.new @members = members end def refresh(reserve_actions = nil) @window.set_refresh(reserve_actions) end def update @window.update end def visible=(b) @window.visible = b end def opacity return @window.opacity end def opacity=(n) @window.opacity = n end def dispose @window.dispose end end #============================================================================== # 内部スプライト #============================================================================== class Window_SkillPlan < Window_Base def initialize super(368, 40, 192, 236) self.opacity = 0 end def set_refresh(reserve_actions = nil) return unless reserve_actions self.contents.clear bitmap = (Cache.system(XRXSV9::BattleCPSkin_R) rescue nil) if bitmap self.contents.blt(0, 0, bitmap, bitmap.rect) end self.contents.font.size = 16 y1 = 12 for action in reserve_actions bitmap = make_miniface_bitmap(action.battler) self.contents.blt(0, y1, bitmap, bitmap.rect) if action.skill draw_item_name(action.skill, 48, y1) elsif action.item draw_item_name(action.item, 48, y1) else text = (action.attack? ? Vocab::attack : (action.guard? ? Vocab::guard : "---")) self.contents.draw_text(72, y1, 80, WLH, text) end y1 += WLH end end #-------------------------------------------------------------------------- # アイテム名の描画 - サイズ変更 #-------------------------------------------------------------------------- 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 text_rect = self.contents.text_size(item.name) w = [text_rect.width * 3 / 4, 80].min self.contents.draw_text(x + 24, y, w, WLH, item.name) end end #-------------------------------------------------------------------------- # ○ ミニフェイスビットマップの作成 #-------------------------------------------------------------------------- def make_miniface_bitmap(battler) if battler.is_a?(Game_Actor) bitmap = battler.miniface rescue Bitmap.new(48,24) else bitmap = Bitmap.new(48, 24) index = battler.index index -= 1 if $game_troop.boss? enemy_s = (index == -1 ? XRXSV9::CPBoss_S : XRXSV9::CPEnemy_S) index_s = (index == -1 ? nil : XRXSV9::CPEnemyIndex[battler.index]) n = (index == -1 ? 18 : 10) face = Bitmap.new(48, 24) face.fill_rect(face.rect, Color.new(0, 0, 0, 160)) face.font.color = Color.new(255, 128, 128, 255) face.font.size = n face.draw_text(9, 22 - n, 25, n, enemy_s) if index_s face.font.color = Color.new(255, 255, 255, 255) face.font.size = 20 face.draw_text(36, 2,10,20, index_s) end bitmap.stretch_blt(bitmap.rect, face, face.rect) end return bitmap end end