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

Project1

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

[已经解决] 请人给新·即时战斗添入体力值

 关闭 [复制链接]

Lv1.梦旅人

伸手爱好者

梦石
0
星屑
50
在线时间
8 小时
注册时间
2009-3-28
帖子
527
跳转到指定楼层
1
发表于 2009-11-28 10:40:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
6星屑
本帖最后由 悠悠炸弹 于 2009-11-29 10:20 编辑

恩~
就是想请人帮我在新·即时战斗的基础上添加一个体力值VIT——vitality.
本来是打算自己改的= =可是偶的基础语法太烂,实在弄不了才来悬赏的.......................
脚本功能要求如下:
1在新·即时战斗的基础上添加体力值
2,给每个战斗者定义一个体力值.
3,描绘一个体力槽,长度 宽度 描绘方法跟原有的CP槽一样(放哪都行,坐标偶会自己调)(颜色偶也会自己调)
4,战斗开始体力初始为100.(百分比也行)
5,攻击或 使用技能 逃跑等分别消耗体力槽 5   10   5,描绘好的体力槽要随体力变化(百分比也行)

6,当某个战斗者体力为0或负数时,使该战斗者体力先归0然后停止CP值(新·即时战斗原有的定义),(其他战斗者不受影响)
然后体力值缓慢增加
(恢复速度参照battler.cp = [[65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000, 0].max, 65535].min
1/5)
战斗者开始行动时和原有CP一样停止增加,该战斗者行动完成后体力值继续增加(该战斗者CP不变,其他战斗者不受影响)
该战斗者体力恢复到100后,体力值停止增加,CP恢复增加.

(就是这个地方偶不会弄了T_T)

7,防御或使用某物品可以恢复一定体力(顺便给我说明下如何在公共事件里给某人或全体恢复体力)

