# # 連撃コンプリート(Ver2.00) #  (C)2005,2007 TYPE74RX-T # #============================================================================== # ★ メモ:再定義メソッド(エイリアスしていない部分) #------------------------------------------------------------------------------ # Game_Battler # def dead? …52行目 # def exist? …58行目 # def hp0? …64行目 #============================================================================== #============================================================================== # ■ Game_Battler #------------------------------------------------------------------------------ #  バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ # スのスーパークラスとして使用されます。 #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias rx_rgssb4_initialize initialize def initialize # 戦闘不能回避フラグ @rx_dead_rsv = false # メソッドを呼び戻す rx_rgssb4_initialize end #-------------------------------------------------------------------------- # ★ 戦闘不能回避フラグをON #-------------------------------------------------------------------------- def rx_dead_rsv_true @rx_dead_rsv = true end #-------------------------------------------------------------------------- # ★ 戦闘不能回避フラグをOFF #-------------------------------------------------------------------------- def rx_dead_rsv_false @rx_dead_rsv = false end #-------------------------------------------------------------------------- # ★ 戦闘不能回避フラグがあるかチェック #-------------------------------------------------------------------------- def rx_dead_rsv_check return @rx_dead_rsv end #-------------------------------------------------------------------------- # ● 戦闘不能判定 #-------------------------------------------------------------------------- def dead? return (@hp == 0 and not @immortal and not @rx_dead_rsv) end #-------------------------------------------------------------------------- # ● 存在判定 #-------------------------------------------------------------------------- def exist? return (not @hidden and (@hp > 0 or @immortal or @rx_dead_rsv)) end #-------------------------------------------------------------------------- # ● HP 0 判定 #-------------------------------------------------------------------------- def hp0? return (not @hidden and @hp == 0 and not @rx_dead_rsv) end end #============================================================================== # ■ Game_Party #------------------------------------------------------------------------------ #  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク # ラスのインスタンスは $game_party で参照されます。 #============================================================================== class Game_Party #-------------------------------------------------------------------------- # ● 全滅判定 #-------------------------------------------------------------------------- alias rx_rgssb4_all_dead? all_dead? def all_dead? # HP 0 以下で、かつ、戦闘不能保留状態のアクターがパーティにいる場合 for actor in @actors if actor.hp < 1 and actor.rx_dead_rsv_check return false end end # メソッドを呼び戻す rx_rgssb4_all_dead? end end #============================================================================== # ■ Scene_Battle #------------------------------------------------------------------------------ #  バトル画面の処理を行うクラスです。 #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ★ 生存バトラーに戦闘不能回避フラグを立てる #-------------------------------------------------------------------------- def rx_put_dead_rsv(target) # ターゲットが戦闘不能でなければ unless target.dead? # 戦闘不能回避フラグを立てる target.rx_dead_rsv_true end end #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備) #-------------------------------------------------------------------------- alias rx_rgssb4_update_phase4_step1 update_phase4_step1 def update_phase4_step1 # メソッドを呼び戻す rx_rgssb4_update_phase4_step1 # 連撃コンプフラグの初期化 @rx_r_comp = false end #-------------------------------------------------------------------------- # ★ 基本アクション時の特殊効果前処理 #-------------------------------------------------------------------------- alias rx_rgssb4_rx_weapon_special_effect rx_weapon_special_effect def rx_weapon_special_effect(weapon_id) # メソッドを呼び戻す rx_rgssb4_rx_weapon_special_effect(weapon_id) # 一時的に装備武器データを読み込む weapon = $data_weapons[weapon_id] # 連撃コンプ属性なら if @rxbx_weapon_equip and active_battler.current_action.basic == 0 and RX_T.check_element(weapon.element_set, "連撃コンプ") # 連撃コンプフラグをONに @rx_r_comp = true # 味方を攻撃する場合 if @active_battler.restriction == 3 # アクター全体に戦闘不能回避フラグを立てる for actor in $game_party.actors rx_put_dead_rsv(actor) end else # エネミー全体に戦闘不能回避フラグを立てる for enemy in $game_troop.enemies rx_put_dead_rsv(enemy) end end end end #-------------------------------------------------------------------------- # ★ スキル使用時の特殊効果前処理 #-------------------------------------------------------------------------- alias rx_rgssb4_rx_skill_special_effect rx_skill_special_effect def rx_skill_special_effect(skill_id) # メソッドを呼び戻す rx_rgssb4_rx_skill_special_effect(skill_id) # 一時的にスキルデータを読み込む skill = $data_skills[skill_id] # 連撃コンプ属性なら if RX_T.check_element(skill.element_set, "連撃コンプ") if @active_battler.is_a?(Game_Actor) # 味方を攻撃する場合 if @active_battler.restriction == 3 # アクター全体に戦闘不能回避フラグを立てる for actor in $game_party.actors rx_put_dead_rsv(actor) end else # エネミー全体に戦闘不能回避フラグを立てる for enemy in $game_troop.enemies rx_put_dead_rsv(enemy) end end else # 味方を攻撃する場合 if @active_battler.restriction == 3 # エネミー全体に戦闘不能回避フラグを立てる for enemy in $game_troop.enemies rx_put_dead_rsv(enemy) end else # アクター全体に戦闘不能回避フラグを立てる for actor in $game_party.actors rx_put_dead_rsv(actor) end end end end end #-------------------------------------------------------------------------- # ★ アイテム使用時の特殊効果前処理 #-------------------------------------------------------------------------- alias rx_rgssb4_rx_item_special_effect rx_item_special_effect def rx_item_special_effect(item) # メソッドを呼び戻す rx_rgssb4_rx_item_special_effect(item) # 連撃コンプ属性なら if RX_T.check_element(item.element_set, "連撃コンプ") if @active_battler.is_a?(Game_Actor) # エネミー全体に戦闘不能回避フラグを立てる for enemy in $game_troop.enemies rx_put_dead_rsv(enemy) end else # アクター全体に戦闘不能回避フラグを立てる for actor in $game_party.actors rx_put_dead_rsv(actor) end end end end #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示) #-------------------------------------------------------------------------- alias rx_rgssb4_update_phase4_step5 update_phase4_step5 def update_phase4_step5 # メソッドを呼び戻す rx_rgssb4_update_phase4_step5 # メインフェーズのステップが2に指定されていない場合 # (=連撃中でないか連撃が終了していれば) unless @phase4_step == 2 # 行動側バトラーがアクターの場合 if @active_battler.is_a?(Game_Actor) # 味方を攻撃した場合 if @active_battler.restriction == 3 # アクター側の連撃コンプフラグをOFFに for target in $game_party.actors target.rx_dead_rsv_false end else # エネミー側の連撃コンプフラグをOFFに for target in $game_troop.enemies target.rx_dead_rsv_false end end # ステータスウィンドウをリフレッシュ @status_window.refresh end # 行動側バトラーがエネミーの場合 if @active_battler.is_a?(Game_Enemy) # 味方を攻撃した場合 if @active_battler.restriction == 3 # エネミー側の連撃コンプフラグをOFFに for target in $game_troop.enemies target.rx_dead_rsv_false end else # アクター側の連撃コンプフラグをOFFに for target in $game_party.actors target.rx_dead_rsv_false end end # ステータスウィンドウをリフレッシュ @status_window.refresh end end end end