查看: 3641|回复: 15

[已经解决] 请问怎么做到放某个技能后马上又到自己行动?

[复制链接]
梦石
0
星屑
1647
在线时间
606 小时
注册时间
2014-7-9
回帖
97

开拓者

发表于 2016-4-30 14:16:25 | 显示全部楼层 |阅读模式

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

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

×
就是某角色发动某个技能后,该角色马上可以行动.
就是发动技能后该角色可以再行动一次,有类似的范例或者脚本么?
事件貌似无法做到,脚本会很难写吗?感觉好像会很难的样子...
如果我真是问了很麻烦的问题...大家就无视吧..

点评

我用的就是默认+CP的战斗系统.如果用加速度的方法确实可以实现,但是视觉上只是单纯速度加了而已.没有那种无视行动顺序的感觉  发表于 2016-5-1 07:45
CP制战斗脚本  发表于 2016-4-30 15:36
梦石
0
星屑
50
在线时间
77 小时
注册时间
2016-2-2
回帖
241
发表于 2016-5-1 09:13:16 | 显示全部楼层
技能不是可以重复吗?重复一次算不算行动,还有CP制战斗是什么?

点评

rmxp没有技能重复功能  发表于 2016-5-1 09:34
呵呵
回复

使用道具 举报

梦石
0
星屑
1647
在线时间
606 小时
注册时间
2014-7-9
回帖
97

开拓者

 楼主| 发表于 2016-5-1 13:59:46 | 显示全部楼层
傲天哲 发表于 2016-5-1 09:13
技能不是可以重复吗?重复一次算不算行动,还有CP制战斗是什么?

技能重复是..?我只用过XP外加潜水党所以不太清楚其他工具的功能呢...
CP制战斗是即时回合战斗的一种,每个人独立一个行动条.行动条满了就可以行动
速度越快行动条满得越快.
例如你速度是我3倍,那么你行动3次,我才行动1次...大概是这种感觉吧- -....用过一次你就应该知道了
回复

使用道具 举报

梦石
0
星屑
50
在线时间
77 小时
注册时间
2016-2-2
回帖
241
发表于 2016-5-1 14:22:29 | 显示全部楼层
那不简单,给那个技能加一个公共事件,使用后行动条回满不就可以了,或者说如下图
捕获.PNG
捕获2.PNG
捕获3.PNG

点评

我不懂什么是CP制,只能默认为跟XP默认的差不多  发表于 2016-5-1 15:42
请在弄清楚楼主使用的战斗脚本机制之后再回答,目前来看你给出的两个答案都是在误导。  发表于 2016-5-1 15:39
纯属逻辑推理后编写,未测试过,但应该可以用  发表于 2016-5-1 14:23

评分

参与人数 1星屑 -10 收起 理由
RyanBern -10 应该不可以用

查看全部评分

呵呵
回复

使用道具 举报

梦石
0
星屑
1647
在线时间
606 小时
注册时间
2014-7-9
回帖
97

开拓者

 楼主| 发表于 2016-5-1 14:38:53 | 显示全部楼层
傲天哲 发表于 2016-5-1 14:22
那不简单,给那个技能加一个公共事件,使用后行动条回满不就可以了,或者说如下图 ...

先感谢帮忙,
不过我想要的是角色技能发动之后马上又到角色的回合,
例如角色A发动了十字斩,之后还是角色A的回合(无视行动顺序).可以选择其他操作(防御,攻击.技能甚至逃跑)

你这个虽然也是马上行动,但是操作和追加的技能已经固定好了.和我想要有些区别

点评

那个由于我基本是潜水所以很多论坛功能都不会用.例如折叠什么的.所以就直接发了7楼...将就一下吧..  发表于 2016-5-1 15:01
你把你的CP脚本发出来 因为我不知道用的是那一个种  发表于 2016-5-1 14:47
Σ(  ̄□ ̄||)纳尼!?是脚本吗? 事件能设置么?我是脚本盲,所以不懂脚本操作..请问这个具体要怎么操作?需要脚本知识吗?  发表于 2016-5-1 14:45
CP是可以单独设定的 user.cp+=655*100 就是直接满CP值!  发表于 2016-5-1 14:41
回复

