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

Project1

 找回密码
 注册会员
搜索
查看: 2196|回复: 4

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

[复制链接]

Lv5.捕梦者

梦石
0
星屑
24047
在线时间
4983 小时
注册时间
2016-3-8
帖子
1613
发表于 2020-9-13 18:35:22 | 显示全部楼层 |阅读模式

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

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

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

挖个5年前的坟, https://rpg.blue/thread-376139-1-1.html
LZ的问题是不是要用下方的脚本来解決??
然而没看懂那个10号开关是有什么用途..
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ YSA Core Script: Fix Force Actions
  4. # -- Last Updated: 2011.12.18
  5. # -- Level: Easy
  6. # -- Requires: none
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YSA-ForceActions"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2011.12.18 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # This will fix the mechanic of force actions.
  22. # Firstly, forced battler can be not removed from action list when he is being
  23. # forced through a switch. By default, if a battler have not acted and being forced
  24. # , he will lost his current action.
  25. # Secondly, for advanced users, you can put as many as you like battler in
  26. # force action pending.
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. #==============================================================================
  35. # ▼ Compatibility
  36. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  37. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  38. # it will run with RPG Maker VX without adjusting.
  39. #
  40. #==============================================================================
  41.  
  42. module YSA
  43.   module FORCE_ACTION
  44.     REMOVE_SWITCH = 10
  45.   end
  46. end
  47.  
  48. #==============================================================================
  49. # ■ BattleManager
  50. #==============================================================================
  51.  
  52. module BattleManager
  53.  
  54.   #--------------------------------------------------------------------------
  55.   # rewrite method: force_action
  56.   #--------------------------------------------------------------------------
  57.   def self.force_action(battler)
  58.     @action_forced = [] if @action_forced == nil
  59.     @action_forced.push(battler)
  60.     @action_battlers.delete(battler) if $game_switches[YSA::FORCE_ACTION::REMOVE_SWITCH]
  61.   end
  62.  
  63.   #--------------------------------------------------------------------------
  64.   # rewrite method: action_forced?
  65.   #--------------------------------------------------------------------------
  66.   def self.action_forced?
  67.     @action_forced != nil
  68.   end
  69.  
  70.   #--------------------------------------------------------------------------
  71.   # rewrite method: action_forced_battler
  72.   #--------------------------------------------------------------------------
  73.   def self.action_forced_battler
  74.     @action_forced.shift
  75.   end
  76.  
  77.   #--------------------------------------------------------------------------
  78.   # rewrite method: clear_action_force
  79.   #--------------------------------------------------------------------------
  80.   def self.clear_action_force
  81.     @action_forced = nil if @action_forced.empty?
  82.   end
  83.  
  84. end # BattleManager
  85.  
  86. #==============================================================================
  87. # ■ Scene_Battle
  88. #==============================================================================
  89.  
  90. class Scene_Battle < Scene_Base
  91.  
  92.   #--------------------------------------------------------------------------
  93.   # rewrite method: process_forced_action
  94.   #--------------------------------------------------------------------------
  95.   def process_forced_action
  96.     while BattleManager.action_forced?
  97.       last_subject = @subject
  98.       @subject = BattleManager.action_forced_battler
  99.       process_action
  100.       @subject = last_subject
  101.       BattleManager.clear_action_force
  102.     end
  103.   end
  104.  
  105. end

Lv5.捕梦者

梦石
0
星屑
33038
在线时间
10469 小时
注册时间
2009-3-15
帖子
4756
发表于 2020-9-19 17:04:23 | 显示全部楼层
如果10号开关打开就会在执行强制行动时删除行动中的战斗者对像
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
24047
在线时间
4983 小时
注册时间
2016-3-8
帖子
1613
 楼主| 发表于 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
回复 支持 反对

使用道具 举报

Lv5.捕梦者

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

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

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-28 23:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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