恩,要求大概就是这样了.V不够的偶可以追加经验,只要我还能付得起~
添上偶所使用的新·即时战斗(这是66上直接帖的,偶所用的已经被改的面目全非,偶得到脚本以后还要整合,所以,请打上注释>_<)
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. ## ▼▲▼ XRXS_BP 1. CP制導入 ver..23 ▼▲▼
  5. # by 桜雅 在土, 和希
  6. #========================================================
  7. # 敌人显示CP 修改:柳柳
  8. #========================================================
  9. #========================================================
  10. # 特技CP定制ActiveCP 1.00 修改: FantasyDR、面粉、SailCat
  11. #========================================================
  12. #========================================================
  13. # CP Burst系统1.01 BY 面粉
  14. #========================================================
  15. #
  16. # 使用 CP Burst 和 CP Hold 的等级限制,这里默认是15级
  17. #
  18. # !!角色学会 CP Burst 技能的等级 必须大于等于此等级,否则容易出现错误 !!
  19. #
  20. MEANFREE_LEVEL_LIMIT = 10
  21. #
  22. #
  23. # 攻击者获得的CPB点数
  24. ATTACKER_CPB_GET = 10
  25. #
  26. # 被攻击者获得的CPB点数
  27. TARGET_CPB_GET = 5
  28. #
  29. # 默认的 CP Hold 命令名称
  30. CP_HOLD_NAME = "CP Hold"
  31. #
  32. #
  33. # 默认的 CP Burst 名称。
  34. #
  35. # !!如果想要修改为别的名称,那么数据库内的技能说明中,!!
  36. #
  37. # !! @之后的部分也要改为相应字符串,否则会出错 !!
  38. CP_BURST_NAME = "CP Burst"
  39. #
  40. #
  41. # 命令窗口显示的提示名称
  42. CP_BURST_ADD_COMMAND = "Burst"
  43. #
  44. #
  45. # 使用CP Hold 所能获得的CP点数
  46. CP_HOLD_GET_CPB = 50
  47. #
  48. #==============================================================================
  49. # □ カスタマイズポイント
  50. #==============================================================================
  51. module XRXS_BP1
  52. #
  53. # 对齐方式。0:左 1:中央 2:右
  54. #
  55. ALIGN = 0
  56. #
  57. #
  58. # 人数
  59. #
  60. MAX = 4
  61. end
  62. class Scene_Battle_CP
  63. #
  64. # 战斗速度
  65. #
  66. BATTLE_SPEED = 2.0
  67. #
  68. # 战斗开始的时候气槽百分比
  69. #
  70. START_CP_PERCENT = 0
  71. end

  72. class Scene_Battle

  73. # 效果音效,可以自己添加
  74. DATA_SYSTEM_COMMAND_UP_SE = ""

  75. # 各项数值功能消耗的CP值
  76. CP_COST_BASIC_ACTIONS = 0 # 基础共同
  77. CP_COST_SKILL_ACTION = 65535 # 技能
  78. CP_COST_ITEM_ACTION = 65535 # 物品
  79. CP_COST_BASIC_ATTACK = 16384 # 攻撃
  80. CP_COST_BASIC_GUARD = 32768 # 防御
  81. CP_COST_BASIC_NOTHING = 65535 # 不做任何事情
  82. CP_COST_BASIC_ESCAPE = 65535 # 逃跑
  83. CP_COST_CP_BURST = 65535 #CP Hold
  84. end
  85. #===============================================================
  86. # 追加并重写相关定义
  87. #===============================================================
  88. class Game_Battler
  89.   def cpb=(cpb)     
  90.   @cpb = [cpb, 0].max
  91. end
  92.   attr_accessor :cpb
  93.   alias new_battler_initialize initialize
  94.   def initialize
  95.   @cpb = 0
  96.      new_battler_initialize
  97.   end
  98. end
  99. module RPG
  100. class Skill
  101.    def name
  102.      name = @name.split(/,/)[0]
  103.      return name != nil ? name : ""
  104.    end
  105.    def description
  106.      description = @description.split(/@/)[0]
  107.      return description != nil ? description : ''
  108.    end
  109.    def desc
  110.      desc = @description.split(/@/)[1]
  111.      return desc != nil ? desc : "none"
  112.    end
  113.    def userskill_cp_cost
  114.     name = @name.split(/,/)[1]
  115.     return name != nil ? name.to_i.abs : 0
  116.   end
  117. end
  118. end
  119. #==================================================
  120. # 为命令窗口类增加新的方法
  121. #==================================================
  122. class Window_Command < Window_Selectable
  123.   def ChangeName(string,n,colour)
  124.    @commands[n] = string
  125.    draw_item(n, colour)
  126.    refresh
  127.    end
  128.   
  129.   def SuperChange(width, commands)
  130.   self.width = width
  131.   self.height = commands.size*32+32
  132.   @item_max = commands.size
  133.   @commands = commands
  134.   self.contents = Bitmap.new(width - 32, @item_max * 32)
  135.   refresh
  136.   self.index = 0
  137.   end

  138. def able_item(index)
  139.     draw_item(index, normal_color)
  140.   end
  141. end
  142. #--------------------------------------------------------------------------
  143. # 获取CP Burst使用时机
  144. #--------------------------------------------------------------------------
  145. class Game_Battler
  146.   #--------------------------------------------------------------------------
  147.   # ● 可以使用特技的判定
  148.   #     skill_id : 特技 ID
  149.   #--------------------------------------------------------------------------
  150.   def skill_can_use?(skill_id)
  151.     # SP 不足的情况下不能使用
  152.     if $data_skills[skill_id].sp_cost > self.sp
  153.       return false
  154.     end
  155.     # 战斗不能的情况下不能使用
  156.     if dead?
  157.       return false
  158.     end
  159.     # 沉默状态的情况下、物理特技以外的特技不能使用
  160.     if $data_skills[skill_id].atk_f == 0 and self.restriction == 1
  161.       return false
  162.     end
  163.    
  164.     # 获取可以使用的时机
  165.     occasion = $data_skills[skill_id].occasion
  166. #------------------------------------------------------
  167. # 追加
  168. #------------------------------------------------------
  169.     if $data_skills[skill_id].desc == CP_BURST_NAME
  170.   if self.cpb == nil
  171.     self.cpb = 0
  172.     end
  173.   if self.cpb < $data_skills[skill_id].userskill_cp_cost
  174.     return false
  175.     end
  176.   end
  177. #-------------------------------------------------------
  178.     # 战斗中的情况下
  179.     if $game_temp.in_battle
  180.       # [平时] 或者是 [战斗中] 可以使用
  181.       return (occasion == 0 or occasion == 1)
  182.     # 不是战斗中的情况下
  183.     else
  184.       # [平时] 或者是 [菜单中] 可以使用
  185.       return (occasion == 0 or occasion == 2)
  186.     end
  187.    
  188.    
  189.   end
  190. end

  191. #=====================================================================
  192. # 增加攻击以及挨打获得CPB点数的效果,道具除外
  193. #=====================================================================
  194. class Game_Battler
  195.   
  196.   #--------------------------------------------------------------------------
  197.   # ● 应用通常攻击效果
  198.   #     attacker : 攻击者 (battler)
  199.   #--------------------------------------------------------------------------
  200.   def attack_effect(attacker)
  201.     # 清除会心一击标志
  202.     self.critical = false
  203.     # 第一命中判定
  204.     hit_result = (rand(100) < attacker.hit)
  205.     # 命中的情况下
  206.     if hit_result == true
  207.       # 计算基本伤害
  208.       atk = [attacker.atk - self.pdef / 2, 0].max
  209.       self.damage = atk * (20 + attacker.str) / 20
  210.       # 属性修正
  211.       self.damage *= elements_correct(attacker.element_set)
  212.       self.damage /= 100
  213.       # 伤害符号正确的情况下
  214.       if self.damage > 0
  215.         # 会心一击修正
  216.         if rand(100) < 4 * attacker.dex / self.agi
  217.           self.damage *= 2
  218.           self.critical = true
  219.         end
  220.         # 防御修正
  221.         if self.guarding?
  222.           self.damage /= 2
  223.         end
  224.       end
  225.       # 分散
  226.       if self.damage.abs > 0
  227.         amp = [self.damage.abs * 15 / 100, 1].max
  228.         self.damage += rand(amp+1) + rand(amp+1) - amp
  229.       end
  230.       # 第二命中判定
  231.       eva = 8 * self.agi / attacker.dex + self.eva
  232.       hit = self.damage < 0 ? 100 : 100 - eva
  233.       hit = self.cant_evade? ? 100 : hit
  234.       hit_result = (rand(100) < hit)
  235.     end
  236.     # 命中的情况下
  237.     if hit_result == true
  238.       if self.damage > 0
  239.         if attacker.is_a?(Game_Enemy)
  240.           if self.is_a?(Game_Enemy)
  241.           else
  242.             if self.level == nil
  243.              #  attr_reader   :level
  244.             end
  245.             if self.level >= MEANFREE_LEVEL_LIMIT
  246.             self.cpb += TARGET_CPB_GET
  247.             end
  248.           end
  249.         else
  250.           if attacker.level >= MEANFREE_LEVEL_LIMIT
  251.           attacker.cpb += ATTACKER_CPB_GET
  252.           end
  253.         end
  254.        end  
  255.       # 状态冲击解除
  256.       remove_states_shock
  257.       # HP 的伤害计算
  258.       self.hp -= self.damage
  259.       # 状态变化
  260.       @state_changed = false
  261.       states_plus(attacker.plus_state_set)
  262.       states_minus(attacker.minus_state_set)
  263.     # Miss 的情况下
  264.     else
  265.       # 伤害设置为 "Miss"
  266.       self.damage = "Miss"
  267.       # 清除会心一击标志
  268.       self.critical = false
  269.     end
  270.     # 过程结束
  271.     return true
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ● 应用特技效果
  275.   #     user  : 特技的使用者 (battler)
  276.   #     skill : 特技
  277.   #--------------------------------------------------------------------------
  278.   def skill_effect(user, skill)
  279.     # 清除会心一击标志
  280.     self.critical = false
  281.     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
  282.     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
  283.     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  284.        ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  285.       # 过程结束
  286.       return false
  287.     end
  288.     # 清除有效标志
  289.     effective = false
  290.     # 公共事件 ID 是有效的情况下,设置为有效标志
  291.     effective |= skill.common_event_id > 0
  292.     # 第一命中判定
  293.     hit = skill.hit
  294.     if skill.atk_f > 0
  295.       hit *= user.hit / 100
  296.     end
  297.     hit_result = (rand(100) < hit)
  298.     # 不确定的特技的情况下设置为有效标志
  299.     effective |= hit < 100
  300.     # 命中的情况下
  301.     if hit_result == true
  302.       # 计算威力
  303.       power = skill.power + user.atk * skill.atk_f / 100
  304.       if power > 0
  305.         power -= self.pdef * skill.pdef_f / 200
  306.         power -= self.mdef * skill.mdef_f / 200
  307.         power = [power, 0].max
  308.       end
  309.       # 计算倍率
  310.       rate = 20
  311.       rate += (user.str * skill.str_f / 100)
  312.       rate += (user.dex * skill.dex_f / 100)
  313.       rate += (user.agi * skill.agi_f / 100)
  314.       rate += (user.int * skill.int_f / 100)
  315.       # 计算基本伤害
  316.       self.damage = power * rate / 20
  317.       # 属性修正
  318.       self.damage *= elements_correct(skill.element_set)
  319.       self.damage /= 100
  320.       # 伤害符号正确的情况下
  321.       if self.damage > 0
  322.         # 防御修正
  323.         if self.guarding?
  324.           self.damage /= 2
  325.         end
  326.       end
  327.       # 分散
  328.       if skill.variance > 0 and self.damage.abs > 0
  329.         amp = [self.damage.abs * skill.variance / 100, 1].max
  330.         self.damage += rand(amp+1) + rand(amp+1) - amp
  331.       end
  332.       # 第二命中判定
  333.       eva = 8 * self.agi / user.dex + self.eva
  334.       hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
  335.       hit = self.cant_evade? ? 100 : hit
  336.       hit_result = (rand(100) < hit)
  337.       # 不确定的特技的情况下设置为有效标志
  338.       effective |= hit < 100
  339.     end
  340.     # 命中的情况下
  341.     if hit_result == true
  342.       if self.damage > 0
  343.         if user.is_a?(Game_Enemy)
  344.           if self.is_a?(Game_Enemy)
  345.           else
  346.             if self.level == nil
  347.              #  attr_reader   :level
  348.             end
  349.             if self.level >= MEANFREE_LEVEL_LIMIT
  350.             self.cpb += TARGET_CPB_GET  
  351.             end
  352.           end
  353.         else
  354.           if user.level >= MEANFREE_LEVEL_LIMIT
  355.           user.cpb += ATTACKER_CPB_GET
  356.           end
  357.         end
  358.        end
  359.       # 威力 0 以外的物理攻击的情况下
  360.       if skill.power != 0 and skill.atk_f > 0
  361.         # 状态冲击解除
  362.         remove_states_shock
  363.         # 设置有效标志
  364.         effective = true
  365.       end
  366.       # HP 的伤害减法运算
  367.       last_hp = self.hp
  368.       self.hp -= self.damage
  369.       effective |= self.hp != last_hp
  370.       # 状态变化
  371.       @state_changed = false
  372.       effective |= states_plus(skill.plus_state_set)
  373.       effective |= states_minus(skill.minus_state_set)
  374.       # 威力为 0 的场合
  375.       if skill.power == 0
  376.         # 伤害设置为空的字串
  377.         self.damage = ""
  378.         # 状态没有变化的情况下
  379.         unless @state_changed
  380.           # 伤害设置为 "Miss"
  381.           self.damage = "Miss"
  382.         end
  383.       end
  384.     # Miss 的情况下
  385.     else
  386.       # 伤害设置为 "Miss"
  387.       self.damage = "Miss"
  388.     end
  389.     # 不在战斗中的情况下
  390.     unless $game_temp.in_battle
  391.       # 伤害设置为 nil
  392.       self.damage = nil
  393.     end
  394.     # 过程结束
  395.     return effective
  396.   end
  397. end

  398. #===========================================================================
  399. # 对于战斗画面的部分重新定义
  400. #===========================================================================

  401. class Scene_Battle
  402.   #--------------------------------------------------------------------------
  403.   # ● 主处理
  404.   #--------------------------------------------------------------------------
  405. def main
  406.     # 初始化战斗用的各种暂时数据
  407.     $game_temp.in_battle = true
  408.     $game_temp.battle_turn = 0
  409.     $game_temp.battle_event_flags.clear
  410.     $game_temp.battle_abort = false
  411.     $game_temp.battle_main_phase = false
  412.     $game_temp.battleback_name = $game_map.battleback_name
  413.     $game_temp.forcing_battler = nil
  414.     # 初始化战斗用事件解释器
  415.     $game_system.battle_interpreter.setup(nil, 0)
  416.     # 准备队伍
  417.     @troop_id = $game_temp.battle_troop_id
  418.     $game_troop.setup(@troop_id)
  419.     # 生成角色命令窗口
  420.     s1 = $data_system.words.attack
  421.     s2 = $data_system.words.skill
  422.     s3 = $data_system.words.guard
  423.     s4 = $data_system.words.item
  424.     s5 = CP_HOLD_NAME
  425.     @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
  426.     @actor_command_window.y = 128
  427.     @actor_command_window.back_opacity = 160
  428.     @actor_command_window.active = false
  429.     @actor_command_window.visible = false
  430.     # 生成其它窗口
  431.     @party_command_window = Window_PartyCommand.new
  432.     @help_window = Window_Help.new
  433.     @help_window.back_opacity = 160
  434.     @help_window.visible = false
  435.     @status_window = Window_BattleStatus.new
  436.     @message_window = Window_Message.new
  437.     # 生成活动块
  438.     @spriteset = Spriteset_Battle.new
  439.     # 初始化等待计数
  440.     @wait_count = 0
  441.     # 执行过渡
  442.     if $data_system.battle_transition == ""
  443.       Graphics.transition(20)
  444.     else
  445.       Graphics.transition(40, "Graphics/Transitions/" +
  446.         $data_system.battle_transition)
  447.     end
  448.     # 开始自由战斗回合
  449.     start_phase1
  450.     # 主循环
  451.     loop do
  452.       # 刷新游戏画面
  453.       Graphics.update
  454.       # 刷新输入信息
  455.       Input.update
  456.       # 刷新画面
  457.       update
  458.       # 如果画面切换的话就中断循环
  459.       if $scene != self
  460.         break
  461.       end
  462.     end
  463.     # 刷新地图
  464.     $game_map.refresh
  465.     # 准备过渡
  466.     Graphics.freeze
  467.     # 释放窗口
  468.     @actor_command_window.dispose
  469.     @party_command_window.dispose
  470.     @help_window.dispose
  471.     @status_window.dispose
  472.     @message_window.dispose
  473.     if @skill_window != nil
  474.       @skill_window.dispose
  475.     end
  476.     if @item_window != nil
  477.       @item_window.dispose
  478.     end
  479.     if @result_window != nil
  480.       @result_window.dispose
  481.     end
  482.     # 释放活动块
  483.     @spriteset.dispose
  484.     # 标题画面切换中的情况
  485.     if $scene.is_a?(Scene_Title)
  486.       # 淡入淡出画面
  487.       Graphics.transition
  488.       Graphics.freeze
  489.     end
  490.     # 战斗测试或者游戏结束以外的画面切换中的情况
  491.     if $BTEST and not $scene.is_a?(Scene_Gameover)
  492.       $scene = nil
  493.     end
  494.   end
  495.   
  496.   def update_phase2_escape
  497.     # 计算敌人速度的平均值
  498.     enemies_agi = 0
  499.     enemies_number = 0
  500.     for enemy in $game_troop.enemies
  501.       if enemy.exist?
  502.         enemies_agi += enemy.agi
  503.         enemies_number += 1
  504.       end
  505.     end
  506.     if enemies_number > 0
  507.       enemies_agi /= enemies_number
  508.     end
  509.     # 计算角色速度的平均值
  510.     actors_agi = 0
  511.     actors_number = 0
  512.     for actor in $game_party.actors
  513.       if actor.exist?
  514.         actors_agi += actor.agi
  515.         actors_number += 1
  516.       end
  517.     end
  518.     if actors_number > 0
  519.       actors_agi /= actors_number
  520.     end
  521.     # 逃跑成功判定
  522.     success = rand(100) < 50 * actors_agi / enemies_agi
  523.     # 成功逃跑的情况下
  524.     if success
  525.       for actor in $game_party.actors   
  526.   actor.cpb = 0
  527.    end
  528.       # 演奏逃跑 SE
  529.       $game_system.se_play($data_system.escape_se)
  530.       # 还原为战斗开始前的 BGM
  531.       $game_system.bgm_play($game_temp.map_bgm)
  532.       # 战斗结束
  533.       battle_end(1)
  534.     # 逃跑失败的情况下
  535.     else
  536.       # 清除全体同伴的行动
  537.       $game_party.clear_actions
  538.       # 开始主回合
  539.       start_phase4
  540.     end
  541.   end
  542.   
  543.   def phase3_setup_command_window
  544.     # 同伴指令窗口无效化
  545.     @party_command_window.active = false
  546.     @party_command_window.visible = false
  547.     # 角色指令窗口无效化,未满20禁止使用CP Hold
  548.     if @active_battler.level < MEANFREE_LEVEL_LIMIT
  549.      @actor_command_window.disable_item(4)
  550.       @notreadyforcpb = true
  551.    else
  552.      @actor_command_window.able_item(4)
  553.      @notreadyforcpb = false
  554.    end
  555.   for i in 0...@active_battler.skills.size
  556.      tempname = $data_skills[@active_battler.skills[i]].desc
  557.      tempskill = @active_battler.skills[i]
  558.     if tempname == CP_BURST_NAME
  559.       if @active_battler.cpb >= $data_skills[tempskill].userskill_cp_cost
  560.         @actor_command_window.ChangeName($data_system.words.skill+"&"+CP_BURST_ADD_COMMAND,1,Color.new(255, 255, 255, 255))
  561.       else
  562.         @actor_command_window.ChangeName($data_system.words.skill,1,Color.new(255, 255, 255, 255))
  563.       end
  564.     else
  565.       @actor_command_window.ChangeName($data_system.words.skill,1,Color.new(255, 255, 255, 255))
  566.     end  
  567.    end

  568.     @actor_command_window.active = true
  569.     @actor_command_window.visible = true
  570.     # 设置角色指令窗口的位置
  571.     @actor_command_window.x = @actor_index * 160
  572.     # 设置索引为 0
  573.     @actor_command_window.index = 0
  574.   end
  575.   
  576.   def update_phase3_basic_command
  577.    
  578.       # 按下 B 键的情况下
  579.     if Input.trigger?(Input::B)
  580.       # 演奏取消 SE
  581.       $game_system.se_play($data_system.cancel_se)
  582.       # 转向前一个角色的指令输入
  583.       phase3_prior_actor
  584.       return
  585.     end
  586.     # 按下 C 键的情况下
  587.     if Input.trigger?(Input::C)
  588.       # 角色指令窗口光标位置分之
  589.       case @actor_command_window.index
  590.       when 0  # 攻击
  591.         # 演奏确定 SE
  592.         $game_system.se_play($data_system.decision_se)
  593.         # 设置行动
  594.         @active_battler.current_action.kind = 0
  595.         @active_battler.current_action.basic = 0
  596.         # 开始选择敌人
  597.         start_enemy_select
  598.       when 1  # 特技
  599.         # 演奏确定 SE
  600.         $game_system.se_play($data_system.decision_se)
  601.         # 设置行动
  602.         @active_battler.current_action.kind = 1
  603.         # 开始选择特技
  604.         start_skill_select
  605.       when 2  # 防御
  606.         # 演奏确定 SE
  607.         $game_system.se_play($data_system.decision_se)
  608.         # 设置行动
  609.         @active_battler.current_action.kind = 0
  610.         @active_battler.current_action.basic = 1
  611.         # 转向下一位角色的指令输入
  612.         phase3_next_actor
  613.       when 3  # 物品
  614.         # 演奏确定 SE
  615.         $game_system.se_play($data_system.decision_se)
  616.         # 设置行动
  617.         @active_battler.current_action.kind = 2
  618.         # 开始选择物品
  619.         start_item_select
  620.       when 4 #CPhold
  621.          if    @notreadyforcpb == true
  622.           # 演奏冻结 SE
  623.           $game_system.se_play($data_system.buzzer_se)
  624.           return
  625.         end
  626.           $game_system.se_play($data_system.decision_se)
  627.         @active_battler.current_action.kind = 4
  628.         phase3_next_actor
  629.         end
  630.       return
  631.     end
  632.   end
  633.   
  634.   def update_phase4_step2
  635.     # 如果不是强制行动
  636.     unless @active_battler.current_action.forcing
  637.       # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下
  638.       if @active_battler.restriction == 2 or @active_battler.restriction == 3
  639.         # 设置行动为攻击
  640.         @active_battler.current_action.kind = 0
  641.         @active_battler.current_action.basic = 0
  642.       end
  643.       # 限制为 [不能行动] 的情况下
  644.       if @active_battler.restriction == 4
  645.         # 清除行动强制对像的战斗者
  646.         $game_temp.forcing_battler = nil
  647.         # 移至步骤 1
  648.         @phase4_step = 1
  649.         return
  650.       end
  651.     end
  652.     # 清除对像战斗者
  653.     @target_battlers = []
  654.     # 行动种类分支
  655.     case @active_battler.current_action.kind
  656.     when 0  # 基本
  657.       make_basic_action_result
  658.     when 1  # 特技
  659.       make_skill_action_result
  660.     when 2  # 物品
  661.       make_item_action_result
  662.      when 4
  663.       end
  664.     # 移至步骤 3
  665.     if @phase4_step == 2
  666.       @phase4_step = 3
  667.     end
  668.   end
  669.   
  670.   def make_skill_action_result
  671.     # 获取特技
  672.     @skill = $data_skills[@active_battler.current_action.skill_id]
  673.     # 如果不是强制行动
  674.     unless @active_battler.current_action.forcing
  675.       # 因为 SP 耗尽而无法使用的情况下
  676.       unless @active_battler.skill_can_use?(@skill.id)
  677.         # 清除强制行动对像的战斗者
  678.         $game_temp.forcing_battler = nil
  679.         # 移至步骤 1
  680.         @phase4_step = 1
  681.         return
  682.       end
  683.     end
  684.     # 消耗 SP
  685.     @active_battler.sp -= @skill.sp_cost
  686.     #消耗的CP Hold为技能定义大小
  687.     if @skill.desc == CP_BURST_NAME
  688.     @active_battler.cpb -= @skill.userskill_cp_cost  
  689.     end
  690.     # 刷新状态窗口
  691.     @status_window.refresh
  692.     # 在帮助窗口显示特技名
  693.     @help_window.set_text(@active_battler.name+"   "[email protected], 1)
  694.     # 设置动画 ID
  695.     @animation1_id = @skill.animation1_id
  696.     @animation2_id = @skill.animation2_id
  697.     # 设置公共事件 ID
  698.     @common_event_id = @skill.common_event_id
  699.     # 设置对像侧战斗者
  700.     set_target_battlers(@skill.scope)
  701.     # 应用特技效果
  702.     for target in @target_battlers
  703.       target.skill_effect(@active_battler, @skill)
  704.     end
  705.   end
  706.   
  707. end

  708. #==============================================================================
  709. # --- XRXS.コマンドウィンドウ?コマンド追加機構 ---
  710. #------------------------------------------------------------------------------
  711. # Window_Commandクラスに add_command メソッドを追加します。
  712. #==============================================================================
  713. module XRXS_Window_Command_Add_Command
  714. #--------------------------------------------------------------------------
  715. # ○ コマンドを追加
  716. #--------------------------------------------------------------------------
  717. def add_command(command)
  718. # 初期化されていない場合、無効化判別用の配列 @disabled の初期化
  719. #
  720. if @disabled == nil
  721. @disabled = []
  722. end
  723. if @commands.size != @disabled.size
  724. for i in [email protected]
  725. @disabled[i] = false
  726. end
  727. end
  728. #
  729. # 追加
  730. #
  731. @commands.push(command)
  732. @disabled.push(false)
  733. @item_max = @commands.size
  734. self.y -= 32
  735. self.height += 32
  736. self.contents.dispose
  737. self.contents = nil
  738. self.contents = Bitmap.new(self.width - 32, @item_max * 32)
  739. refresh
  740. for i in [email protected]
  741. if @disabled[i]
  742. disable_item(i)
  743. end
  744. end
  745. end
  746. #--------------------------------------------------------------------------
  747. # ○ 項目の無効化
  748. # index : 項目番号
  749. #--------------------------------------------------------------------------
  750. def disable_item(index)
  751. if @disabled == nil
  752. @disabled = []
  753. end
  754. @disabled[index] = true
  755. draw_item(index, disabled_color)
  756. end
  757. end
  758. class Window_Command < Window_Selectable
  759. #--------------------------------------------------------------------------
  760. # ○ インクルード
  761. #--------------------------------------------------------------------------
  762. include XRXS_Window_Command_Add_Command
  763. #--------------------------------------------------------------------------
  764. # ● 項目の無効化
  765. # index : 項目番号
  766. #--------------------------------------------------------------------------
  767. def disable_item(index)
  768. super
  769. end
  770. end
  771. #==============================================================================
  772. # □ Scene_Battle_CP
  773. #==============================================================================
  774. class Scene_Battle_CP
  775. #--------------------------------------------------------------------------
  776. # ○ 公開インスタンス変数
  777. #--------------------------------------------------------------------------
  778. attr_accessor :stop # CP加算ストップ
  779. #----------------------------------------------------------------------------
  780. # ○ オブジェクトの初期化
  781. #----------------------------------------------------------------------------
  782. def initialize
  783. @battlers = []
  784. @cancel = false
  785. @stop = false
  786. @agi_total = 0
  787. # 配列 count_battlers を初期化
  788. count_battlers = []
  789. # エネミーを配列 count_battlers に追加
  790. for enemy in $game_troop.enemies
  791. count_battlers.push(enemy)
  792. end
  793. # アクターを配列 count_battlers に追加
  794. for actor in $game_party.actors
  795. count_battlers.push(actor)
  796. end
  797. for battler in count_battlers
  798. @agi_total += battler.agi
  799. end
  800. for battler in count_battlers
  801. battler.cp = [[65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000, 0].max, 65535].min
  802. end
  803. end
  804. #----------------------------------------------------------------------------
  805. # ○ CPカウントアップ
  806. #----------------------------------------------------------------------------
  807. def update
  808. # ストップされているならリターン
  809. return if @stop
  810. #
  811. for battler in $game_party.actors + $game_troop.enemies
  812. # 行動出来なければ無視
  813. if battler.dead? == true
  814. battler.cp = 0
  815. next
  816. end
  817. battler.cp = [[battler.cp + BATTLE_SPEED * 4096 * battler.agi / @agi_total, 0].max, 65535].min
  818. end
  819. end
  820. #----------------------------------------------------------------------------
  821. # ○ CPカウントの開始
  822. #----------------------------------------------------------------------------
  823. def stop
  824. @cancel = true
  825. if @cp_thread != nil then
  826. @cp_thread.join
  827. @cp_thread = nil
  828. end
  829. end
  830. end

  831. #==============================================================================
  832. # ■ Game_Battler
  833. #==============================================================================
  834. class Game_Battler
  835. attr_accessor :now_guarding # 現在防御中フラグ
  836. attr_accessor :cp # 現在CP
  837. attr_accessor :slip_state_update_ban # スリップ?ステート自動処理の禁止
  838. #--------------------------------------------------------------------------
  839. # ○ CP の変更
  840. #--------------------------------------------------------------------------
  841. def cp=(p)
  842. @cp = [[p, 0].max, 65535].min
  843. end
  844. #--------------------------------------------------------------------------
  845. # ● 防御中判定 [ 再定義 ]
  846. #--------------------------------------------------------------------------
  847. def guarding?
  848. return @now_guarding
  849. end
  850. #--------------------------------------------------------------------------
  851. # ● コマンド入力可能判定
  852. #--------------------------------------------------------------------------
  853. alias xrxs_bp1_inputable? inputable?
  854. def inputable?
  855. bool = xrxs_bp1_inputable?
  856. return (bool and (@cp >= 65535))
  857. end
  858. #--------------------------------------------------------------------------
  859. # ● ステート [スリップダメージ] 判定
  860. #--------------------------------------------------------------------------
  861. alias xrxs_bp1_slip_damage? slip_damage?
  862. def slip_damage?
  863. return false if @slip_state_update_ban
  864. return xrxs_bp1_slip_damage?
  865. end
  866. #--------------------------------------------------------------------------
  867. # ● ステート自然解除 (ターンごとに呼び出し)
  868. #--------------------------------------------------------------------------
  869. alias xrxs_bp1_remove_states_auto remove_states_auto
  870. def remove_states_auto
  871. return if @slip_state_update_ban
  872. xrxs_bp1_remove_states_auto
  873. end
  874. end
  875. #==============================================================================
  876. # ■ Game_Actor
  877. #==============================================================================
  878. class Game_Actor < Game_Battler
  879. #--------------------------------------------------------------------------
  880. # ● セットアップ
  881. #--------------------------------------------------------------------------
  882. alias xrxs_bp1_setup setup
  883. def setup(actor_id)
  884. xrxs_bp1_setup(actor_id)
  885. @cp = 0
  886. @now_guarding = false
  887. @slip_state_update_ban = false
  888. end
  889. end
  890. #==============================================================================
  891. # ■ Game_Enemy
  892. #==============================================================================
  893. class Game_Enemy < Game_Battler
  894. #--------------------------------------------------------------------------
  895. # ● オブジェクト初期化
  896. #--------------------------------------------------------------------------
  897. alias xrxs_bp1_initialize initialize
  898. def initialize(troop_id, member_index)
  899. xrxs_bp1_initialize(troop_id, member_index)
  900. @cp = 0
  901. @now_guarding = false
  902. @slip_state_update_ban = false
  903. end
  904. end

  905. class Window_All < Window_Base
  906.   def initialize
  907.     super(0,0,640,480)
  908.     self.opacity = 0
  909.     self.contents = Bitmap.new(width - 32, height - 32)
  910.     self.z = 0
  911.     refresh
  912.   end
  913.   def refresh
  914.     self.contents.clear
  915.     for actor in $game_troop.enemies
  916.       next if !actor.exist?
  917.       draw_actor_cp_meter(actor, actor.screen_x-50, actor.screen_y-50, 60, 0)
  918.     end
  919.   end
  920.   #--------------------------------------------------------------------------
  921.   # ○ CPメーター の描画
  922.   #--------------------------------------------------------------------------
  923.   def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  924.     self.contents.font.color = system_color
  925.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  926.     if actor.cp == nil
  927.       actor.cp = 0
  928.     end
  929.     w = width * [actor.cp,65535].min / 65535
  930.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  931.     self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  932.     self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  933.     self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
  934.   end  
  935. end

  936. #==============================================================================
  937. # ■ Window_BattleStatus
  938. #==============================================================================
  939. class Window_BattleStatus < Window_Base
  940.   #--------------------------------------------------------------------------
  941.   # ○ 公開インスタンス変数
  942.   #--------------------------------------------------------------------------
  943.   attr_accessor :update_cp_only # CPメーターのみの更新
  944.   #--------------------------------------------------------------------------
  945.   # ● オブジェクト初期化
  946.   #--------------------------------------------------------------------------
  947.   alias xrxs_bp1_initialize initialize
  948.   def initialize
  949.     @update_cp_only = false
  950.     @wall = Window_All.new
  951.     xrxs_bp1_initialize
  952.   end
  953.   def dispose
  954.     super
  955.     @wall.dispose
  956.   end
  957.   #--------------------------------------------------------------------------
  958.   # ● リフレッシュ
  959.   #--------------------------------------------------------------------------
  960.   alias xrxs_bp1_refresh refresh
  961.   def refresh
  962.     unless @update_cp_only
  963.       xrxs_bp1_refresh
  964.     end
  965.     refresh_cp
  966.     @wall.refresh
  967.   end
  968.   #--------------------------------------------------------------------------
  969.   # ○ リフレッシュ(CPのみ)
  970.   #--------------------------------------------------------------------------
  971.   def refresh_cp
  972.     for i in 0...$game_party.actors.size
  973.     actor = $game_party.actors[i]
  974.     width = [self.width*3/4 / XRXS_BP1::MAX, 80].max
  975.     space = self.width / XRXS_BP1::MAX
  976.     case XRXS_BP1::ALIGN
  977.     when 0
  978.       actor_x = i * space + 4
  979.     when 1
  980.       actor_x = (space * ((XRXS_BP1::MAX - $game_party.actors.size)/2.0 + i)).floor
  981.     when 2
  982.       actor_x = (i + XRXS_BP1::MAX - $game_party.actors.size) * space + 4
  983.     end
  984.       actor_x += self.x
  985.       draw_actor_cp_meter(actor, actor_x, 96, width, 0)
  986.     end
  987.   end
  988.   #--------------------------------------------------------------------------
  989.   # ○ CPメーター の描画
  990.   #--------------------------------------------------------------------------
  991.   def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  992.     self.contents.font.color = system_color
  993.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  994.     if actor.cp == nil
  995.       actor.cp = 0
  996.       end
  997.     if actor.cpb == nil
  998.       actor.cpb = 0
  999.       end
  1000.       w = width * [actor.cp,65535].min / 65535
  1001.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  1002. if actor.cpb < 50
  1003.         self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  1004.     self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  1005.     self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))

  1006.       else
  1007.      if actor.cpb < 100
  1008.       self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 255, 255))
  1009.       self.contents.fill_rect(x, y+30, w,1, Color.new(240, 0, 240, 255))
  1010.       self.contents.fill_rect(x, y+31, w,1, Color.new(180, 0, 180, 255))

  1011.      else
  1012.       if actor.cpb < 150
  1013.       self.contents.fill_rect(x, y+29, w,1, Color.new(200, 0, 200, 255))
  1014.       self.contents.fill_rect(x, y+30, w,1, Color.new(180, 0, 180, 255))
  1015.       self.contents.fill_rect(x, y+31, w,1, Color.new(120, 0, 120, 255))
  1016.       else
  1017.       if actor.cpb < 200
  1018.       self.contents.fill_rect(x, y+29, w,1, Color.new(255, 50, 0, 255))
  1019.       self.contents.fill_rect(x, y+30, w,1, Color.new(192, 30, 0, 255))
  1020.       self.contents.fill_rect(x, y+31, w,1, Color.new(128, 10, 0, 255))
  1021.       else
  1022.         self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 255, 200))
  1023.       self.contents.fill_rect(x, y+30, w,1, Color.new(240, 240, 240, 200))
  1024.       self.contents.fill_rect(x, y+31, w,1, Color.new(180, 180, 180, 200))
  1025.       end
  1026.       end   
  1027.     end
  1028.   end
  1029. end

  1030. end
  1031. #==============================================================================
  1032. # ■ Scene_Battle
  1033. #==============================================================================
  1034. class Scene_Battle
  1035. #--------------------------------------------------------------------------
  1036. # ● フレーム更新
  1037. #--------------------------------------------------------------------------
  1038. alias xrxs_bp1_update update
  1039. def update
  1040. xrxs_bp1_update
  1041. # CP更新
  1042. @cp_thread.update
  1043. end
  1044. #--------------------------------------------------------------------------
  1045. # ● バトル終了
  1046. # result : 結果 (0:勝利 1:敗北 2:逃走)
  1047. #--------------------------------------------------------------------------
  1048. alias xrxs_bp1_battle_end battle_end
  1049. def battle_end(result)
  1050. # CPカウントを停止する
  1051. @cp_thread.stop
  1052. # 呼び戻す
  1053. xrxs_bp1_battle_end(result)
  1054. end
  1055. #--------------------------------------------------------------------------
  1056. # ● プレバトルフェーズ開始
  1057. #--------------------------------------------------------------------------
  1058. alias xrxs_bp1_start_phase1 start_phase1
  1059. def start_phase1
  1060. @agi_total = 0
  1061. # CP加算を開始する
  1062. @cp_thread = Scene_Battle_CP.new
  1063. # インデックスを計算
  1064. @cp_escape_actor_command_index = @actor_command_window.height/32 - 1
  1065. # アクターコマンドウィンドウに追加
  1066. @actor_command_window.add_command("逃跑")
  1067. if !$game_temp.battle_can_escape
  1068. @actor_command_window.disable_item(@cp_escape_actor_command_index)
  1069. end
  1070. # 呼び戻す
  1071. xrxs_bp1_start_phase1
  1072. end
  1073. #--------------------------------------------------------------------------
  1074. # ● パーティコマンドフェーズ開始
  1075. #--------------------------------------------------------------------------
  1076. alias xrxs_bp1_start_phase2 start_phase2
  1077. def start_phase2
  1078. xrxs_bp1_start_phase2
  1079. @party_command_window.active = false
  1080. @party_command_window.visible = false
  1081. # CP加算を再開する
  1082. @cp_thread.stop = false
  1083. # 次へ
  1084. start_phase3
  1085. end
  1086. #--------------------------------------------------------------------------
  1087. # ● アクターコマンドウィンドウのセットアップ
  1088. #--------------------------------------------------------------------------
  1089. alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
  1090. def phase3_setup_command_window
  1091. # CPスレッドを一時停止する
  1092. @cp_thread.stop = true
  1093. # ウィンドウのCP更新
  1094. @status_window.refresh_cp
  1095. # @active_battlerの防御を解除
  1096. @active_battler.now_guarding = false
  1097. # 効果音の再生
  1098. Audio.se_play(DATA_SYSTEM_COMMAND_UP_SE) if DATA_SYSTEM_COMMAND_UP_SE != ""
  1099. # 呼び戻す
  1100. xrxs_bp1_phase3_setup_command_window
  1101. end
  1102. #--------------------------------------------------------------------------
  1103. # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  1104. #--------------------------------------------------------------------------
  1105. alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
  1106. def update_phase3_basic_command
  1107. # C ボタンが押された場合
  1108. if Input.trigger?(Input::C)
  1109. # アクターコマンドウィンドウのカーソル位置で分岐
  1110. case @actor_command_window.index
  1111. when @cp_escape_actor_command_index # 逃げる
  1112. if $game_temp.battle_can_escape
  1113. # 決定 SE を演奏
  1114. $game_system.se_play($data_system.decision_se)
  1115. # アクションを設定
  1116. @active_battler.current_action.kind = 0
  1117. @active_battler.current_action.basic = 4
  1118. # 次のアクターのコマンド入力へ
  1119. phase3_next_actor
  1120. else
  1121. # ブザー SE を演奏
  1122. $game_system.se_play($data_system.buzzer_se)
  1123. end
  1124. return
  1125. end
  1126. end
  1127. xrxs_bsp1_update_phase3_basic_command
  1128. end
  1129. #--------------------------------------------------------------------------
  1130. # ● メインフェーズ開始
  1131. #--------------------------------------------------------------------------
  1132. alias xrxs_bp1_start_phase4 start_phase4
  1133. def start_phase4
  1134. # 呼び戻す
  1135. xrxs_bp1_start_phase4
  1136. # CPスレッドを一時停止する
  1137. unless @action_battlers.empty?
  1138. @cp_thread.stop = true
  1139. end
  1140. end
  1141. #--------------------------------------------------------------------------
  1142. # ● 行動順序作成
  1143. #--------------------------------------------------------------------------
  1144. alias xrxs_bp1_make_action_orders make_action_orders
  1145. def make_action_orders
  1146. xrxs_bp1_make_action_orders
  1147. # 全員のCPを確認
  1148. exclude_battler = []
  1149. for battler in @action_battlers
  1150. # CPが不足している場合は @action_battlers から除外する
  1151. if battler.cp < 65535
  1152. exclude_battler.push(battler)
  1153. end
  1154. end
  1155. @action_battlers -= exclude_battler
  1156. end
  1157. #--------------------------------------------------------------------------
  1158. # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  1159. #--------------------------------------------------------------------------
  1160. alias xrxs_bp1_update_phase4_step1 update_phase4_step1
  1161. def update_phase4_step1
  1162. # 初期化
  1163. @phase4_act_continuation = 0
  1164. # 勝敗判定
  1165. if judge
  1166. @cp_thread.stop
  1167. # 勝利または敗北の場合 : メソッド終了
  1168. return
  1169. end
  1170. # 未行動バトラー配列の先頭から取得
  1171. @active_battler = @action_battlers[0]
  1172. # ステータス更新をCPだけに限定。
  1173. @status_window.update_cp_only = true
  1174. # ステート更新を禁止。
  1175. @active_battler.slip_state_update_ban = true if @active_battler != nil
  1176. # 戻す
  1177. xrxs_bp1_update_phase4_step1
  1178. # @status_windowがリフレッシュされなかった場合は手動でリフレッシュ(CPのみ)
  1179. if @phase4_step != 2
  1180. # リフレッシュ
  1181. @status_window.refresh
  1182. # 軽量化:たったコレだけΣ(?w?
  1183. Graphics.frame_reset
  1184. end
  1185. # 禁止を解除
  1186. @status_window.update_cp_only = false
  1187. @active_battler.slip_state_update_ban = false if @active_battler != nil
  1188. end
  1189. #--------------------------------------------------------------------------
  1190. # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  1191. #--------------------------------------------------------------------------
  1192. alias xrxs_bp1_update_phase4_step2 update_phase4_step2
  1193. def update_phase4_step2
  1194. # 強制アクションでなければ
  1195. unless @active_battler.current_action.forcing
  1196. # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
  1197. if @active_battler.restriction == 2 or @active_battler.restriction == 3
  1198. # アクションに攻撃を設定
  1199. @active_battler.current_action.kind = 0
  1200. @active_battler.current_action.basic = 0
  1201. end
  1202. # 制約が [行動できない] の場合
  1203. if @active_battler.restriction == 4
  1204. # アクション強制対象のバトラーをクリア
  1205. $game_temp.forcing_battler = nil
  1206. if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
  1207. # ステート自然解除
  1208. @active_battler.remove_states_auto
  1209. # CP消費
  1210. @active_battler.cp -= 65535
  1211. # ステータスウィンドウをリフレッシュ
  1212. @status_window.refresh
  1213. end
  1214. # ステップ 1 に移行
  1215. @phase4_step = 1
  1216. return
  1217. end
  1218. end
  1219. # アクションの種別で分岐
  1220. case @active_battler.current_action.kind
  1221. when 0
  1222. # 攻撃?防御?逃げる?何もしない時の共通消費CP
  1223. @active_battler.cp -= CP_COST_BASIC_ACTIONS if @phase4_act_continuation == 0
  1224. when 1
  1225.   #CP Burst不消耗CP
  1226. if $data_skills[@active_battler.current_action.skill_id].desc == CP_BURST_NAME
  1227.   else
  1228. # スキル使用時の消費CP
  1229. @active_battler.cp -= ($data_skills[@active_battler.current_action.skill_id].userskill_cp_cost * 65535 / 100) if @phase4_act_continuation == 0
  1230. end
  1231. when 2  
  1232. # アイテム使用時の消費CP
  1233. @active_battler.cp -= CP_COST_ITEM_ACTION if @phase4_act_continuation == 0
  1234. when 4 #CPBURST
  1235. @help_window.set_text(@active_battler.name+"   "+CP_HOLD_NAME+"!!", 1)
  1236. @active_battler.cpb += CP_HOLD_GET_CPB
  1237. @active_battler.cp -= CP_COST_CP_BURST if @phase4_act_continuation == 0
  1238. end
  1239. # ステート自然解除
  1240. @active_battler.remove_states_auto
  1241. # 呼び戻す
  1242. xrxs_bp1_update_phase4_step2
  1243. end
  1244.   #--------------------------------------------------------------------------
  1245.   # ● 基本アクション 結果作成
  1246.   #--------------------------------------------------------------------------
  1247.   alias xrxs_bp1_make_basic_action_result make_basic_action_result
  1248.   def make_basic_action_result
  1249.     # 攻撃の場合
  1250.     if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
  1251.       @active_battler.cp -= CP_COST_BASIC_ATTACK # 攻撃時のCP消費
  1252.     end
  1253.     # 防御の場合
  1254.     if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
  1255.       @active_battler.cp -= CP_COST_BASIC_GUARD # 防御時のCP消費
  1256.       # @active_battlerの防御をON
  1257.       @active_battler.now_guarding = true
  1258.     end
  1259.     # 敵の逃げるの場合
  1260.     if @active_battler.is_a?(Game_Enemy) and
  1261.       @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
  1262.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  1263.     end
  1264.     # 何もしないの場合
  1265.     if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
  1266.       @active_battler.cp -= CP_COST_BASIC_NOTHING # 何もしない時のCP消費
  1267.     end
  1268.     # 逃げるの場合
  1269.     if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
  1270.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  1271.       # 逃走可能ではない場合
  1272.       if $game_temp.battle_can_escape == false
  1273.         # ブザー SE を演奏
  1274.         $game_system.se_play($data_system.buzzer_se)
  1275.         return
  1276.       end
  1277.       # 逃走処理
  1278.       update_phase2_escape
  1279.       return
  1280.     end
  1281.     # 呼び戻す
  1282.     xrxs_bp1_make_basic_action_result
  1283.   end
  1284.   #--------------------------------------------------------------------------
  1285.   # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  1286.   #--------------------------------------------------------------------------
  1287.   alias xrxs_bp1_update_phase4_step6 update_phase4_step6
  1288.   def update_phase4_step6
  1289.     # スリップダメージ
  1290.     if @active_battler.hp > 0 and @active_battler.slip_damage?
  1291.       @active_battler.slip_damage_effect
  1292.       @active_battler.damage_pop = true
  1293.       # ステータスウィンドウをリフレッシュ
  1294.       @status_window.refresh
  1295.     end
  1296.     # 呼び戻す
  1297.     xrxs_bp1_update_phase4_step6
  1298.   end
  1299. end


  1300. #==============================================================================
  1301. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  1302. #==============================================================================  
