# ▽△▽ XRXSv9. BaST-VX.EG2. CTBエンジン ▽△▽ # # publish 2010/ 4/19 # update - 11/ 1/12a # #============================================================================== # カスタマイズポイント - BaST本体 #============================================================================== module XRXSV9 # # ゲーム中のすばやさ倍率 # (ゲーム中のすばやさがこの倍率をかけて #   0〜200程度に収まるようにしてください。220を超えても220として扱います。 #   例:AGIが 400 までいくなら 0.5に設定  #     AGIが 1〜30 ぐらいなら 6 に設定  など) # CPAGIRate = 1.0 # # スリップダメージ/HPMP自動回復のタイミング # false : ターンコントローラーの行動直後に全員 # true : 個別に行動後 # OneSlipStep = true end #============================================================================== # CP機能 #============================================================================== class Game_Battler attr_accessor :cp def cp_per48 return 0 if self.dead? return [[(48 - self.cp / 5), 48].min, 0].max end def cp_per96 return cp_per48 * 2 end def cp_reset return if self.commanded n = 0 if self.action.skill? n = self.action.skill.speed elsif self.action.item? n = self.action.item.speed elsif self.action.attack? and self.fast_attack n = 30 end self.cp = [[240 - (self.agi * XRXSV9::CPAGIRate).to_i - n, 20].max, 240].min end def cp_max? return (self.cp == 0) end def cp_leadoff? return false end def cp_nillize @cp = nil end end module XRXSV9EG_CPInitializing def battler_initialize super self.cp_reset end end class Game_Actor < Game_Battler include XRXSV9EG_CPInitializing end #============================================================================== # BaST - 基本戦闘進行処理 #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # CPの初期化 #-------------------------------------------------------------------------- def cp_initialize for member in self.members member.cp_reset end if $game_troop.preemptive for enemy in $game_troop.members enemy.cp += 180 end elsif $game_troop.surprise for actor in $game_party.members actor.cp += 180 end end cp_countup for member1 in self.members if member1.cp_leadoff? member1.cp = 0 for member2 in self.members - [member1] member2.cp += 1 end end end end def start_cp @cp_active = true $game_troop.preemptive = false $game_troop.surprise = false end #-------------------------------------------------------------------------- # ● 戦闘行動の処理 #-------------------------------------------------------------------------- alias xrxsv9eg1_process_action process_action def process_action xrxsv9eg1_process_action b = ((@active_battler == $game_troop.members[0]) and not $game_troop.interpreter.running?) process_turn_ending(b) end if XRXSV9::OneSlipStep def process_turn_ending(turn_ending) if turn_ending $game_troop.increase_turn process_turn_end_battle_event end if @active_battler @active_battler.slip_damage_effect @active_battler.do_auto_recovery @status_window.refresh end end else def process_turn_ending(turn_ending) if turn_ending $game_troop.increase_turn process_slip_recover process_turn_end_battle_event end end end #-------------------------------------------------------------------------- # コマンド決定と予約実行 #-------------------------------------------------------------------------- alias xrxsv9eg2_command_done command_done def command_done(action) xrxsv9eg2_command_done(action) start_main unless @quick_mode end #-------------------------------------------------------------------------- # ● 前のアクターのコマンド入力へ * #-------------------------------------------------------------------------- def prior_actor end #-------------------------------------------------------------------------- # ● ターン終了 * #-------------------------------------------------------------------------- def turn_end_process2 start_party_command_selection end def start_party_command_selection @phase = 2 end #-------------------------------------------------------------------------- # コマンドした行動を実行に移す判定 #-------------------------------------------------------------------------- def action_start? return true end def command_rights_user(action) return action.battler end #-------------------------------------------------------------------------- # フレーム更新 - コマンドストリーム #-------------------------------------------------------------------------- def update_stream_command if @active_battler update_command elsif make_auto_actions start_main else actor_command_seach(1, false, false) end end #-------------------------------------------------------------------------- # 逃走失敗時の追加処理 #-------------------------------------------------------------------------- def process_escape_failure end end #============================================================================== # BaST - カウントストリーム #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # フレーム更新 - カウントストリーム #-------------------------------------------------------------------------- def update_stream_count cp_countup @phase = 3 @actor_index = -1 end #-------------------------------------------------------------------------- # 最低CP値の取得とカウント実行 #-------------------------------------------------------------------------- def cp_countup lowest_cp = 240 for member in self.members lowest_cp = member.cp if lowest_cp > member.cp end for member in self.members member.cp -= lowest_cp end end end