使用道具 举报

梦石
0
星屑
50
在线时间
77 小时
注册时间
2016-2-2
回帖
241
发表于 2016-5-1 14:51:30 | 显示全部楼层
这应该可以这样,将公共事件的强制行动改一下,改成:
战斗者:敌人
行为:基本:什么都不做
顺序:按照平时的行动顺序执行

这个比原来的失败率要大,你测试看看吧,不行的话我试试再改一下。
呵呵
回复

使用道具 举报

梦石
0
星屑
1647
在线时间
606 小时
注册时间
2014-7-9
回帖
97

开拓者

 楼主| 发表于 2016-5-1 14:58:16 | 显示全部楼层
本帖最后由 RyanBern 于 2016-5-1 15:30 编辑

  1. # ————————————————————————————————————
  2. # 本脚本来自[url]www.66rpg.com[/url],转载自[url]www.phylomortis.com[/url],转载请保留此信息
  3. # ————————————————————————————————————

  4. # ▼▲▼ XRXS_BP 1. CP制導入 ver..23 ▼▲▼
  5. # by 桜雅 在土, 和希

  6. #==============================================================================
  7. # □ カスタマイズポイント
  8. #==============================================================================
  9. module XRXS_BP1
  10. #
  11. # 对齐方式。0:左 1:中央 2:右
  12. #
  13. ALIGN = 0
  14. #
  15. # 人数
  16. #
  17. MAX = 4
  18. end
  19. class Scene_Battle_CP
  20. #
  21. # 战斗速度
  22. #
  23. BATTLE_SPEED = 5.0
  24. #
  25. # 战斗开始的时候气槽百分比
  26. #
  27. START_CP_PERCENT = 100
  28. end

  29. class Scene_Battle

  30. # 效果音效,可以自己添加
  31. DATA_SYSTEM_COMMAND_UP_SE = ""

  32. # 各项数值功能消耗的CP值
  33. CP_COST_BASIC_ACTIONS = 0 # 基础共同
  34. CP_COST_SKILL_ACTION = 65535 # 技能
  35. CP_COST_ITEM_ACTION = 65535 # 物品
  36. CP_COST_BASIC_ATTACK = 65535 # 攻撃
  37. CP_COST_BASIC_GUARD = 32768 # 防御
  38. CP_COST_BASIC_NOTHING = 65535 # 不做任何事情
  39. CP_COST_BASIC_ESCAPE = 65535 # 逃跑
  40. end

  41. #==============================================================================
  42. # --- XRXS.コマンドウィンドウ?コマンド追加機構 ---
  43. #------------------------------------------------------------------------------
  44. # Window_Commandクラスに add_command メソッドを追加します。
  45. #==============================================================================
  46. module XRXS_Window_Command_Add_Command
  47. #--------------------------------------------------------------------------
  48. # ○ コマンドを追加
  49. #--------------------------------------------------------------------------
  50. def add_command(command)
  51. # 初期化されていない場合、無効化判別用の配列 [url=home.php?mod=space&uid=249395]@disabled[/url] の初期化
  52. #
  53. if @disabled == nil
  54. @disabled = []
  55. end
  56. if @commands.size != @disabled.size
  57. for i in [email]0...@commands.size[/email]
  58. @disabled[i] = false
  59. end
  60. end
  61. #
  62. # 追加
  63. #
  64. @commands.push(command)
  65. @disabled.push(false)
  66. @item_max = @commands.size
  67. self.y -= 32
  68. self.height += 32
  69. self.contents.dispose
  70. self.contents = nil
  71. self.contents = Bitmap.new(self.width - 32, @item_max * 32)
  72. refresh
  73. for i in [email]0...@commands.size[/email]
  74. if @disabled[i]
  75. disable_item(i)
  76. end
  77. end
  78. end
  79. #--------------------------------------------------------------------------
  80. # ○ 項目の無効化
  81. # index : 項目番号
  82. #--------------------------------------------------------------------------
  83. def disable_item(index)
  84. if @disabled == nil
  85. @disabled = []
  86. end
  87. @disabled[index] = true
  88. draw_item(index, disabled_color)
  89. end
  90. end
  91. class Window_Command < Window_Selectable
  92. #--------------------------------------------------------------------------
  93. # ○ インクルード
  94. #--------------------------------------------------------------------------
  95. include XRXS_Window_Command_Add_Command
  96. #--------------------------------------------------------------------------
  97. # ● 項目の無効化
  98. # index : 項目番号
  99. #--------------------------------------------------------------------------
  100. def disable_item(index)
  101. super
  102. end
  103. end
  104. #==============================================================================
  105. # □ Scene_Battle_CP
  106. #==============================================================================
  107. class Scene_Battle_CP
  108. #--------------------------------------------------------------------------
  109. # ○ 公開インスタンス変数
  110. #--------------------------------------------------------------------------
  111. attr_accessor :stop # CP加算ストップ
  112. #----------------------------------------------------------------------------
  113. # ○ オブジェクトの初期化
  114. #----------------------------------------------------------------------------
  115. def initialize
  116. @battlers = []
  117. [url=home.php?mod=space&uid=9053]@cancel[/url] = false
  118. [url=home.php?mod=space&uid=76426]@stop[/url] = false
  119. @agi_total = 0
  120. # 配列 count_battlers を初期化
  121. count_battlers = []
  122. # エネミーを配列 count_battlers に追加
  123. for enemy in $game_troop.enemies
  124. count_battlers.push(enemy)
  125. end
  126. # アクターを配列 count_battlers に追加
  127. for actor in $game_party.actors
  128. count_battlers.push(actor)
  129. end
  130. for battler in count_battlers
  131. @agi_total += battler.agi
  132. end
  133. for battler in count_battlers
  134. battler.cp = [[65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000, 0].max, 65535].min
  135. end
  136. end
  137. #----------------------------------------------------------------------------
  138. # ○ CPカウントアップ
  139. #----------------------------------------------------------------------------
  140. def update
  141. # ストップされているならリターン
  142. return if @stop
  143. #
  144. for battler in $game_party.actors + $game_troop.enemies
  145. # 行動出来なければ無視
  146. if battler.dead? == true
  147. battler.cp = 0
  148. next
  149. end
  150. battler.cp = [[battler.cp + BATTLE_SPEED * 4096 * battler.agi / @agi_total, 0].max, 65535].min
  151. end
  152. end
  153. #----------------------------------------------------------------------------
  154. # ○ CPカウントの開始
  155. #----------------------------------------------------------------------------
  156. def stop
  157. @cancel = true
  158. if @cp_thread != nil then
  159. @cp_thread.join
  160. @cp_thread = nil
  161. end
  162. end
  163. end

  164. #==============================================================================
  165. # ■ Game_Battler
  166. #==============================================================================
  167. class Game_Battler
  168. attr_accessor :now_guarding # 現在防御中フラグ
  169. attr_accessor :cp # 現在CP
  170. attr_accessor :slip_state_update_ban # スリップ?ステート自動処理の禁止
  171. #--------------------------------------------------------------------------
  172. # ○ CP の変更
  173. #--------------------------------------------------------------------------
  174. def cp=(p)
  175. @cp = [[p, 0].max, 65535].min
  176. end
  177. #--------------------------------------------------------------------------
  178. # ● 防御中判定 [ 再定義 ]
  179. #--------------------------------------------------------------------------
  180. def guarding?
  181. return @now_guarding
  182. end
  183. #--------------------------------------------------------------------------
  184. # ● コマンド入力可能判定
  185. #--------------------------------------------------------------------------
  186. alias xrxs_bp1_inputable? inputable?
  187. def inputable?
  188. bool = xrxs_bp1_inputable?
  189. return (bool and (@cp >= 65535))
  190. end
  191. #--------------------------------------------------------------------------
  192. # ● ステート [スリップダメージ] 判定
  193. #--------------------------------------------------------------------------
  194. alias xrxs_bp1_slip_damage? slip_damage?
  195. def slip_damage?
  196. return false if @slip_state_update_ban
  197. return xrxs_bp1_slip_damage?
  198. end
  199. #--------------------------------------------------------------------------
  200. # ● ステート自然解除 (ターンごとに呼び出し)
  201. #--------------------------------------------------------------------------
  202. alias xrxs_bp1_remove_states_auto remove_states_auto
  203. def remove_states_auto
  204. return if @slip_state_update_ban
  205. xrxs_bp1_remove_states_auto
  206. end
  207. end
  208. #==============================================================================
  209. # ■ Game_Actor
  210. #==============================================================================
  211. class Game_Actor < Game_Battler
  212. #--------------------------------------------------------------------------
  213. # ● セットアップ
  214. #--------------------------------------------------------------------------
  215. alias xrxs_bp1_setup setup
  216. def setup(actor_id)
  217. xrxs_bp1_setup(actor_id)
  218. @cp = 0
  219. @now_guarding = false
  220. @slip_state_update_ban = false
  221. end
  222. end
  223. #==============================================================================
  224. # ■ Game_Enemy
  225. #==============================================================================
  226. class Game_Enemy < Game_Battler
  227. #--------------------------------------------------------------------------
  228. # ● オブジェクト初期化
  229. #--------------------------------------------------------------------------
  230. alias xrxs_bp1_initialize initialize
  231. def initialize(troop_id, member_index)
  232. xrxs_bp1_initialize(troop_id, member_index)
  233. @cp = 0
  234. @now_guarding = false
  235. @slip_state_update_ban = false
  236. end
  237. end
  238. #==============================================================================
  239. # ■ Window_BattleStatus
  240. #==============================================================================
  241. class Window_BattleStatus < Window_Base
  242. #--------------------------------------------------------------------------
  243. # ○ 公開インスタンス変数
  244. #--------------------------------------------------------------------------
  245. attr_accessor :update_cp_only # CPメーターのみの更新
  246. #--------------------------------------------------------------------------
  247. # ● オブジェクト初期化
  248. #--------------------------------------------------------------------------
  249. alias xrxs_bp1_initialize initialize
  250. def initialize
  251. @update_cp_only = false
  252. xrxs_bp1_initialize
  253. end
  254. #--------------------------------------------------------------------------
  255. # ● リフレッシュ
  256. #--------------------------------------------------------------------------
  257. alias xrxs_bp1_refresh refresh
  258. def refresh
  259. unless @update_cp_only
  260. xrxs_bp1_refresh
  261. end
  262. refresh_cp
  263. end
  264. #--------------------------------------------------------------------------
  265. # ○ リフレッシュ(CPのみ)
  266. #--------------------------------------------------------------------------
  267. def refresh_cp
  268. for i in 0...$game_party.actors.size
  269. actor = $game_party.actors[i]
  270. width = [self.width*3/4 / XRXS_BP1::MAX, 80].max
  271. space = self.width / XRXS_BP1::MAX
  272. case XRXS_BP1::ALIGN
  273. when 0
  274. actor_x = i * space + 4
  275. when 1
  276. actor_x = (space * ((XRXS_BP1::MAX - $game_party.actors.size)/2.0 + i)).floor
  277. when 2
  278. actor_x = (i + XRXS_BP1::MAX - $game_party.actors.size) * space + 4
  279. end
  280. actor_x += self.x
  281. draw_actor_cp_meter(actor, actor_x, 96, width, 0)
  282. end
  283. end
  284. #--------------------------------------------------------------------------
  285. # ○ CPメーター の描画
  286. #--------------------------------------------------------------------------
  287. def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  288. self.contents.font.color = system_color
  289. self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  290. if actor.cp == nil
  291. actor.cp = 0
  292. end
  293. w = width * [actor.cp,65535].min / 65535
  294. self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  295. self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  296. self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  297. self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
  298. end
  299. end
  300. #==============================================================================
  301. # ■ Scene_Battle
  302. #==============================================================================
  303. class Scene_Battle
  304. #--------------------------------------------------------------------------
  305. # ● フレーム更新
  306. #--------------------------------------------------------------------------
  307. alias xrxs_bp1_update update
  308. def update
  309. xrxs_bp1_update
  310. # CP更新
  311. @cp_thread.update
  312. end
  313. #--------------------------------------------------------------------------
  314. # ● バトル終了
  315. # result : 結果 (0:勝利 1:敗北 2:逃走)
  316. #--------------------------------------------------------------------------
  317. alias xrxs_bp1_battle_end battle_end
  318. def battle_end(result)
  319. # CPカウントを停止する
  320. @cp_thread.stop
  321. # 呼び戻す
  322. xrxs_bp1_battle_end(result)
  323. end
  324. #--------------------------------------------------------------------------
  325. # ● プレバトルフェーズ開始
  326. #--------------------------------------------------------------------------
  327. alias xrxs_bp1_start_phase1 start_phase1
  328. def start_phase1
  329. @agi_total = 0
  330. # CP加算を開始する
  331. @cp_thread = Scene_Battle_CP.new
  332. # インデックスを計算
  333. @cp_escape_actor_command_index = @actor_command_window.height/32 - 1
  334. # アクターコマンドウィンドウに追加
  335. @actor_command_window.add_command("逃跑")
  336. if !$game_temp.battle_can_escape
  337. @actor_command_window.disable_item(@cp_escape_actor_command_index)
  338. end
  339. # 呼び戻す
  340. xrxs_bp1_start_phase1
  341. end
  342. #--------------------------------------------------------------------------
  343. # ● パーティコマンドフェーズ開始
  344. #--------------------------------------------------------------------------
  345. alias xrxs_bp1_start_phase2 start_phase2
  346. def start_phase2
  347. xrxs_bp1_start_phase2
  348. @party_command_window.active = false
  349. @party_command_window.visible = false
  350. # CP加算を再開する
  351. @cp_thread.stop = false
  352. # 次へ
  353. start_phase3
  354. end
  355. #--------------------------------------------------------------------------
  356. # ● アクターコマンドウィンドウのセットアップ
  357. #--------------------------------------------------------------------------
  358. alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
  359. def phase3_setup_command_window
  360. # CPスレッドを一時停止する
  361. @cp_thread.stop = true
  362. # ウィンドウのCP更新
  363. @status_window.refresh_cp
  364. # @active_battlerの防御を解除
  365. @active_battler.now_guarding = false
  366. # 効果音の再生
  367. Audio.se_play(DATA_SYSTEM_COMMAND_UP_SE) if DATA_SYSTEM_COMMAND_UP_SE != ""
  368. # 呼び戻す
  369. xrxs_bp1_phase3_setup_command_window
  370. end
  371. #--------------------------------------------------------------------------
  372. # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  373. #--------------------------------------------------------------------------
  374. alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
  375. def update_phase3_basic_command
  376. # C ボタンが押された場合
  377. if Input.trigger?(Input::C)
  378. # アクターコマンドウィンドウのカーソル位置で分岐
  379. case @actor_command_window.index
  380. when @cp_escape_actor_command_index # 逃げる
  381. if $game_temp.battle_can_escape
  382. # 決定 SE を演奏
  383. $game_system.se_play($data_system.decision_se)
  384. # アクションを設定
  385. @active_battler.current_action.kind = 0
  386. @active_battler.current_action.basic = 4
  387. # 次のアクターのコマンド入力へ
  388. phase3_next_actor
  389. else
  390. # ブザー SE を演奏
  391. $game_system.se_play($data_system.buzzer_se)
  392. end
  393. return
  394. end
  395. end
  396. xrxs_bsp1_update_phase3_basic_command
  397. end
  398. #--------------------------------------------------------------------------
  399. # ● メインフェーズ開始
  400. #--------------------------------------------------------------------------
  401. alias xrxs_bp1_start_phase4 start_phase4
  402. def start_phase4
  403. # 呼び戻す
  404. xrxs_bp1_start_phase4
  405. # CPスレッドを一時停止する
  406. unless @action_battlers.empty?
  407. @cp_thread.stop = true
  408. end
  409. end
  410. #--------------------------------------------------------------------------
  411. # ● 行動順序作成
  412. #--------------------------------------------------------------------------
  413. alias xrxs_bp1_make_action_orders make_action_orders
  414. def make_action_orders
  415. xrxs_bp1_make_action_orders
  416. # 全員のCPを確認
  417. exclude_battler = []
  418. for battler in @action_battlers
  419. # CPが不足している場合は @action_battlers から除外する
  420. if battler.cp < 65535
  421. exclude_battler.push(battler)
  422. end
  423. end
  424. @action_battlers -= exclude_battler
  425. end
  426. #--------------------------------------------------------------------------
  427. # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  428. #--------------------------------------------------------------------------
  429. alias xrxs_bp1_update_phase4_step1 update_phase4_step1
  430. def update_phase4_step1
  431. # 初期化
  432. @phase4_act_continuation = 0
  433. # 勝敗判定
  434. if judge
  435. @cp_thread.stop
  436. # 勝利または敗北の場合 : メソッド終了
  437. return
  438. end
  439. # 未行動バトラー配列の先頭から取得
  440. @active_battler = @action_battlers[0]
  441. # ステータス更新をCPだけに限定。
  442. @status_window.update_cp_only = true
  443. # ステート更新を禁止。
  444. @active_battler.slip_state_update_ban = true if @active_battler != nil
  445. # 戻す
  446. xrxs_bp1_update_phase4_step1
  447. # @status_windowがリフレッシュされなかった場合は手動でリフレッシュ(CPのみ)
  448. if @phase4_step != 2
  449. # リフレッシュ
  450. @status_window.refresh
  451. # 軽量化:たったコレだけΣ(?w?
  452. Graphics.frame_reset
  453. end
  454. # 禁止を解除
  455. @status_window.update_cp_only = false
  456. @active_battler.slip_state_update_ban = false if @active_battler != nil
  457. end
  458. #--------------------------------------------------------------------------
  459. # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  460. #--------------------------------------------------------------------------
  461. alias xrxs_bp1_update_phase4_step2 update_phase4_step2
  462. def update_phase4_step2
  463. # 強制アクションでなければ
  464. unless @active_battler.current_action.forcing
  465. # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
  466. if @active_battler.restriction == 2 or @active_battler.restriction == 3
  467. # アクションに攻撃を設定
  468. @active_battler.current_action.kind = 0
  469. @active_battler.current_action.basic = 0
  470. end
  471. # 制約が [行動できない] の場合
  472. if @active_battler.restriction == 4
  473. # アクション強制対象のバトラーをクリア
  474. $game_temp.forcing_battler = nil
  475. if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
  476. # ステート自然解除
  477. @active_battler.remove_states_auto
  478. # CP消費
  479. @active_battler.cp -= 65535
  480. # ステータスウィンドウをリフレッシュ
  481. @status_window.refresh
  482. end
  483. # ステップ 1 に移行
  484. @phase4_step = 1
  485. return
  486. end
  487. end
  488. # アクションの種別で分岐
  489. case @active_battler.current_action.kind
  490. when 0
  491. # 攻撃?防御?逃げる?何もしない時の共通消費CP
  492. @active_battler.cp -= CP_COST_BASIC_ACTIONS if @phase4_act_continuation == 0
  493. when 1
  494. # スキル使用時の消費CP
  495. @active_battler.cp -= CP_COST_SKILL_ACTION if @phase4_act_continuation == 0
  496. when 2
  497. # アイテム使用時の消費CP
  498. @active_battler.cp -= CP_COST_ITEM_ACTION if @phase4_act_continuation == 0
  499. end
  500. # ステート自然解除
  501. @active_battler.remove_states_auto
  502. # 呼び戻す
  503. xrxs_bp1_update_phase4_step2
  504. end
  505. #--------------------------------------------------------------------------
  506. # ● 基本アクション 結果作成
  507. #--------------------------------------------------------------------------
  508. alias xrxs_bp1_make_basic_action_result make_basic_action_result
  509. def make_basic_action_result
  510. # 攻撃の場合
  511. if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
  512. @active_battler.cp -= CP_COST_BASIC_ATTACK # 攻撃時のCP消費
  513. end
  514. # 防御の場合
  515. if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
  516. @active_battler.cp -= CP_COST_BASIC_GUARD # 防御時のCP消費
  517. # @active_battlerの防御をON
  518. @active_battler.now_guarding = true
  519. end
  520. # 敵の逃げるの場合
  521. if @active_battler.is_a?(Game_Enemy) and
  522. @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
  523. @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  524. end
  525. # 何もしないの場合
  526. if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
  527. @active_battler.cp -= CP_COST_BASIC_NOTHING # 何もしない時のCP消費
  528. end
  529. # 逃げるの場合
  530. if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
  531. @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  532. # 逃走可能ではない場合
  533. if $game_temp.battle_can_escape == false
  534. # ブザー SE を演奏
  535. $game_system.se_play($data_system.buzzer_se)
  536. return
  537. end
  538. # 逃走処理
  539. update_phase2_escape
  540. return
  541. end
  542. # 呼び戻す
  543. xrxs_bp1_make_basic_action_result
  544. end
  545. #--------------------------------------------------------------------------
  546. # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  547. #--------------------------------------------------------------------------
  548. alias xrxs_bp1_update_phase4_step6 update_phase4_step6
  549. def update_phase4_step6
  550. # スリップダメージ
  551. if @active_battler.hp > 0 and @active_battler.slip_damage?
  552. @active_battler.slip_damage_effect
  553. @active_battler.damage_pop = true
  554. # ステータスウィンドウをリフレッシュ
  555. @status_window.refresh
  556. end
  557. # 呼び戻す
  558. xrxs_bp1_update_phase4_step6
  559. end
  560. end