复制代码

最佳答案

咱在咱的设计素描书上看到有“柳笛”这个名字,恩~到底有怎样的关系呢?
[img]http://rpg.blue/data/attachment/forum/month_0910/09102318341719b34b80b536d4.gif[/img]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2009-4-11
帖子
131
2
发表于 2009-11-28 10:40:38 | 只看该作者
CP 加 体力.rar (2.82 MB, 下载次数: 175)
改好了!
回复

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-7-22
帖子
14
3
发表于 2009-11-29 09:42:03 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
5 小时
注册时间
2009-4-11
帖子
131
4
发表于 2009-11-29 12:18:57 | 只看该作者
改了1个多小时 终于改好了
下面是脚本:


#==============================================================================

# 本脚本来自www.66RPG.com,使用和转载请保留此信息

#==============================================================================

## ▼▲▼ XRXS_BP 1. CP制導入 ver..23 ▼▲▼

# by 桜雅 在土, 和希

#========================================================

# 敌人显示CP 修改:柳柳

#========================================================

#========================================================

# 特技CP定制ActiveCP 1.00 修改: FantasyDR、面粉、SailCat

#========================================================

#========================================================

# CP Burst系统1.01 BY 面粉

#========================================================

#

# 使用 CP Burst 和 CP Hold 的等级限制,这里默认是15级

