#============================================================================== # ■ XP-RGSS-3-ex ステート表示拡張[アクター用] [Ver.1.0.1] by Claimh #------------------------------------------------------------------------------ # ・アクター用のステート表示拡張をさせるための追加処理。 # ・ACTOR_STATE = true のとき MENU_ST_ICON = true のときは必須です。 #============================================================================== #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ● ステートの描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 # width : 描画先の幅 #-------------------------------------------------------------------------- alias draw_state_normal draw_actor_state def draw_actor_state(actor, x, y, width = 120) # 戦闘中? if $scene.is_a?(Scene_Battle) if State_Extension::ACTOR_STATE # ステート有り? unless actor.states.empty? # 表示しない return end end else if State_Extension::MENU_ST_ICON # ステート有り? unless actor.states.empty? # ステートをアイコン表示 draw_state_icon(actor, x, y, width) return end end end # 通常表示 draw_state_normal(actor, x, y, width) end #-------------------------------------------------------------------------- # ● ステート用アイコン表示 # state : ステート用アイコンファイル群 #-------------------------------------------------------------------------- def draw_state_icon(actor, x, y, width = 120) # アイコンファイル群を取得 icon_state = State_Extension.make_state_icon(actor.states, width) # 描画開始位置の決定 x_plus = 0 for i in 0...icon_state.size bitmap = RPG::Cache.icon(icon_state[i]) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + x_plus, y + ch / 4, bitmap, src_rect) # 描画位置を進める x_plus += cw + State_Extension::ICON_INTERVAL end end end #============================================================================== # ■ Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Base #-------------------------------------------------------------------------- # ● レベルアップフラグの設定 # actor_index : アクターインデックス #-------------------------------------------------------------------------- def level_up?(actor_index) return @level_up_flags[actor_index] end end #============================================================================== # ■ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● アフターバトルフェーズ開始 #-------------------------------------------------------------------------- alias start_phase5_state_ex start_phase5 def start_phase5 start_phase5_state_ex # レベルアップ表示時にステートを消す for i in 0...$game_party.actors.size if @status_window.level_up?(i) @spriteset.delete_state(i) end end end end #============================================================================== # ■ Spriteset_Battle #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # ● ステートスプライトを消す #-------------------------------------------------------------------------- def delete_state(index) @actor_sprites[index].del_state end end #============================================================================== # ■ Sprite_Battler #============================================================================== class Sprite_Battler < RPG::Sprite #-------------------------------------------------------------------------- # ● ステートスプライトを消す #-------------------------------------------------------------------------- def del_state @state_sprite.visible = false end end