复制代码

点评

XP的CP回合制战斗脚本  发表于 2016-5-4 00:17
这是什么鬼  发表于 2016-5-1 15:11
回复

使用道具 举报

梦石
0
星屑
1647
在线时间
606 小时
注册时间
2014-7-9
回帖
97

开拓者

 楼主| 发表于 2016-5-1 15:16:25 | 显示全部楼层
傲天哲 发表于 2016-5-1 14:51
这应该可以这样,将公共事件的强制行动改一下,改成:
战斗者:敌人
行为:基本:什么都不做

这样就和1楼点评哪里一样了,而且CP制战斗速度快的敌人可以在角色A行动之前就可以行动了.还有己方角色也得什么都不做才行.但是这样一来速度慢的己方就相当于被速度快的敌人白打了....
回复

使用道具 举报

梦石
0
星屑
606
在线时间
797 小时
注册时间
2014-7-1
回帖
501

开拓者

发表于 2016-5-1 15:17:17 | 显示全部楼层
本帖最后由 jiushiainilip19 于 2016-5-1 15:29 编辑

不过我想CP值战斗都是这些代码应该不会去设定其他的,你用了CP值战斗的话就这样
找到:Game_Battler 3 中
查找def skill_effect(user, skill) 也就是应用特技的效果 然后调用命令

  1. #判定行动方是我军
  2. #if user.is_a(Game_Actor)
  3. #判定行动方是敌军
  4. #if user.is_a(Game_Enemy)
  5. #判定角色行动是ID是1号角色
  6. #user.id==1
  7. #判定技能是何种属性(1)表示为1号属性
  8. #skill.element_set.include?(1)
  9. #那么:我需要角色1行动后在行动一次
  10. if user.is_a(Game_Actor) && user.id == 1
  11.   user.cp+=65535 #一般都是65535满值
  12. end
  13. #如果想是敌人就改成(Game_Enemy) 然后对应号敌人在数据库中的ID
  14. #如果想做到被击加CP值 就是
  15. if self.is_a(Game_Actor) && self.id == 1
  16.   self.cp+=65535 #一般都是65535满值
  17. end
  18. #用self最好在属性修正和计算暴击的下面来抒写 这个自己看吧 因为self.damage的命令在上面调用是不行的
  19. #当然你用不上可以无视
  20. #还有就是Game_Battler 3中的效果和Scene_Battle 4中的效果是有差别的
  21. #你可以把Game_Battler 3中的效果当作是使用技能时触发的效果
  22. #而Scene_Battle 4中是使用技能后触发的效果
  23. #这样说比较简单理解 当然想做的效果不一样就看你慢慢琢磨了
  24. #在Scene_Battle 4中也可以调用CP值
  25. # 在def update_phase4_step5 显示伤害下面调用 代码是
  26. if @active_battler.is_a?(Game_Enemy)
  27. if @active_battler.is_a?(Game_Actor)
  28. #表示行动方 而被击方则是
  29. if target.is_a?(Game_Enemy)
  30. if target.is_a?(Game_Actor)
  31. #好了就这些了 其他的自己多琢磨 我也就会这么多
  32. #建议最好在抒写的时候把技能的ID,范围, 属性, 角色的ID多判定清楚一些 以免照成未知的后果
  33. #多写一些备注 好在内容比较多的时候可以通过记忆查到到对应的定义内容
  34. #若还有疑问 在提问 暂时不知道要说些什么了