#

# !!角色学会 CP Burst 技能的等级 必须大于等于此等级,否则容易出现错误 !!

#

MEANFREE_LEVEL_LIMIT = 10

#

#

# 攻击者获得的CPB点数

ATTACKER_CPB_GET = 10

#

# 被攻击者获得的CPB点数

TARGET_CPB_GET = 5

#

# 默认的 CP Hold 命令名称

CP_HOLD_NAME = "CP Hold"

#

#

# 默认的 CP Burst 名称。

#

# !!如果想要修改为别的名称,那么数据库内的技能说明中,!!

#

# !! @之后的部分也要改为相应字符串,否则会出错 !!

CP_BURST_NAME = "CP Burst"

#

#

# 命令窗口显示的提示名称

CP_BURST_ADD_COMMAND = "Burst"

#

#

# 使用CP Hold 所能获得的CP点数

CP_HOLD_GET_CPB = 50

#

#==============================================================================

# □ カスタマイズポイント

#==============================================================================

module XRXS_BP1

#

# 对齐方式。0:左 1:中央 2:右

#

ALIGN = 0

#

#

# 人数

#

MAX = 4

end

class Scene_Battle_CP

#

# 战斗速度

#

BATTLE_SPEED = 2.0

#

# 战斗开始的时候气槽百分比

