查看: 3090|回复: 4

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

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

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

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

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

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

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

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.18 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This will fix the mechanic of force actions.
# Firstly, forced battler can be not removed from action list when he is being
# forced through a switch. By default, if a battler have not acted and being forced
# , he will lost his current action.
# Secondly, for advanced users, you can put as many as you like battler in
# force action pending.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YSA
  module FORCE_ACTION
    REMOVE_SWITCH = 10
  end
end

#==============================================================================
# ■ BattleManager
#==============================================================================

module BattleManager
  
  #--------------------------------------------------------------------------
  # rewrite method: force_action
  #--------------------------------------------------------------------------
  def self.force_action(battler)
    @action_forced = [] if @action_forced == nil
    @action_forced.push(battler)
    @action_battlers.delete(battler) if $game_switches[YSA::FORCE_ACTION::REMOVE_SWITCH]
  end
  
  #--------------------------------------------------------------------------
  # rewrite method: action_forced?
  #--------------------------------------------------------------------------
  def self.action_forced?
    @action_forced != nil
  end
  
  #--------------------------------------------------------------------------
  # rewrite method: action_forced_battler
  #--------------------------------------------------------------------------
  def self.action_forced_battler
    @action_forced.shift
  end
  
  #--------------------------------------------------------------------------
  # rewrite method: clear_action_force
  #--------------------------------------------------------------------------
  def self.clear_action_force
    @action_forced = nil if @action_forced.empty?
  end
  
end # BattleManager

#==============================================================================
# ■ Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base

  #--------------------------------------------------------------------------
  # rewrite method: process_forced_action
  #--------------------------------------------------------------------------
  def process_forced_action
    while BattleManager.action_forced?
      last_subject = @subject
      @subject = BattleManager.action_forced_battler
      process_action
      @subject = last_subject
      BattleManager.clear_action_force
    end
  end
  
end[/pre]
梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2020-9-19 17:04:23 | 显示全部楼层
如果10号开关打开就会在执行强制行动时删除行动中的战斗者对像
回复

使用道具 举报

梦石
0
星屑
29901
在线时间
5734 小时
注册时间
2016-3-8
回帖
1653
 楼主| 发表于 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
星屑
39236
在线时间
11155 小时
注册时间
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.

在本版发帖返回顶部