复制代码



找到:Game_Battler 3 中
实际效果如下
  1.   
  2. #--------------------------------------------------------------------------
  3.   # ● 应用特技效果
  4.   #     user  : 特技的使用者 (battler)
  5.   #     skill : 特技
  6.   #--------------------------------------------------------------------------
  7.   def skill_effect(user, skill)
  8.     # 清除会心一击标志
  9.     self.critical = false
  10.     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
  11.     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
  12.     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  13.        ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  14.       # 过程结束
  15.       return false
  16.     end
  17.     # 清除有效标志
  18.     effective = false
  19.     # 公共事件 ID 是有效的情况下,设置为有效标志
  20.     effective |= skill.common_event_id > 0
  21.     # 第一命中判定
  22.     hit = skill.hit
  23.     if skill.atk_f > 0
  24.       hit *= user.hit / 100
  25.     end
  26.     hit_result = (rand(100) < hit)
  27.     # 不确定的特技的情况下设置为有效标志
  28.     effective |= hit < 100
  29.     # 命中的情况下
  30.     if hit_result == true
  31.       # 计算威力
  32.       power = skill.power + user.atk * skill.atk_f / 100
  33.       if power > 0
  34.         power -= self.pdef * skill.pdef_f / 200
  35.         power -= self.mdef * skill.mdef_f / 200
  36.         power = [power, 0].max
  37.       end
  38. ##############################################         
  39.    if user.is_a(Game_Actor) && user.id == 1
  40.       user.cp+=65535
  41.     end     
  42. ##############################################         
  43.       
  44.       # 计算倍率
  45.       rate = 20
  46.       rate += (user.str * skill.str_f / 100)
  47.       rate += (user.dex * skill.dex_f / 100)
  48.       rate += (user.agi * skill.agi_f / 100)
  49.       rate += (user.int * skill.int_f / 100)
复制代码

点评

^_^!啰嗦了一些 只是希望他多了解些 嘿嘿!  发表于 2016-5-1 15:56
有点繁琐,请看楼下我的回复。  发表于 2016-5-1 15:51
学习使我疲劳,打工使我疲惫,恋爱使我伤身,吸烟伤我肺腑,饮酒损我形象,旅游使我破费,月底不见铜板,只有在论坛里面看看各种大佬才能使我进去
回复

使用道具 举报

梦石
0
星屑
50
在线时间
77 小时
注册时间
2016-2-2
回帖
241
发表于 2016-5-1 15:23:55 | 显示全部楼层
突然想到,你可以添加一个状态(效果如下图,要按图示来),然后再新建一个技能,技能会造成的状态变化就是新加的状态(其余数据可调节)
捕获.PNG
捕获2.PNG

点评

速度调的越快越好~  发表于 2016-5-1 15:27
呵呵
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部