#

START_CP_PERCENT = 0

end



class Scene_Battle



# 效果音效,可以自己添加

DATA_SYSTEM_COMMAND_UP_SE = ""



# 各项数值功能消耗的CP值

CP_COST_BASIC_ACTIONS = 0 # 基础共同

CP_COST_SKILL_ACTION = 65535 # 技能

CP_COST_ITEM_ACTION = 65535 # 物品

CP_COST_BASIC_ATTACK = 65535 # 攻撃

CP_COST_BASIC_GUARD = 65535 # 防御

CP_COST_BASIC_NOTHING = 65535 # 不做任何事情

CP_COST_BASIC_ESCAPE = 65535 # 逃跑

CP_COST_CP_BURST = 65535 #CP Hold

#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

MP_COST_SKILL_ACTION = 10 # 技能

MP_COST_ITEM_ACTION = 10 # 物品

MP_COST_BASIC_ATTACK = 5 # 攻撃

MP_COST_BASIC_GUARD = 5 # 防御

#@active_battler.mp -= 数值 # 体力加减方法

#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
end

#===============================================================

# 追加并重写相关定义

#===============================================================

class Game_Battler

  def cpb=(cpb)     

  @cpb = [cpb, 0].max

end

  attr_accessor :cpb

  alias new_battler_initialize initialize

  def initialize

  @cpb = 0

     new_battler_initialize

  end

end

module RPG

class Skill

   def name

     name = @name.split(/,/)[0]

     return name != nil ? name : ""

   end

   def description

     description = @description.split(/@/)[0]

     return description != nil ? description : ''

   end

   def desc

     desc = @description.split(/@/)[1]

     return desc != nil ? desc : "none"

   end

   def userskill_cp_cost

    name = @name.split(/,/)[1]

    return name != nil ? name.to_i.abs : 0

  end

end

end

#==================================================

# 为命令窗口类增加新的方法

#==================================================

class Window_Command < Window_Selectable

  def ChangeName(string,n,colour)

   @commands[n] = string

   draw_item(n, colour)

   refresh

   end

  

  def SuperChange(width, commands)

  self.width = width

  self.height = commands.size*32+32

  @item_max = commands.size

  @commands = commands

  self.contents = Bitmap.new(width - 32, @item_max * 32)

  refresh

  self.index = 0

  end



def able_item(index)

    draw_item(index, normal_color)

  end

end

#--------------------------------------------------------------------------

# 获取CP Burst使用时机

#--------------------------------------------------------------------------

class Game_Battler

  #--------------------------------------------------------------------------

  # ● 可以使用特技的判定

  #     skill_id : 特技 ID

  #--------------------------------------------------------------------------

  def skill_can_use?(skill_id)

    # SP 不足的情况下不能使用

    if $data_skills[skill_id].sp_cost > self.sp

      return false

    end

    # 战斗不能的情况下不能使用

    if dead?

      return false

    end

    # 沉默状态的情况下、物理特技以外的特技不能使用

    if $data_skills[skill_id].atk_f == 0 and self.restriction == 1

      return false

    end

   

    # 获取可以使用的时机

    occasion = $data_skills[skill_id].occasion

#------------------------------------------------------

# 追加

#------------------------------------------------------

    if $data_skills[skill_id].desc == CP_BURST_NAME

  if self.cpb == nil

    self.cpb = 0

    end

  if self.cpb < $data_skills[skill_id].userskill_cp_cost

    return false

    end

  end

#-------------------------------------------------------

    # 战斗中的情况下

    if $game_temp.in_battle

      # [平时] 或者是 [战斗中] 可以使用

      return (occasion == 0 or occasion == 1)

    # 不是战斗中的情况下

    else

      # [平时] 或者是 [菜单中] 可以使用

      return (occasion == 0 or occasion == 2)

    end

   

   

  end

end



#=====================================================================

# 增加攻击以及挨打获得CPB点数的效果,道具除外

#=====================================================================

