#◆◇◆◇◆ ☆ スキル派生・連撃併用化パッチB ver 1・10 ◇◆◇◆◇ # ☆ マスタースクリプト ver 2.00 以降専用 # 配布元(みんとのお部屋) http://oiuytrewq.hp.infoseek.co.jp/minto.html # サポート掲示板 http://www2.ezbbs.net/21/minto-aaa/ # by みんと # 二刀流 Ver 1.04 # 配布元・サポートURL # http://members.jcom.home.ne.jp/cogwheel/ # スキル使用時媒体消費 Ver 1.00 # 配布元・サポートURL # http://members.jcom.home.ne.jp/cogwheel/ # 連撃 Ver 1.03 # 配布元・サポートURL(歯車の城) # http://members.jcom.home.ne.jp/cogwheel/ # by ショウ =begin 更新履歴 ver 1.10 ハングアップするミス等を修正 セクション指定上下関係 RTAB(歯車の城) ↓ 二刀流 or スキル使用時媒体消費(歯車の城) ↓ 連撃(歯車の城) ↓ スキル派生 in RTAB(みんとのお部屋) ↓ このスクリプト 使用方法 このスクリプトは みんとのお部屋の「スキル派生 in RTAB」と 歯車の城さんの「連撃」を併用化させるための拡張ソースです。 使用には別途 RTAB(歯車の城) 二刀流(歯車の城) スキル使用時媒体消費(歯車の城) 連撃(歯車の城) スキル派生 in RTAB(みんとのお部屋) が必須となり、このスクリプト単体では何もおきません。 =end #============================================================================== # ■ Scene_Battle (分割定義 4) #------------------------------------------------------------------------------ #  バトル画面の処理を行うクラスです。 #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● 派生チェック #-------------------------------------------------------------------------- def cooperation_check(battler) # フラグを初期化 cooperation = false # ステップ 6 に移行 battler.phase = 6 # 派生・メイン処理 if battler.current_action.skill_id.to_i >= 1 # スキルのデータを複製 s_id = battler.current_action.skill_id.to_i for target in battler.target skill_data = Data_Skills_Base.data[s_id] # 先に派生スキルを収得して、使用できるかチェック skill = Data_Skills_Base.data[s_id] id = skill.coop_id id2 = skill.coop_id2 id3 = skill.coop_id3 if id > 0 skill = Data_Skills_Base.data[id] # 使用できる場合は新たなIDを収納する if battler.skill_can_use?(id) battler.current_action.skill_id = id cooperation = true end end if id2 > 0 and not battler.skill_can_use?(id) skill = Data_Skills_Base.data[id2] # 使用できる場合は新たなIDを収納する if battler.skill_can_use?(id2) battler.current_action.skill_id = id2 cooperation = true end end if id3 > 0 and not battler.skill_can_use?(id2) skill = Data_Skills_Base.data[id3] # 使用できる場合は新たなIDを収納する if battler.skill_can_use?(id3) battler.current_action.skill_id = id3 cooperation = true end end # 確率判定 coop_rand = skill_data.coop_rand.to_i if coop_rand != 0 if rand(100) < coop_rand cooperation = true else cooperation = false end end # 派生成立ならステップ 2 に移行 if cooperation @status_window.refresh battler.phase = 2 end end end end #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示) #-------------------------------------------------------------------------- def update_phase4_step5_double(battler) next_step = true # ダメージ表示 for target in battler.target # ダメージハッシュが初期化されていれば次へ if target.total_damage == {} next end # total_damage より全ダメージを算出 total_damage = target.total_damage[battler].shift target.damage[battler] = total_damage[0] target.critical[battler] = total_damage[1] target.recover_hp[battler] = total_damage[2] target.recover_sp[battler] = total_damage[3] target.state_p[battler] = total_damage[4] target.state_m[battler] = total_damage[5] # ダメージ表示フラグをON target.damage_pop[battler] = true # 実際にダメージを与える target.damage_effect(battler, battler.current_action.kind) # 余計なハッシュを削除 target.recover_hp.delete(battler) target.recover_sp.delete(battler) target.state_p.delete(battler) target.state_m.delete(battler) # ダメージを全て与えきった場合 if target.total_damage[battler].empty? # ターゲットへの全ダメージを削除 target.total_damage.delete(battler) # 指定時間ウェイトする battler.wait = @damage_wait else # 指定時間ウェイトする next_step = false battler.wait = 2 * target.total_damage[battler][0][6] end # ステータスウィンドウをリフレッシュ status_refresh(target) end if next_step # 派生チェックの結果を適用 cooperation_check(battler) end end #-------------------------------------------------------------------------- # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示) #-------------------------------------------------------------------------- def update_phase4_step5(battler) update_phase4_step5_double(battler) if battler.phase == 6 if battler.is_a?(Game_Actor) and battler.target.size > 0 and (not battler.target[0].hidden and (battler.target[0].hp > 0 or battler.target[0].immortal)) and battler.current_action.kind == 0 and battler.double_edge? if battler.first_weapon battler.first_weapon = false battler.second_weapon = true battler.wait = 1 battler.phase = 2 else battler.second_weapon battler.second_weapon = false end elsif battler.is_a?(Game_Actor) battler.first_weapon = false battler.second_weapon = false end end end end