查看: 3342|回复: 1

[已经解决] CP制战斗系统v1.2有个问题

[复制链接]
梦石
0
星屑
6963
在线时间
1557 小时
注册时间
2011-6-14
回帖
425
发表于 2014-10-15 15:37:08 | 显示全部楼层 |阅读模式

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

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

×
敌人回合结束后会跑出CP条
~29I~J]IG]6H_Y(4MUSLT.jpg
我想让他这样
XV0RB@HT]ISWM5RCBV[8F~5.jpg
求帮修正
CP制战斗系统v1.2.zip (218.42 KB, 下载次数: 71)

评分

参与人数 1星屑 +35 收起 理由
︶ㄣ牛排ぶ + 35 手动认可奖励

查看全部评分

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2014-10-15 18:21:17 | 显示全部楼层
Scene_Battle 2替换成这个
  1. #==============================================================================
  2. # ■ Scene_Battle
  3. #==============================================================================

  4. class Scene_Battle
  5.   #--------------------------------------------------------------------------
  6.   # ● 开始 CP 回合
  7.   #--------------------------------------------------------------------------
  8.   def start_phase2
  9.     @phase = 2
  10.     @actor_index = -1
  11.     @active_battler = nil
  12.     @actor_command_window.active = false
  13.     @actor_command_window.visible = false
  14.     $game_temp.battle_main_phase = false
  15.     set_now_battlers
  16.     set_now_maxspeed
  17.     @input_action_battlers = []
  18.   end
  19.   #--------------------------------------------------------------------------
  20.   # ● 刷新画面 增加 CP
  21.   #--------------------------------------------------------------------------
  22.   def update_phase2
  23.     add_battlers_cp
  24.     @cp_window.refresh(@now_maxspeed)
  25.     set_input_action_battlers
  26.     if @input_action_battlers.size > 0
  27.       start_phase3
  28.       $game_system.se_play($data_system.decision_se)
  29.       return
  30.     end
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # ● 数据处理 增加 CP
  34.   #--------------------------------------------------------------------------
  35.   def add_battlers_cp
  36.     for battler in @now_battlers
  37.       next if battler.nil?
  38.       next if battler.dead?
  39.       next if battler.hidden
  40.       next if battler.cp >= @now_maxspeed
  41.       battler.cp += battler.agi
  42.     end
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 设置输入命令的战斗者
  46.   #--------------------------------------------------------------------------
  47.   def set_input_action_battlers
  48.     for battler in @now_battlers
  49.       if battler.cp >= @now_maxspeed
  50.         @input_action_battlers.push(battler)
  51.       end
  52.     end
  53.     if @input_action_battlers.size > 0
  54.       for battler in @input_action_battlers
  55.         battler.make_action_speed
  56.       end
  57.       if @input_action_battlers.size > 1
  58.         @input_action_battlers.sort! {|a,b|
  59.           b.current_action.speed - a.current_action.speed }
  60.       end
  61.     end
  62.   end
  63. end
复制代码

点评

哈哈 多谢 总算是解决了,真是多亏有你帮忙了  发表于 2014-10-15 18:33

评分

参与人数 1星屑 +200 收起 理由
︶ㄣ牛排ぶ + 200 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部