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

Project1

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

跳过撤退指令

[复制链接]

…あたしは天使なんかじゃないわ

梦石
0
星屑
2207
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

跳转到指定楼层
1
发表于 2015-1-18 18:28:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 taroxd 于 2015-1-18 18:48 编辑

RUBY 代码复制
  1. #--------------------------------------------------------------------------
  2. # ● 不可撤退时,跳过“战斗/撤退”指令的选择
  3. #--------------------------------------------------------------------------
  4.  
  5. module Taroxd
  6.   module SkipPartyCommand
  7.     # 满足此条件时,不跳过指令选择
  8.     def self.disabled?
  9.       BattleManager.can_escape?
  10.     end
  11.   end
  12. end
  13.  
  14. # 是否存在上一个指令。无副作用。
  15. def BattleManager.prior_command?
  16.   actors = $game_party.battle_members.first(@actor_index + 1)
  17.   actor = actors.pop
  18.   actor && (actor.prior_command? || actors.any?(&:inputable?))
  19. end
  20.  
  21. class Game_Actor < Game_Battler
  22.   # 是否已经输入过指令
  23.   def prior_command?
  24.     @action_input_index > 0
  25.   end
  26. end
  27.  
  28. class Scene_Battle < Scene_Base
  29.  
  30.   def start_party_command_selection
  31.     return if scene_changing?
  32.     refresh_status
  33.     @status_window.unselect
  34.     @status_window.open
  35.     if BattleManager.input_start
  36.       if Taroxd::SkipPartyCommand.disabled?
  37.         @actor_command_window.close
  38.         @party_command_window.setup
  39.       else
  40.         command_fight
  41.       end
  42.     else
  43.       @party_command_window.deactivate
  44.       turn_start
  45.     end
  46.   end
  47.  
  48. end
  49.  
  50. class Window_ActorCommand < Window_Command
  51.   def cancel_enabled?
  52.     Taroxd::SkipPartyCommand.disabled? || BattleManager.prior_command?
  53.   end
  54. end
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-5-1 20:52

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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