class Game_Battler

  

  #--------------------------------------------------------------------------

  # ● 应用通常攻击效果

  #     attacker : 攻击者 (battler)

  #--------------------------------------------------------------------------

  def attack_effect(attacker)

    # 清除会心一击标志

    self.critical = false

    # 第一命中判定

    hit_result = (rand(100) < attacker.hit)

    # 命中的情况下

    if hit_result == true

      # 计算基本伤害

      atk = [attacker.atk - self.pdef / 2, 0].max

      self.damage = atk * (20 + attacker.str) / 20

      # 属性修正

      self.damage *= elements_correct(attacker.element_set)

      self.damage /= 100

      # 伤害符号正确的情况下

      if self.damage > 0

        # 会心一击修正

        if rand(100) < 4 * attacker.dex / self.agi

          self.damage *= 2

          self.critical = true

        end

        # 防御修正

        if self.guarding?

          self.damage /= 2

        end

      end

      # 分散

      if self.damage.abs > 0

        amp = [self.damage.abs * 15 / 100, 1].max

        self.damage += rand(amp+1) + rand(amp+1) - amp

      end

      # 第二命中判定

      eva = 8 * self.agi / attacker.dex + self.eva

      hit = self.damage < 0 ? 100 : 100 - eva

      hit = self.cant_evade? ? 100 : hit

      hit_result = (rand(100) < hit)

    end

    # 命中的情况下

    if hit_result == true

      if self.damage > 0

        if attacker.is_a?(Game_Enemy)

          if self.is_a?(Game_Enemy)

          else

            if self.level == nil

             #  attr_reader   :level

            end

            if self.level >= MEANFREE_LEVEL_LIMIT

            self.cpb += TARGET_CPB_GET

            end

          end

        else

          if attacker.level >= MEANFREE_LEVEL_LIMIT

          attacker.cpb += ATTACKER_CPB_GET

          end

        end

       end  

      # 状态冲击解除

      remove_states_shock

      # HP 的伤害计算

      self.hp -= self.damage

      # 状态变化

      @state_changed = false

      states_plus(attacker.plus_state_set)

      states_minus(attacker.minus_state_set)

    # Miss 的情况下

    else

      # 伤害设置为 "Miss"

      self.damage = "Miss"

      # 清除会心一击标志

      self.critical = false

    end

    # 过程结束

    return true

  end

  #--------------------------------------------------------------------------

  # ● 应用特技效果

  #     user  : 特技的使用者 (battler)

  #     skill : 特技

  #--------------------------------------------------------------------------

  def skill_effect(user, skill)

    # 清除会心一击标志

    self.critical = false

    # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、

    # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下

    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or

       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)

      # 过程结束

      return false

    end

    # 清除有效标志

    effective = false

    # 公共事件 ID 是有效的情况下,设置为有效标志

    effective |= skill.common_event_id > 0

    # 第一命中判定

    hit = skill.hit

    if skill.atk_f > 0

      hit *= user.hit / 100

    end

    hit_result = (rand(100) < hit)

    # 不确定的特技的情况下设置为有效标志

    effective |= hit < 100

    # 命中的情况下

    if hit_result == true

      # 计算威力

      power = skill.power + user.atk * skill.atk_f / 100

      if power > 0

        power -= self.pdef * skill.pdef_f / 200

        power -= self.mdef * skill.mdef_f / 200

        power = [power, 0].max

      end

      # 计算倍率

      rate = 20

      rate += (user.str * skill.str_f / 100)

      rate += (user.dex * skill.dex_f / 100)

      rate += (user.agi * skill.agi_f / 100)

      rate += (user.int * skill.int_f / 100)

      # 计算基本伤害

      self.damage = power * rate / 20

      # 属性修正

      self.damage *= elements_correct(skill.element_set)

      self.damage /= 100

      # 伤害符号正确的情况下

      if self.damage > 0

        # 防御修正

        if self.guarding?

          self.damage /= 2

        end

      end

      # 分散

      if skill.variance > 0 and self.damage.abs > 0

        amp = [self.damage.abs * skill.variance / 100, 1].max

        self.damage += rand(amp+1) + rand(amp+1) - amp

      end

      # 第二命中判定

      eva = 8 * self.agi / user.dex + self.eva

      hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100

      hit = self.cant_evade? ? 100 : hit

      hit_result = (rand(100) < hit)

      # 不确定的特技的情况下设置为有效标志

      effective |= hit < 100

    end

    # 命中的情况下

    if hit_result == true

      if self.damage > 0

        if user.is_a?(Game_Enemy)

          if self.is_a?(Game_Enemy)

          else

            if self.level == nil

             #  attr_reader   :level

            end

            if self.level >= MEANFREE_LEVEL_LIMIT

            self.cpb += TARGET_CPB_GET  

            end

          end

        else

          if user.level >= MEANFREE_LEVEL_LIMIT

          user.cpb += ATTACKER_CPB_GET

          end

        end

       end

      # 威力 0 以外的物理攻击的情况下

      if skill.power != 0 and skill.atk_f > 0

        # 状态冲击解除

        remove_states_shock

        # 设置有效标志

        effective = true

      end

      # HP 的伤害减法运算

      last_hp = self.hp

      self.hp -= self.damage

      effective |= self.hp != last_hp

      # 状态变化

      @state_changed = false

      effective |= states_plus(skill.plus_state_set)

      effective |= states_minus(skill.minus_state_set)

      # 威力为 0 的场合

      if skill.power == 0

        # 伤害设置为空的字串

        self.damage = ""

        # 状态没有变化的情况下

        unless @state_changed

          # 伤害设置为 "Miss"

          self.damage = "Miss"

        end

      end

    # Miss 的情况下

    else

      # 伤害设置为 "Miss"

      self.damage = "Miss"

    end

    # 不在战斗中的情况下

    unless $game_temp.in_battle

      # 伤害设置为 nil

      self.damage = nil

    end

    # 过程结束

    return effective

  end

end



#===========================================================================

# 对于战斗画面的部分重新定义

#===========================================================================



class Scene_Battle

  #--------------------------------------------------------------------------

  # ● 主处理

  #--------------------------------------------------------------------------

def main

    # 初始化战斗用的各种暂时数据

    $game_temp.in_battle = true

    $game_temp.battle_turn = 0

    $game_temp.battle_event_flags.clear

    $game_temp.battle_abort = false

    $game_temp.battle_main_phase = false

    $game_temp.battleback_name = $game_map.battleback_name

    $game_temp.forcing_battler = nil

    # 初始化战斗用事件解释器

    $game_system.battle_interpreter.setup(nil, 0)

    # 准备队伍

    @troop_id = $game_temp.battle_troop_id

    $game_troop.setup(@troop_id)

    # 生成角色命令窗口

    s1 = $data_system.words.attack

    s2 = $data_system.words.skill

    s3 = $data_system.words.guard

    s4 = $data_system.words.item

    s5 = CP_HOLD_NAME

    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])

    @actor_command_window.y = 128

    @actor_command_window.back_opacity = 160

    @actor_command_window.active = false

    @actor_command_window.visible = false

    # 生成其它窗口

    @party_command_window = Window_PartyCommand.new

    @help_window = Window_Help.new

    @help_window.back_opacity = 160

    @help_window.visible = false

    @status_window = Window_BattleStatus.new

    @message_window = Window_Message.new

    # 生成活动块

    @spriteset = Spriteset_Battle.new

    # 初始化等待计数

    @wait_count = 0

    # 执行过渡

    if $data_system.battle_transition == ""

      Graphics.transition(20)

    else

      Graphics.transition(40, "Graphics/Transitions/" +

        $data_system.battle_transition)

    end

    # 开始自由战斗回合

    start_phase1

    # 主循环

    loop do

      # 刷新游戏画面

      Graphics.update

      # 刷新输入信息

      Input.update

      # 刷新画面

      update

      # 如果画面切换的话就中断循环

      if $scene != self

        break

      end

    end

    # 刷新地图

    $game_map.refresh

    # 准备过渡

    Graphics.freeze

    # 释放窗口

    @actor_command_window.dispose

    @party_command_window.dispose

    @help_window.dispose

    @status_window.dispose

    @message_window.dispose

    if @skill_window != nil

      @skill_window.dispose

    end

    if @item_window != nil

      @item_window.dispose

    end

    if @result_window != nil

      @result_window.dispose

    end

    # 释放活动块

    @spriteset.dispose

    # 标题画面切换中的情况

    if $scene.is_a?(Scene_Title)

      # 淡入淡出画面

      Graphics.transition

      Graphics.freeze

    end

    # 战斗测试或者游戏结束以外的画面切换中的情况

    if $BTEST and not $scene.is_a?(Scene_Gameover)

      $scene = nil

    end

  end

  

  def update_phase2_escape

    # 计算敌人速度的平均值

    enemies_agi = 0

    enemies_number = 0

    for enemy in $game_troop.enemies

      if enemy.exist?

        enemies_agi += enemy.agi

        enemies_number += 1

      end

    end

    if enemies_number > 0

      enemies_agi /= enemies_number

    end

    # 计算角色速度的平均值

    actors_agi = 0

    actors_number = 0

    for actor in $game_party.actors

      if actor.exist?

        actors_agi += actor.agi

        actors_number += 1

      end

    end

    if actors_number > 0

      actors_agi /= actors_number

    end

    # 逃跑成功判定

    success = rand(100) < 50 * actors_agi / enemies_agi

    # 成功逃跑的情况下

    if success

      for actor in $game_party.actors   

  actor.cpb = 0

   end

      # 演奏逃跑 SE

      $game_system.se_play($data_system.escape_se)

      # 还原为战斗开始前的 BGM

      $game_system.bgm_play($game_temp.map_bgm)

      # 战斗结束

      battle_end(1)

    # 逃跑失败的情况下

    else

      # 清除全体同伴的行动

      $game_party.clear_actions

      # 开始主回合

      start_phase4

    end

  end

  

  def phase3_setup_command_window

    # 同伴指令窗口无效化

    @party_command_window.active = false

    @party_command_window.visible = false

    # 角色指令窗口无效化,未满20禁止使用CP Hold

    if @active_battler.level < MEANFREE_LEVEL_LIMIT

     @actor_command_window.disable_item(4)

      @notreadyforcpb = true

   else

     @actor_command_window.able_item(4)

     @notreadyforcpb = false

   end

  for i in 0...@active_battler.skills.size

     tempname = $data_skills[@active_battler.skills].desc

     tempskill = @active_battler.skills

    if tempname == CP_BURST_NAME

      if @active_battler.cpb >= $data_skills[tempskill].userskill_cp_cost

        @actor_command_window.ChangeName($data_system.words.skill+"&"+CP_BURST_ADD_COMMAND,1,Color.new(255, 255, 255, 255))

      else

        @actor_command_window.ChangeName($data_system.words.skill,1,Color.new(255, 255, 255, 255))

      end

    else

      @actor_command_window.ChangeName($data_system.words.skill,1,Color.new(255, 255, 255, 255))

    end  

   end



    @actor_command_window.active = true

    @actor_command_window.visible = true

    # 设置角色指令窗口的位置

    @actor_command_window.x = @actor_index * 160

    # 设置索引为 0

    @actor_command_window.index = 0

  end

  

  def update_phase3_basic_command

   

      # 按下 B 键的情况下

    if Input.trigger?(Input::B)

      # 演奏取消 SE

      $game_system.se_play($data_system.cancel_se)

      # 转向前一个角色的指令输入

      phase3_prior_actor

      return

    end

    # 按下 C 键的情况下

    if Input.trigger?(Input::C)

      # 角色指令窗口光标位置分之

      case @actor_command_window.index

      when 0  # 攻击

        # 演奏确定 SE

        $game_system.se_play($data_system.decision_se)

        # 设置行动

        @active_battler.current_action.kind = 0

        @active_battler.current_action.basic = 0

        # 开始选择敌人

        start_enemy_select

      when 1  # 特技

        # 演奏确定 SE

        $game_system.se_play($data_system.decision_se)

        # 设置行动

        @active_battler.current_action.kind = 1

        # 开始选择特技

        start_skill_select

      when 2  # 防御

        # 演奏确定 SE

        $game_system.se_play($data_system.decision_se)

        # 设置行动

        @active_battler.current_action.kind = 0

        @active_battler.current_action.basic = 1

        # 转向下一位角色的指令输入

        phase3_next_actor

      when 3  # 物品

        # 演奏确定 SE

        $game_system.se_play($data_system.decision_se)

        # 设置行动

        @active_battler.current_action.kind = 2

        # 开始选择物品

        start_item_select

      when 4 #CPhold

         if    @notreadyforcpb == true

          # 演奏冻结 SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

          $game_system.se_play($data_system.decision_se)

        @active_battler.current_action.kind = 4

        phase3_next_actor

        end

      return

    end

  end

  

  def update_phase4_step2

    # 如果不是强制行动

    unless @active_battler.current_action.forcing

      # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下

      if @active_battler.restriction == 2 or @active_battler.restriction == 3

        # 设置行动为攻击

        @active_battler.current_action.kind = 0

        @active_battler.current_action.basic = 0

      end

      # 限制为 [不能行动] 的情况下

      if @active_battler.restriction == 4

        # 清除行动强制对像的战斗者

        $game_temp.forcing_battler = nil

        # 移至步骤 1

        @phase4_step = 1

        return

      end

    end

    # 清除对像战斗者

    @target_battlers = []

    # 行动种类分支

    case @active_battler.current_action.kind

    when 0  # 基本

      make_basic_action_result

    when 1  # 特技

      make_skill_action_result

    when 2  # 物品

      make_item_action_result

     when 4

      end

    # 移至步骤 3

    if @phase4_step == 2

      @phase4_step = 3

    end

  end

  

  def make_skill_action_result

    # 获取特技

    @skill = $data_skills[@active_battler.current_action.skill_id]

    # 如果不是强制行动

    unless @active_battler.current_action.forcing

      # 因为 SP 耗尽而无法使用的情况下

      unless @active_battler.skill_can_use?(@skill.id)

        # 清除强制行动对像的战斗者

        $game_temp.forcing_battler = nil

        # 移至步骤 1

        @phase4_step = 1

        return

      end

    end

    # 消耗 SP

    @active_battler.sp -= @skill.sp_cost

    #消耗的CP Hold为技能定义大小

    if @skill.desc == CP_BURST_NAME

    @active_battler.cpb -= @skill.userskill_cp_cost  

    end

    # 刷新状态窗口

    @status_window.refresh

    # 在帮助窗口显示特技名

    @help_window.set_text(@active_battler.name+"   "[email protected], 1)

    # 设置动画 ID

    @animation1_id = @skill.animation1_id

    @animation2_id = @skill.animation2_id

    # 设置公共事件 ID

    @common_event_id = @skill.common_event_id

    # 设置对像侧战斗者

    set_target_battlers(@skill.scope)

    # 应用特技效果

    for target in @target_battlers

      target.skill_effect(@active_battler, @skill)

    end

  end

  

