查看: 1824|回复: 0

[已经过期] 敌人咏唱

[复制链接]
梦石
0
星屑
2862
在线时间
144 小时
注册时间
2018-6-29
回帖
19

R考场第七期纪念奖

发表于 2022-4-4 10:23:55 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我方使用设置好的57号技能时都会从头读条后再放技能,但敌人都是直接满条就放了不从头读条,怎么设置才能让敌人也和我方一样从头读条再放技能呢?
  1. #========================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #========================================================================
  4. class Scene_Battle

  5.   #--------------------------------------------------------------------------
  6.   def goahead_recite(battler)
  7.     return if battler == nil
  8.     case battler.current_action.skill_id
  9.     when 57 ########扫荡特技的ID
  10.       battler.cp -= 140000 #########这个技能需要多长吟唱时间,CP最大65535
  11.       battler.goahead_recite = true
  12.     else
  13.       battler.goahead_recite = nil
  14.     end
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   def phase3_next_actor
  18.     begin
  19.       if @active_battler != nil
  20.         @active_battler.blink = false
  21.       end
  22.       if @actor_index == $game_party.actors.size-1
  23.         start_phase4
  24.         return
  25.       end
  26.       @actor_index += 1
  27.       @active_battler = $game_party.actors[@actor_index]
  28.       @active_battler.blink = true
  29.     end until @active_battler.inputable?
  30.     if @active_battler.goahead_recite != nil
  31.       @active_battler.current_action = @active_battler.goahead_recite.clone
  32.       @active_battler.goahead_recite = nil
  33.       start_phase4
  34.     else
  35.       phase3_setup_command_window
  36.     end
  37.   end

  38.   #--------------------------------------------------------------------------
  39.   def update_phase3_skill_select
  40.     @skill_window.visible = true
  41.     @skill_window.update
  42.     if Input.trigger?(Input::B)
  43.       $game_system.se_play($data_system.cancel_se)
  44.       end_skill_select
  45.       return
  46.     end
  47.     if Input.trigger?(Input::C)
  48.       @skill = @skill_window.skill
  49.       if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
  50.         $game_system.se_play($data_system.buzzer_se)
  51.         return
  52.       end
  53.       $game_system.se_play($data_system.decision_se)
  54.       @active_battler.current_action.skill_id = @skill.id
  55.       goahead_recite @active_battler
  56.       @skill_window.visible = false
  57.       if @skill.scope == 1
  58.         start_enemy_select
  59.       elsif @skill.scope == 3 or @skill.scope == 5
  60.         start_actor_select
  61.       else
  62.         end_skill_select
  63.         phase3_next_actor
  64.       end
  65.       return
  66.     end
  67.   end

  68.   #--------------------------------------------------------------------------
  69.   def update_phase3_enemy_select
  70.     @enemy_arrow.update
  71.     if Input.trigger?(Input::B)
  72.       $game_system.se_play($data_system.cancel_se)
  73.       end_enemy_select
  74.       return
  75.     end
  76.     if Input.trigger?(Input::C)
  77.       $game_system.se_play($data_system.decision_se)
  78.       @active_battler.current_action.target_index = @enemy_arrow.index
  79.       end_enemy_select
  80.       if @skill_window != nil
  81.         end_skill_select
  82.       end
  83.       if @item_window != nil
  84.         end_item_select
  85.       end
  86.       phase3_next_actor
  87.     end
  88.   end

  89.   #--------------------------------------------------------------------------
  90.   # 加加加加加加加加加加加加加加加加加加加
  91.   def end_skill_select
  92.     # 释放特技窗口
  93.     @skill_window.dispose
  94.     @skill_window = nil
  95.     # 隐藏帮助窗口
  96.     @help_window.visible = false
  97.     # 有效化角色指令窗口
  98.     @actor_command_window.active = true
  99.     @actor_command_window.visible = true
  100.     if @active_battler.goahead_recite != nil
  101.       @active_battler.goahead_recite = @active_battler.current_action.clone
  102.     end
  103.   end
  104. end

  105. class Game_Battler
  106.   attr_accessor :goahead_recite
  107.   attr_accessor :current_action
  108. end

  109. #========================================================================
  110. # ▼▲▼ XRXS_BP 1. CP制導入 ver..23 ▼▲▼
  111. # by 桜雅 在土, 和希
  112. #------------------------------------------------------------------------
  113. # □ カスタマイズポイント
  114. #========================================================================
  115. module XRXS_BP1
  116.   #
  117.   # 对齐方式。0:左 1:中央 2:右
  118.   #
  119.   ALIGN = 0
  120.   #
  121.   # 人数
  122.   #
  123.   MAX = 4
  124. end
  125. class Scene_Battle_CP
  126.   #
  127.   # 战斗速度
  128.   #
  129.   BATTLE_SPEED = 2.0
  130.   #
  131.   # 战斗开始的时候气槽百分比
  132.   #
  133.   START_CP_PERCENT = 100
  134. end
  135. class Scene_Battle
  136.   # 效果音效,可以自己添加
  137.   DATA_SYSTEM_COMMAND_UP_SE = ""
  138.   # 各项数值功能消耗的CP值
  139.   CP_COST_BASIC_ACTIONS = 0 # 基础共同
  140.   CP_COST_SKILL_ACTION = 65535 # 技能
  141.   CP_COST_ITEM_ACTION = 65535 # 物品
  142.   CP_COST_BASIC_ATTACK = 65535 # 攻撃
  143.   CP_COST_BASIC_GUARD = 32768 # 防御
  144.   CP_COST_BASIC_NOTHING = 65535 # 不做任何事情
  145.   CP_COST_BASIC_ESCAPE = 65535 # 逃跑
  146. end
  147. #========================================================================
  148. # --- XRXS.コマンドウィンドウ?コマンド追加機構 ---
  149. #------------------------------------------------------------------------
  150. # Window_Commandクラスに add_command メソッドを追加します。
  151. #========================================================================
  152. module XRXS_Window_Command_Add_Command
  153.   #----------------------------------------------------------------------
  154.   # ○ コマンドを追加
  155.   #----------------------------------------------------------------------
  156.   def add_command(command)
  157.     # 初期化されていない場合、無効化判別用の配列 @disabled の初期化
  158.     #
  159.     if @disabled == nil
  160.       @disabled = []
  161.     end
  162.     if @commands.size != @disabled.size
  163.       for i in 0...@commands.size
  164.         @disabled[i] = false
  165.       end
  166.     end
  167.     #
  168.     # 追加
  169.     #
  170.     @commands.push(command)
  171.     @disabled.push(false)
  172.     @item_max = @commands.size
  173.     self.y -= 32
  174.     self.height += 32
  175.     self.contents.dispose
  176.     self.contents = nil
  177.     self.contents = Bitmap.new(self.width - 32, @item_max * 32)
  178.     refresh
  179.     for i in 0...@commands.size
  180.       if @disabled[i]
  181.         disable_item(i)
  182.       end
  183.     end
  184.   end
  185.   #----------------------------------------------------------------------
  186.   # ○ 項目の無効化
  187.   # index : 項目番号
  188.   #----------------------------------------------------------------------
  189.   def disable_item(index)
  190.     if @disabled == nil
  191.       @disabled = []
  192.     end
  193.     @disabled[index] = true
  194.     draw_item(index, disabled_color)
  195.   end
  196. end
  197. class Window_Command < Window_Selectable
  198.   #----------------------------------------------------------------------
  199.   # ○ インクルード
  200.   #----------------------------------------------------------------------
  201.   include XRXS_Window_Command_Add_Command
  202.   #----------------------------------------------------------------------
  203.   # ● 項目の無効化
  204.   # index : 項目番号
  205.   #----------------------------------------------------------------------
  206.   def disable_item(index)
  207.     super
  208.   end
  209. end
  210. #========================================================================
  211. # □ Scene_Battle_CP
  212. #========================================================================
  213. class Scene_Battle_CP
  214.   #----------------------------------------------------------------------
  215.   # ○ 公開インスタンス変数
  216.   #----------------------------------------------------------------------
  217.   attr_accessor :stop # CP加算ストップ
  218.   #----------------------------------------------------------------------
  219.   # ○ オブジェクトの初期化
  220.   #----------------------------------------------------------------------
  221.   def initialize
  222.     @battlers = []
  223.     @cancel = false
  224.     @stop = false
  225.     @agi_total = 0
  226.     # 配列 count_battlers を初期化
  227.     count_battlers = []
  228.     # エネミーを配列 count_battlers に追加
  229.     for enemy in $game_troop.enemies
  230.       count_battlers.push(enemy)
  231.     end
  232.     # アクターを配列 count_battlers に追加
  233.     for actor in $game_party.actors
  234.       count_battlers.push(actor)
  235.     end
  236.     for battler in count_battlers
  237.       @agi_total += battler.agi
  238.     end
  239.     for battler in count_battlers
  240.       battler.cp = [[65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000, 0].max, 65535].min
  241.     end
  242.   end
  243.   #----------------------------------------------------------------------
  244.   # ○ CPカウントアップ
  245.   #----------------------------------------------------------------------
  246.   def update
  247.     # ストップされているならリターン
  248.     return if @stop
  249.     #
  250.     for battler in $game_party.actors + $game_troop.enemies
  251.       # 行動出来なければ無視
  252.       if battler.dead? == true
  253.         battler.cp = 0
  254.         next
  255.       end
  256.       battler.cp = [[battler.cp + BATTLE_SPEED * 4096 * battler.agi / @agi_total, 0].max, 65535].min
  257.     end
  258.   end
  259.   #----------------------------------------------------------------------
  260.   # ○ CPカウントの開始
  261.   #----------------------------------------------------------------------
  262.   def stop
  263.     @cancel = true
  264.     if @cp_thread != nil then
  265.       @cp_thread.join
  266.       @cp_thread = nil
  267.     end
  268.   end
  269. end
  270. #========================================================================
  271. # ■ Game_Battler
  272. #========================================================================
  273. class Game_Battler
  274.   attr_accessor :now_guarding # 現在防御中フラグ
  275.   attr_accessor :cp # 現在CP
  276.   attr_accessor :slip_state_update_ban # スリップ?ステート自動処理の禁止
  277.   #----------------------------------------------------------------------
  278.   # ○ CP の変更
  279.   #-----------------------------------------------------------------------
  280.   def cp=(p)
  281.     @cp = [[p, 0].max, 65535].min
  282.   end
  283.   #----------------------------------------------------------------------
  284.   # ● 防御中判定 [ 再定義 ]
  285.   #----------------------------------------------------------------------
  286.   def guarding?
  287.     return @now_guarding
  288.   end
  289.   #----------------------------------------------------------------------
  290.   # ● コマンド入力可能判定
  291.   #----------------------------------------------------------------------
  292.   alias xrxs_bp1_inputable? inputable?
  293.   def inputable?
  294.     bool = xrxs_bp1_inputable?
  295.     return (bool and (@cp >= 65535))
  296.   end
  297.   #----------------------------------------------------------------------
  298.   # ● ステート [スリップダメージ] 判定
  299.   #----------------------------------------------------------------------
  300.   alias xrxs_bp1_slip_damage? slip_damage?
  301.   def slip_damage?
  302.     return false if @slip_state_update_ban
  303.     return xrxs_bp1_slip_damage?
  304.   end
  305.   #----------------------------------------------------------------------
  306.   # ● ステート自然解除 (ターンごとに呼び出し)
  307.   #----------------------------------------------------------------------
  308.   alias xrxs_bp1_remove_states_auto remove_states_auto
  309.   def remove_states_auto
  310.     return if @slip_state_update_ban
  311.     xrxs_bp1_remove_states_auto
  312.   end
  313. end
  314. #========================================================================
  315. # ■ Game_Actor
  316. #========================================================================
  317. class Game_Actor < Game_Battler
  318.   #----------------------------------------------------------------------
  319.   # ● セットアップ
  320.   #----------------------------------------------------------------------
  321.   alias xrxs_bp1_setup setup
  322.   def setup(actor_id)
  323.     xrxs_bp1_setup(actor_id)
  324.     @cp = 0
  325.     @now_guarding = false
  326.     @slip_state_update_ban = false
  327.   end
  328. end
  329. #========================================================================
  330. # ■ Game_Enemy
  331. #========================================================================
  332. class Game_Enemy < Game_Battler
  333.   #----------------------------------------------------------------------
  334.   # ● オブジェクト初期化
  335.   #----------------------------------------------------------------------
  336.   alias xrxs_bp1_initialize initialize
  337.   def initialize(troop_id, member_index)
  338.     xrxs_bp1_initialize(troop_id, member_index)
  339.     @cp = 0
  340.     @now_guarding = false
  341.     @slip_state_update_ban = false
  342.   end
  343. end
  344. class Window_All < Window_Base
  345.   def initialize
  346.     super(0,0,640,480)
  347.     self.opacity = 0
  348.     self.contents = Bitmap.new(width - 32, height - 32)
  349.     refresh
  350.   end
  351.   def refresh
  352.     self.contents.clear
  353.     for actor in $game_troop.enemies
  354.       next if !actor.exist?
  355.       draw_actor_cp_meter(actor, actor.screen_x-50, actor.screen_y-50, 60, 0)
  356.     end
  357.   end
  358.   #----------------------------------------------------------------------
  359.   # ○ CPメーター の描画
  360.   #----------------------------------------------------------------------
  361.   def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  362.     self.contents.font.color = system_color
  363.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  364.     if actor.cp == nil
  365.       actor.cp = 0
  366.     end
  367.     w = width * [actor.cp,65535].min / 65535
  368.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  369.     self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  370.     self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  371.     self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
  372.   end  
  373. end
  374. #========================================================================
  375. # ■ Window_BattleStatus
  376. #========================================================================
  377. class Window_BattleStatus < Window_Base
  378.   #-----------------------------------------------------------------------
  379.   # ○ 公開インスタンス変数
  380.   #----------------------------------------------------------------------
  381.   attr_accessor :update_cp_only # CPメーターのみの更新
  382.   #----------------------------------------------------------------------
  383.   # ● オブジェクト初期化
  384.   #----------------------------------------------------------------------
  385.   alias xrxs_bp1_initialize initialize
  386.   def initialize
  387.     @update_cp_only = false
  388.     @wall = Window_All.new
  389.     xrxs_bp1_initialize
  390.   end
  391.   def dispose
  392.     super
  393.     @wall.dispose
  394.   end
  395.   #----------------------------------------------------------------------
  396.   # ● リフレッシュ
  397.   #----------------------------------------------------------------------
  398.   alias xrxs_bp1_refresh refresh
  399.   def refresh
  400.     unless @update_cp_only
  401.       xrxs_bp1_refresh
  402.     end
  403.     refresh_cp
  404.     @wall.refresh
  405.   end
  406.   #----------------------------------------------------------------------
  407.   # ○ リフレッシュ(CPのみ)
  408.   #----------------------------------------------------------------------
  409.   def refresh_cp
  410.     for i in 0...$game_party.actors.size
  411.       actor = $game_party.actors[i]
  412.       width = [self.width*3/4 / XRXS_BP1::MAX, 80].max
  413.       space = self.width / XRXS_BP1::MAX
  414.       case XRXS_BP1::ALIGN
  415.       when 0
  416.         actor_x = i * space + 4
  417.       when 1
  418.         actor_x = (space * ((XRXS_BP1::MAX - $game_party.actors.size)/2.0 + i)).floor
  419.       when 2
  420.         actor_x = (i + XRXS_BP1::MAX - $game_party.actors.size) * space + 4
  421.       end
  422.       actor_x += self.x
  423.       draw_actor_cp_meter(actor, actor_x, 96, width, 0)
  424.     end
  425.   end
  426.   #----------------------------------------------------------------------
  427.   # ○ CPメーター の描画
  428.   #----------------------------------------------------------------------
  429.   def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  430.     self.contents.font.color = system_color
  431.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  432.     if actor.cp == nil
  433.       actor.cp = 0
  434.     end
  435.     w = width * [actor.cp,65535].min / 65535
  436.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  437.     self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  438.     self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  439.     self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
  440.   end
  441. end
  442. #========================================================================
  443. # ■ Scene_Battle
  444. #========================================================================
  445. class Scene_Battle
  446.   #----------------------------------------------------------------------
  447.   # ● フレーム更新
  448.   #----------------------------------------------------------------------
  449.   alias xrxs_bp1_update update
  450.   def update
  451.     xrxs_bp1_update
  452.     # CP更新
  453.     @cp_thread.update
  454.   end
  455.   #----------------------------------------------------------------------
  456.   # ● バトル終了
  457.   # result : 結果 (0:勝利 1:敗北 2:逃走)
  458.   #----------------------------------------------------------------------
  459.   alias xrxs_bp1_battle_end battle_end
  460.   def battle_end(result)
  461.     # CPカウントを停止する
  462.     @cp_thread.stop
  463.     # 呼び戻す
  464.     xrxs_bp1_battle_end(result)
  465.   end
  466.   #----------------------------------------------------------------------
  467.   # ● プレバトルフェーズ開始
  468.   #----------------------------------------------------------------------
  469.   alias xrxs_bp1_start_phase1 start_phase1
  470.   def start_phase1
  471.     @agi_total = 0
  472.     # CP加算を開始する
  473.     @cp_thread = Scene_Battle_CP.new
  474.     # インデックスを計算
  475.     @cp_escape_actor_command_index = @actor_command_window.height/32 - 1
  476.     # アクターコマンドウィンドウに追加
  477.     @actor_command_window.add_command("逃跑")
  478.     if !$game_temp.battle_can_escape
  479.       @actor_command_window.disable_item(@cp_escape_actor_command_index)
  480.     end
  481.     # 呼び戻す
  482.     xrxs_bp1_start_phase1
  483.   end
  484.   #----------------------------------------------------------------------
  485.   # ● パーティコマンドフェーズ開始
  486.   #----------------------------------------------------------------------
  487.   alias xrxs_bp1_start_phase2 start_phase2
  488.   def start_phase2
  489.     xrxs_bp1_start_phase2
  490.     @party_command_window.active = false
  491.     @party_command_window.visible = false
  492.     # CP加算を再開する
  493.     @cp_thread.stop = false
  494.     # 次へ
  495.     start_phase3
  496.   end
  497.   #----------------------------------------------------------------------
  498.   # ● アクターコマンドウィンドウのセットアップ
  499.   #----------------------------------------------------------------------
  500.   alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
  501.   def phase3_setup_command_window
  502.     # CPスレッドを一時停止する
  503.     @cp_thread.stop = true
  504.     # ウィンドウのCP更新
  505.     @status_window.refresh_cp
  506.     # @active_battlerの防御を解除
  507.     @active_battler.now_guarding = false
  508.     # 効果音の再生
  509.     Audio.se_play(DATA_SYSTEM_COMMAND_UP_SE) if DATA_SYSTEM_COMMAND_UP_SE != ""
  510.     # 呼び戻す
  511.     xrxs_bp1_phase3_setup_command_window
  512.   end
  513.   #----------------------------------------------------------------------
  514.   # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  515.   #----------------------------------------------------------------------
  516.   alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
  517.   def update_phase3_basic_command
  518.     # C ボタンが押された場合
  519.     if Input.trigger?(Input::C)
  520.       # アクターコマンドウィンドウのカーソル位置で分岐
  521.       case @actor_command_window.index
  522.       when @cp_escape_actor_command_index # 逃げる
  523.         if $game_temp.battle_can_escape
  524.           # 決定 SE を演奏
  525.           $game_system.se_play($data_system.decision_se)
  526.           # アクションを設定
  527.           @active_battler.current_action.kind = 0
  528.           @active_battler.current_action.basic = 4
  529.           # 次のアクターのコマンド入力へ
  530.           phase3_next_actor
  531.         else
  532.           # ブザー SE を演奏
  533.           $game_system.se_play($data_system.buzzer_se)
  534.         end
  535.         return
  536.       end
  537.     end
  538.     xrxs_bsp1_update_phase3_basic_command
  539.   end
  540.   #----------------------------------------------------------------------
  541.   # ● メインフェーズ開始
  542.   #----------------------------------------------------------------------
  543.   alias xrxs_bp1_start_phase4 start_phase4
  544.   def start_phase4
  545.     # 呼び戻す
  546.     xrxs_bp1_start_phase4
  547.     # CPスレッドを一時停止する
  548.     unless @action_battlers.empty?
  549.       @cp_thread.stop = true
  550.     end
  551.   end
  552.   #----------------------------------------------------------------------
  553.   # ● 行動順序作成
  554.   #----------------------------------------------------------------------
  555.   alias xrxs_bp1_make_action_orders make_action_orders
  556.   def make_action_orders
  557.     xrxs_bp1_make_action_orders
  558.     # 全員のCPを確認
  559.     exclude_battler = []
  560.     for battler in @action_battlers
  561.       # CPが不足している場合は @action_battlers から除外する
  562.       if battler.cp < 65535
  563.         exclude_battler.push(battler)
  564.       end
  565.     end
  566.     @action_battlers -= exclude_battler
  567.   end
  568.   #----------------------------------------------------------------------
  569.   # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  570.   #----------------------------------------------------------------------
  571.   alias xrxs_bp1_update_phase4_step1 update_phase4_step1
  572.   def update_phase4_step1
  573.     # 初期化
  574.     @phase4_act_continuation = 0
  575.     # 勝敗判定
  576.     if judge
  577.       @cp_thread.stop
  578.       # 勝利または敗北の場合 : メソッド終了
  579.       return
  580.     end
  581.     # 未行動バトラー配列の先頭から取得
  582.     @active_battler = @action_battlers[0]
  583.     # ステータス更新をCPだけに限定。
  584.     @status_window.update_cp_only = true
  585.     # ステート更新を禁止。
  586.     @active_battler.slip_state_update_ban = true if @active_battler != nil
  587.     # 戻す
  588.     xrxs_bp1_update_phase4_step1
  589.     # @status_windowがリフレッシュされなかった場合は手動でリフレッシュ(CPのみ)
  590.     if @phase4_step != 2
  591.       # リフレッシュ
  592.       @status_window.refresh
  593.       # 軽量化:たったコレだけΣ(?w?
  594.       Graphics.frame_reset
  595.     end
  596.     # 禁止を解除
  597.     @status_window.update_cp_only = false
  598.     @active_battler.slip_state_update_ban = false if @active_battler != nil
  599.   end
  600.   #----------------------------------------------------------------------
  601.   # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  602.   #----------------------------------------------------------------------
  603.   alias xrxs_bp1_update_phase4_step2 update_phase4_step2
  604.   def update_phase4_step2
  605.     # 強制アクションでなければ
  606.     unless @active_battler.current_action.forcing
  607.       # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
  608.       if @active_battler.restriction == 2 or @active_battler.restriction == 3
  609.         # アクションに攻撃を設定
  610.         @active_battler.current_action.kind = 0
  611.         @active_battler.current_action.basic = 0
  612.       end
  613.       # 制約が [行動できない] の場合
  614.       if @active_battler.restriction == 4
  615.         # アクション強制対象のバトラーをクリア
  616.         $game_temp.forcing_battler = nil
  617.         if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
  618.           # ステート自然解除
  619.           @active_battler.remove_states_auto
  620.           # CP消費
  621.           @active_battler.cp -= 65535
  622.           # ステータスウィンドウをリフレッシュ
  623.           @status_window.refresh
  624.         end
  625.         # ステップ 1 に移行
  626.         @phase4_step = 1
  627.         return
  628.       end
  629.     end
  630.     # アクションの種別で分岐
  631.     case @active_battler.current_action.kind
  632.     when 0
  633.       # 攻撃?防御?逃げる?何もしない時の共通消費CP
  634.       @active_battler.cp -= CP_COST_BASIC_ACTIONS if @phase4_act_continuation == 0
  635.     when 1
  636.       # スキル使用時の消費CP
  637.       @active_battler.cp -= CP_COST_SKILL_ACTION if @phase4_act_continuation == 0
  638.     when 2
  639.       # アイテム使用時の消費CP
  640.       @active_battler.cp -= CP_COST_ITEM_ACTION if @phase4_act_continuation == 0
  641.     end
  642.     # ステート自然解除
  643.     @active_battler.remove_states_auto
  644.     # 呼び戻す
  645.     xrxs_bp1_update_phase4_step2
  646.   end
  647.   #----------------------------------------------------------------------
  648.   # ● 基本アクション 結果作成
  649.   #----------------------------------------------------------------------
  650.   alias xrxs_bp1_make_basic_action_result make_basic_action_result
  651.   def make_basic_action_result
  652.     # 攻撃の場合
  653.     if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
  654.       @active_battler.cp -= CP_COST_BASIC_ATTACK # 攻撃時のCP消費
  655.     end
  656.     # 防御の場合
  657.     if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
  658.       @active_battler.cp -= CP_COST_BASIC_GUARD # 防御時のCP消費
  659.       # @active_battlerの防御をON
  660.       @active_battler.now_guarding = true
  661.     end
  662.     # 敵の逃げるの場合
  663.     if @active_battler.is_a?(Game_Enemy) and
  664.         @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
  665.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  666.     end
  667.     # 何もしないの場合
  668.     if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
  669.       @active_battler.cp -= CP_COST_BASIC_NOTHING # 何もしない時のCP消費
  670.     end
  671.     # 逃げるの場合
  672.     if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
  673.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  674.       # 逃走可能ではない場合
  675.       if $game_temp.battle_can_escape == false
  676.         # ブザー SE を演奏
  677.         $game_system.se_play($data_system.buzzer_se)
  678.         return
  679.       end
  680.       # 逃走処理
  681.       update_phase2_escape
  682.       return
  683.     end
  684.     # 呼び戻す
  685.     xrxs_bp1_make_basic_action_result
  686.   end
  687.   #----------------------------------------------------------------------
  688.   # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  689.   #----------------------------------------------------------------------
  690.   alias xrxs_bp1_update_phase4_step6 update_phase4_step6
  691.   def update_phase4_step6
  692.     # スリップダメージ
  693.     if @active_battler.hp > 0 and @active_battler.slip_damage?
  694.       @active_battler.slip_damage_effect
  695.       @active_battler.damage_pop = true
  696.       # ステータスウィンドウをリフレッシュ
  697.       @status_window.refresh
  698.     end
  699.     # 呼び戻す
  700.     xrxs_bp1_update_phase4_step6
  701.   end
  702. end
  703. #======================================================================
  704. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  705. #======================================================================
复制代码
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部