设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1239|回复: 0
打印 上一主题 下一主题

[已经过期] 敌人咏唱

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2089
在线时间
80 小时
注册时间
2018-6-29
帖子
19

R考场第七期纪念奖

跳转到指定楼层
1
发表于 2022-4-4 10:23:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-28 07:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表