end



#==============================================================================

# --- XRXS.コマンドウィンドウ?コマンド追加機構 ---

#------------------------------------------------------------------------------

# Window_Commandクラスに add_command メソッドを追加します。

#==============================================================================

module XRXS_Window_Command_Add_Command

#--------------------------------------------------------------------------

# ○ コマンドを追加

#--------------------------------------------------------------------------

def add_command(command)

# 初期化されていない場合、無効化判別用の配列 @disabled の初期化

#

if @disabled == nil

@disabled = []

end

if @commands.size != @disabled.size

for i in [email protected]

@disabled = false

end

end

#

# 追加

#

@commands.push(command)

@disabled.push(false)

@item_max = @commands.size

self.y -= 32

self.height += 32

self.contents.dispose

self.contents = nil

self.contents = Bitmap.new(self.width - 32, @item_max * 32)

refresh

for i in [email protected]

if @disabled

disable_item(i)

end

end

end

#--------------------------------------------------------------------------

# ○ 項目の無効化

# index : 項目番号

#--------------------------------------------------------------------------

def disable_item(index)

if @disabled == nil

@disabled = []

end

@disabled[index] = true

draw_item(index, disabled_color)

end

end

class Window_Command < Window_Selectable

#--------------------------------------------------------------------------

# ○ インクルード

#--------------------------------------------------------------------------

include XRXS_Window_Command_Add_Command

#--------------------------------------------------------------------------

# ● 項目の無効化

# index : 項目番号

#--------------------------------------------------------------------------

def disable_item(index)

super

end

end

#==============================================================================

# □ Scene_Battle_CP

#==============================================================================

class Scene_Battle_CP

#--------------------------------------------------------------------------

# ○ 公開インスタンス変数

#--------------------------------------------------------------------------

attr_accessor :stop # CP加算ストップ

#----------------------------------------------------------------------------

# ○ オブジェクトの初期化

#----------------------------------------------------------------------------

def initialize

@battlers = []

@cancel = false

@stop = false

@agi_total = 0

# 配列 count_battlers を初期化

count_battlers = []

# エネミーを配列 count_battlers に追加

for enemy in $game_troop.enemies

count_battlers.push(enemy)

end

# アクターを配列 count_battlers に追加

for actor in $game_party.actors

count_battlers.push(actor)

end

for battler in count_battlers

@agi_total += battler.agi

end

for battler in count_battlers

battler.cp = [[(65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000)/5, 0].max, 65535].min

end

end

#----------------------------------------------------------------------------

# ○ CPカウントアップ

#----------------------------------------------------------------------------

def update

# ストップされているならリターン

return if @stop

#

for battler in $game_party.actors + $game_troop.enemies

# 行動出来なければ無視

if battler.dead? == true

battler.cp = 0

next

end
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

if battler.is_a?(Game_Enemy)
battler.cp = [[battler.cp + BATTLE_SPEED * 4096/4 * battler.agi / @agi_total, 0].max, 65535].min
elsif battler.is_a?(Game_Actor)
battler.cp = [[battler.cp + BATTLE_SPEED * 4096/4*(battler.mp/50) * battler.agi / @agi_total, 0].max, 65535].min
battler.mp += 0.05  #休息时加体力
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

end
end

end

#----------------------------------------------------------------------------

# ○ CPカウントの開始

#----------------------------------------------------------------------------

def stop

@cancel = true

if @cp_thread != nil then

@cp_thread.join

@cp_thread = nil

end

end

end



#==============================================================================

# ■ Game_Battler

#==============================================================================

class Game_Battler

attr_accessor :now_guarding # 現在防御中フラグ

attr_accessor :cp # 現在CP

attr_accessor :slip_state_update_ban # スリップ?ステート自動処理の禁止
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
attr_reader   :mp                       # MP
attr_accessor :maxmp                    # MAXMP
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#--------------------------------------------------------------------------

# ○ CP の変更

#--------------------------------------------------------------------------

def cp=(p)

@cp = [[p, 0].max, 65535].min

end
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#--------------------------------------------------------------------------
  # ● 设置 MaxMP
  #     maxmp : 新的 MaxMP
  #--------------------------------------------------------------------------
  def maxmp=(maxmp)
    @mp = [@mp, self.maxmp].min
  end
  #--------------------------------------------------------------------------
  # ● 更改 MP
  #     mp : 新的 MP
  #--------------------------------------------------------------------------
  def mp=(mp)
    @mp = [[mp, maxmp].min, 0].max
  end
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#--------------------------------------------------------------------------

# ● 防御中判定 [ 再定義 ]

#--------------------------------------------------------------------------

def guarding?

return @now_guarding

end

#--------------------------------------------------------------------------

# ● コマンド入力可能判定

#--------------------------------------------------------------------------

alias xrxs_bp1_inputable? inputable?

def inputable?

bool = xrxs_bp1_inputable?

return (bool and (@cp >= 65535))

end

#--------------------------------------------------------------------------

# ● ステート [スリップダメージ] 判定

#--------------------------------------------------------------------------

alias xrxs_bp1_slip_damage? slip_damage?

def slip_damage?

return false if @slip_state_update_ban

return xrxs_bp1_slip_damage?

end

#--------------------------------------------------------------------------

# ● ステート自然解除 (ターンごとに呼び出し)

#--------------------------------------------------------------------------

alias xrxs_bp1_remove_states_auto remove_states_auto

def remove_states_auto

return if @slip_state_update_ban

xrxs_bp1_remove_states_auto

end

end

#==============================================================================

# ■ Game_Actor

#==============================================================================

class Game_Actor < Game_Battler
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
attr_accessor :maxmp
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#--------------------------------------------------------------------------

# ● セットアップ

#--------------------------------------------------------------------------

alias xrxs_bp1_setup setup

def setup(actor_id)

xrxs_bp1_setup(actor_id)

@cp = 0
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
@maxmp = 100
@mp = maxmp
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
@now_guarding = false

@slip_state_update_ban = false

end

end

#==============================================================================

# ■ Game_Enemy

#==============================================================================

class Game_Enemy < Game_Battler

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

alias xrxs_bp1_initialize initialize

def initialize(troop_id, member_index)

xrxs_bp1_initialize(troop_id, member_index)

@cp = 0

@now_guarding = false

@slip_state_update_ban = false

end

end



class Window_All < Window_Base

  def initialize

    super(0,0,640,480)

    self.opacity = 0

    self.contents = Bitmap.new(width - 32, height - 32)

    self.z = 0

    refresh

  end

  def refresh

    self.contents.clear

    for actor in $game_troop.enemies

      next if !actor.exist?

      draw_actor_cp_meter(actor, actor.screen_x-50, actor.screen_y-50, 60, 0)

    end

  end

  #--------------------------------------------------------------------------

  # ○ CPメーター の描画

  #--------------------------------------------------------------------------

  def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)

    self.contents.font.color = system_color

    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))

    if actor.cp == nil

      actor.cp = 0

    end

    w = width * [actor.cp,65535].min / 65535

    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))

    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))

    self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))

    self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))

  end  

end



#==============================================================================

# ■ Window_BattleStatus

#==============================================================================

class Window_BattleStatus < Window_Base

  #--------------------------------------------------------------------------

  # ○ 公開インスタンス変数

  #--------------------------------------------------------------------------

  attr_accessor :update_cp_only # CPメーターのみの更新

  #--------------------------------------------------------------------------

  # ● オブジェクト初期化

  #--------------------------------------------------------------------------

  alias xrxs_bp1_initialize initialize

  def initialize

    @update_cp_only = false

    @wall = Window_All.new

    xrxs_bp1_initialize

  end

  def dispose

    super

    @wall.dispose

  end

  #--------------------------------------------------------------------------

  # ● リフレッシュ

  #--------------------------------------------------------------------------

  alias xrxs_bp1_refresh refresh

  def refresh

    unless @update_cp_only

      xrxs_bp1_refresh

    end

    refresh_cp

    @wall.refresh

  end

  #--------------------------------------------------------------------------

  # ○ リフレッシュ(CPのみ)

  #--------------------------------------------------------------------------

  def refresh_cp

    for i in 0...$game_party.actors.size

    actor = $game_party.actors

    width = [self.width*3/4 / XRXS_BP1::MAX, 80].max

    space = self.width / XRXS_BP1::MAX

    case XRXS_BP1::ALIGN

    when 0

      actor_x = i * space + 4

    when 1

      actor_x = (space * ((XRXS_BP1::MAX - $game_party.actors.size)/2.0 + i)).floor

    when 2

      actor_x = (i + XRXS_BP1::MAX - $game_party.actors.size) * space + 4

    end

      actor_x += self.x

      draw_actor_cp_meter(actor, actor_x, 96, width, 0)
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
draw_actor_mp(actor, actor_x-35, 96, 100)
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

    end

  end

  #--------------------------------------------------------------------------

  # ○ CPメーター の描画

  #--------------------------------------------------------------------------

  def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)

    self.contents.font.color = system_color

    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))

    if actor.cp == nil

      actor.cp = 0

      end

    if actor.cpb == nil

      actor.cpb = 0

      end

      w = width * [actor.cp,65535].min / 65535

    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))

