查看: 3171|回复: 4

[交流讨论] 挖坟]强制战斗指令和每回合行动次数,如何修改才能正常动作

[复制链接]
梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2020-9-13 18:35:22 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 alexncf125 于 2020-9-13 20:49 编辑

挖个5年前的坟, https://rpg.blue/thread-376139-1-1.html
LZ的问题是不是要用下方的脚本来解決??
然而没看懂那个10号开关是有什么用途..
  1. #==============================================================================
  2. #
  3. # ▼ YSA Core Script: Fix Force Actions
  4. # -- Last Updated: 2011.12.18
  5. # -- Level: Easy
  6. # -- Requires: none
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YSA-ForceActions"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.18 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # This will fix the mechanic of force actions.
  20. # Firstly, forced battler can be not removed from action list when he is being
  21. # forced through a switch. By default, if a battler have not acted and being forced
  22. # , he will lost his current action.
  23. # Secondly, for advanced users, you can put as many as you like battler in
  24. # force action pending.
  25. #
  26. #==============================================================================
  27. # ▼ Instructions
  28. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  29. # To install this script, open up your script editor and copy/paste this script
  30. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  31. #
  32. #==============================================================================
  33. # ▼ Compatibility
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  36. # it will run with RPG Maker VX without adjusting.
  37. #
  38. #==============================================================================

  39. module YSA
  40.   module FORCE_ACTION
  41.     REMOVE_SWITCH = 10
  42.   end
  43. end

  44. #==============================================================================
  45. # ■ BattleManager
  46. #==============================================================================

  47. module BattleManager
  48.   
  49.   #--------------------------------------------------------------------------
  50.   # rewrite method: force_action
  51.   #--------------------------------------------------------------------------
  52.   def self.force_action(battler)
  53.     @action_forced = [] if @action_forced == nil
  54.     @action_forced.push(battler)
  55.     @action_battlers.delete(battler) if $game_switches[YSA::FORCE_ACTION::REMOVE_SWITCH]
  56.   end
  57.   
  58.   #--------------------------------------------------------------------------
  59.   # rewrite method: action_forced?
  60.   #--------------------------------------------------------------------------
  61.   def self.action_forced?
  62.     @action_forced != nil
  63.   end
  64.   
  65.   #--------------------------------------------------------------------------
  66.   # rewrite method: action_forced_battler
  67.   #--------------------------------------------------------------------------
  68.   def self.action_forced_battler
  69.     @action_forced.shift
  70.   end
  71.   
  72.   #--------------------------------------------------------------------------
  73.   # rewrite method: clear_action_force
  74.   #--------------------------------------------------------------------------
  75.   def self.clear_action_force
  76.     @action_forced = nil if @action_forced.empty?
  77.   end
  78.   
  79. end # BattleManager

  80. #==============================================================================
  81. # ■ Scene_Battle
  82. #==============================================================================

  83. class Scene_Battle < Scene_Base

  84.   #--------------------------------------------------------------------------
  85.   # rewrite method: process_forced_action
  86.   #--------------------------------------------------------------------------
  87.   def process_forced_action
  88.     while BattleManager.action_forced?
  89.       last_subject = @subject
  90.       @subject = BattleManager.action_forced_battler
  91.       process_action
  92.       @subject = last_subject
  93.       BattleManager.clear_action_force
  94.     end
  95.   end
  96.   
  97. end
复制代码
梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2020-9-19 17:04:23 | 显示全部楼层
如果10号开关打开就会在执行强制行动时删除行动中的战斗者对像
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
 楼主| 发表于 2020-9-19 17:29:45 | 显示全部楼层
本帖最后由 alexncf125 于 2020-9-19 17:37 编辑
soulsaga 发表于 2020-9-19 17:04
如果10号开关打开就会在执行强制行动时删除行动中的战斗者对像


我没理解错的话, 是:
当10号开关打开时, 变回默认的"战斗者对像在未行动时強制行动,他将会失去原有行动"
By default, if a battler have not acted and being forced, he will lost his current action.
的意思?

当10号开关关闭时, 已強制行动了的战斗者对像不会从行动序列中移除(这句等同于: "战斗者对像在未行动时強制行动,不会失去原有行动"吧?)
forced battler can be not removed from action list when he is being forced through a switch
回复

使用道具 举报

梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2020-9-19 18:08:53 | 显示全部楼层
alexncf125 发表于 2020-9-19 17:29
我没理解错的话, 是:
当10号开关打开时, 变回默认的"战斗者对像在未行动时強制行动,他将会失去原有行动"
...

我不太清楚..你可以试一下?调试出真理..
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部