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

Project1

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

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

[复制链接]

Lv4.逐梦者

梦石
0
星屑
5987
在线时间
1557 小时
注册时间
2011-6-14
帖子
520
跳转到指定楼层
1
发表于 2014-10-15 15:37:08 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
敌人回合结束后会跑出CP条

我想让他这样

求帮修正
CP制战斗系统v1.2.zip (218.42 KB, 下载次数: 71)

评分

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

查看全部评分

Lv3.寻梦者

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
帖子
1516
2
发表于 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 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-21 13:42

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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