if actor.cpb < 50

        self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))

    self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))

    self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))



      else

     if actor.cpb < 100

      self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 255, 255))

      self.contents.fill_rect(x, y+30, w,1, Color.new(240, 0, 240, 255))

      self.contents.fill_rect(x, y+31, w,1, Color.new(180, 0, 180, 255))



     else

      if actor.cpb < 150

      self.contents.fill_rect(x, y+29, w,1, Color.new(200, 0, 200, 255))

      self.contents.fill_rect(x, y+30, w,1, Color.new(180, 0, 180, 255))

      self.contents.fill_rect(x, y+31, w,1, Color.new(120, 0, 120, 255))

      else

      if actor.cpb < 200

      self.contents.fill_rect(x, y+29, w,1, Color.new(255, 50, 0, 255))

      self.contents.fill_rect(x, y+30, w,1, Color.new(192, 30, 0, 255))

      self.contents.fill_rect(x, y+31, w,1, Color.new(128, 10, 0, 255))

      else

        self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 255, 200))

      self.contents.fill_rect(x, y+30, w,1, Color.new(240, 240, 240, 200))

      self.contents.fill_rect(x, y+31, w,1, Color.new(180, 180, 180, 200))

      end

      end   

    end

  end

end
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★


#-------------------------------------------------------------------------
  #★描绘MP槽
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 100)
    w = actor.mp
    #描绘白色框条
    self.contents.fill_rect(x+39,y,width+1,1,Color.new(225,225,225,200))
    self.contents.fill_rect(x+39,y+10,width+2,1,Color.new(225,225,225,200))
    self.contents.fill_rect(x+39,y,1,10,Color.new(225,225,225,200))
    self.contents.fill_rect(x+140,y,1,10,Color.new(225,225,225,200))
    #描绘黑色条
    self.contents.fill_rect(x+40,y+1,width,9,Color.new(0,0,0,200))
    #描绘怒气槽
    self.contents.fill_rect(x+41, y+2, w-2,7, Color.new(255, 102, 60, 255))
end  
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

end

#==============================================================================

# ■ Scene_Battle

#==============================================================================

class Scene_Battle

#--------------------------------------------------------------------------

# ● フレーム更新

#--------------------------------------------------------------------------

alias xrxs_bp1_update update

def update

xrxs_bp1_update

# CP更新

@cp_thread.update

end

#--------------------------------------------------------------------------

# ● バトル終了

# result : 結果 (0:勝利 1:敗北 2:逃走)

#--------------------------------------------------------------------------

alias xrxs_bp1_battle_end battle_end

def battle_end(result)

# CPカウントを停止する

@cp_thread.stop

# 呼び戻す

xrxs_bp1_battle_end(result)

end

#--------------------------------------------------------------------------

# ● プレバトルフェーズ開始

#--------------------------------------------------------------------------

alias xrxs_bp1_start_phase1 start_phase1

def start_phase1

@agi_total = 0

# CP加算を開始する

@cp_thread = Scene_Battle_CP.new

# インデックスを計算

@cp_escape_actor_command_index = @actor_command_window.height/32 - 1

# アクターコマンドウィンドウに追加

@actor_command_window.add_command("逃跑")

if !$game_temp.battle_can_escape

@actor_command_window.disable_item(@cp_escape_actor_command_index)

end

# 呼び戻す

xrxs_bp1_start_phase1

end

#--------------------------------------------------------------------------

# ● パーティコマンドフェーズ開始

#--------------------------------------------------------------------------

alias xrxs_bp1_start_phase2 start_phase2

def start_phase2

xrxs_bp1_start_phase2

@party_command_window.active = false

@party_command_window.visible = false

# CP加算を再開する

@cp_thread.stop = false

# 次へ

start_phase3

end

#--------------------------------------------------------------------------

# ● アクターコマンドウィンドウのセットアップ

#--------------------------------------------------------------------------

alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window

def phase3_setup_command_window

# CPスレッドを一時停止する

@cp_thread.stop = true

# ウィンドウのCP更新

@status_window.refresh_cp

# @active_battlerの防御を解除

@active_battler.now_guarding = false

# 効果音の再生

Audio.se_play(DATA_SYSTEM_COMMAND_UP_SE) if DATA_SYSTEM_COMMAND_UP_SE != ""

# 呼び戻す

xrxs_bp1_phase3_setup_command_window

end

#--------------------------------------------------------------------------

# ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)

#--------------------------------------------------------------------------

alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command

def update_phase3_basic_command

# C ボタンが押された場合

if Input.trigger?(Input::C)

# アクターコマンドウィンドウのカーソル位置で分岐

case @actor_command_window.index

when @cp_escape_actor_command_index # 逃げる

if $game_temp.battle_can_escape

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# アクションを設定

@active_battler.current_action.kind = 0

@active_battler.current_action.basic = 4

# 次のアクターのコマンド入力へ

phase3_next_actor

else

# ブザー SE を演奏

$game_system.se_play($data_system.buzzer_se)

end

return

end

end

xrxs_bsp1_update_phase3_basic_command

end

#--------------------------------------------------------------------------

# ● メインフェーズ開始

#--------------------------------------------------------------------------

alias xrxs_bp1_start_phase4 start_phase4

def start_phase4

# 呼び戻す

xrxs_bp1_start_phase4

# CPスレッドを一時停止する

unless @action_battlers.empty?

@cp_thread.stop = true

end

end

#--------------------------------------------------------------------------

# ● 行動順序作成

#--------------------------------------------------------------------------

alias xrxs_bp1_make_action_orders make_action_orders

def make_action_orders

xrxs_bp1_make_action_orders

# 全員のCPを確認

exclude_battler = []

for battler in @action_battlers

# CPが不足している場合は @action_battlers から除外する

if battler.cp < 65535

exclude_battler.push(battler)

end

end

@action_battlers -= exclude_battler

end

#--------------------------------------------------------------------------

# ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)

#--------------------------------------------------------------------------

alias xrxs_bp1_update_phase4_step1 update_phase4_step1

def update_phase4_step1

# 初期化

@phase4_act_continuation = 0

# 勝敗判定

if judge

@cp_thread.stop

# 勝利または敗北の場合 : メソッド終了

return

end

# 未行動バトラー配列の先頭から取得

@active_battler = @action_battlers[0]

# ステータス更新をCPだけに限定。

@status_window.update_cp_only = true

# ステート更新を禁止。

@active_battler.slip_state_update_ban = true if @active_battler != nil

# 戻す

xrxs_bp1_update_phase4_step1

# @status_windowがリフレッシュされなかった場合は手動でリフレッシュ(CPのみ)

if @phase4_step != 2

# リフレッシュ

@status_window.refresh

# 軽量化:たったコレだけΣ(?w?

Graphics.frame_reset

end

# 禁止を解除

@status_window.update_cp_only = false

@active_battler.slip_state_update_ban = false if @active_battler != nil

end

#--------------------------------------------------------------------------

# ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)

#--------------------------------------------------------------------------

alias xrxs_bp1_update_phase4_step2 update_phase4_step2

def update_phase4_step2

# 強制アクションでなければ

unless @active_battler.current_action.forcing

# 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合

if @active_battler.restriction == 2 or @active_battler.restriction == 3

# アクションに攻撃を設定

@active_battler.current_action.kind = 0

@active_battler.current_action.basic = 0

end

# 制約が [行動できない] の場合

if @active_battler.restriction == 4

# アクション強制対象のバトラーをクリア

$game_temp.forcing_battler = nil

if @phase4_act_continuation == 0 and @active_battler.cp >= 65535

# ステート自然解除

@active_battler.remove_states_auto

# CP消費

@active_battler.cp -= 65535

# ステータスウィンドウをリフレッシュ

@status_window.refresh

end

# ステップ 1 に移行

@phase4_step = 1

return

end

end

# アクションの種別で分岐

case @active_battler.current_action.kind

when 0

# 攻撃?防御?逃げる?何もしない時の共通消費CP

@active_battler.cp -= CP_COST_BASIC_ACTIONS if @phase4_act_continuation == 0

when 1
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
if @active_battler.is_a?(Game_Actor)
   if @active_battler.mp > 0
@active_battler.mp -= MP_COST_SKILL_ACTION
end
end
@active_battler.cp -= CP_COST_SKILL_ACTION
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

  #CP Burst不消耗CP

if $data_skills[@active_battler.current_action.skill_id].desc == CP_BURST_NAME

  else

# スキル使用時の消費CP

@active_battler.cp -= ($data_skills[@active_battler.current_action.skill_id].userskill_cp_cost * 65535 / 100) if @phase4_act_continuation == 0

end

when 2  

# アイテム使用時の消費CP
if @phase4_act_continuation == 0
@active_battler.cp -= CP_COST_ITEM_ACTION
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
if @active_battler.is_a?(Game_Actor)
  if @active_battler.mp > 0
  @active_battler.mp -= MP_COST_ITEM_ACTION
end
end
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
end
when 4 #CPBURST

@help_window.set_text(@active_battler.name+"   "+CP_HOLD_NAME+"!!", 1)

@active_battler.cpb += CP_HOLD_GET_CPB

@active_battler.cp -= CP_COST_CP_BURST if @phase4_act_continuation == 0

end

# ステート自然解除

@active_battler.remove_states_auto

# 呼び戻す

xrxs_bp1_update_phase4_step2

end

  #--------------------------------------------------------------------------

  # ● 基本アクション 結果作成

  #--------------------------------------------------------------------------

  alias xrxs_bp1_make_basic_action_result make_basic_action_result

  def make_basic_action_result

    # 攻撃の場合

    if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0

      @active_battler.cp -= CP_COST_BASIC_ATTACK # 攻撃時のCP消費
     #开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
    if @active_battler.is_a?(Game_Actor)
      if @active_battler.mp > 0
        @active_battler.mp -= MP_COST_BASIC_ATTACK
       end
      end
     #添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
    end
   
    # 防御の場合

    if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0

      @active_battler.cp -= CP_COST_BASIC_GUARD # 防御時のCP消費
#开始添加★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
if @active_battler.is_a?(Game_Actor)
  if @active_battler.mp > 0
@active_battler.mp -= MP_COST_BASIC_GUARD
end
end
#添加结束★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

      # @active_battlerの防御をON

      @active_battler.now_guarding = true

    end

    # 敵の逃げるの場合

    if @active_battler.is_a?(Game_Enemy) and

      @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0

      @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費

    end

    # 何もしないの場合

    if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0

      @active_battler.cp -= CP_COST_BASIC_NOTHING # 何もしない時のCP消費

    end

    # 逃げるの場合

    if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0

      @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費

      # 逃走可能ではない場合

      if $game_temp.battle_can_escape == false

        # ブザー SE を演奏

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # 逃走処理

      update_phase2_escape

      return

    end

    # 呼び戻す

    xrxs_bp1_make_basic_action_result

  end

  #--------------------------------------------------------------------------

  # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)

  #--------------------------------------------------------------------------

  alias xrxs_bp1_update_phase4_step6 update_phase4_step6

  def update_phase4_step6

    # スリップダメージ

    if @active_battler.hp > 0 and @active_battler.slip_damage?

      @active_battler.slip_damage_effect

      @active_battler.damage_pop = true

      # ステータスウィンドウをリフレッシュ

      @status_window.refresh

    end

    # 呼び戻す

    xrxs_bp1_update_phase4_step6

  end

end





#==============================================================================

# 本脚本来自www.66RPG.com,使用和转载请保留此信息

#==============================================================================
回复

使用道具 举报

Lv1.梦旅人

伸手爱好者

梦石
0
星屑
50
在线时间
8 小时
注册时间
2009-3-28
帖子
527
5
 楼主| 发表于 2009-12-6 13:09:47 | 只看该作者
出错了
而且还是出在很奇怪的地方= =
咱在咱的设计素描书上看到有“柳笛”这个名字,恩~到底有怎样的关系呢?
[img]http://rpg.blue/data/attachment/forum/month_0910/09102318341719b34b80b536d4.gif[/img]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-5 02:04

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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