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

Project1

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

[有事请教] 战斗行动想把弱点击破改到攻击的下面,请问怎么改?

[复制链接]

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
跳转到指定楼层
1
发表于 2024-7-12 17:02:00 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 chen12311 于 2024-7-12 17:09 编辑

RUBY 代码复制
  1. module Text
  2.   TEXT="弱点击破"
  3.   SKILL_ID=27
  4.   SRECH_ID=2#ID判断是否为进攻
  5. end
  6. #获得技能ID
  7. class Game_Action
  8.   def rout?
  9.     if Text::SRECH_ID==2
  10.       p '空'
  11.     else
  12.       item == $data_skills[subject.rout_skill_id]
  13.     end
  14.   end
  15.   def set_rout
  16.     set_skill(subject.rout_skill_id)
  17.     self
  18.   end
  19. end
  20. class Game_BattlerBase
  21.   def rout_skill_id
  22.     return Text::SKILL_ID
  23.   end
  24. #判定技能使用
  25.   def rout_usable?
  26.     usable?($data_skills[rout_skill_id])
  27.   end
  28. end
  29. class Window_ActorCommand < Window_Command
  30.   def add_rout_command
  31.     add_command(Vocab::rout, :rout, @actor.rout_usable?)
  32.   end
  33. end
  34. class Scene_Battle < Scene_Base
  35.   def command_rout
  36.     if Text::SRECH_ID==2
  37.       BattleManager.actor.input.set_rout
  38.       next_command
  39.     else
  40.       BattleManager.actor.input.set_rout
  41.       select_enemy_selection
  42.     end
  43.   end
  44. end
  45. #以上为技能选项的前台,不能显示选项
  46. class Game_Temp
  47.   attr_accessor :battle_rout
  48.   alias initialize_battle_rout initialize
  49.   def initialize
  50.     initialize_battle_rout
  51.     @battle_equip = false   
  52.   end
  53. end
  54. class Window_ActorCommand < Window_Command
  55.   def add_rout_command
  56.     add_command([Text::TEXT, nil], :rout, true)
  57.   end
  58.   alias make_command_list_rout make_command_list
  59.   def make_command_list
  60.     make_command_list_rout
  61.     add_rout_command
  62.   end
  63.   def set_up(a)
  64.     @actor=a
  65.     clear_command_list
  66.     make_command_list
  67.     refresh
  68.     select(0)
  69.     activate
  70.     open
  71.   end
  72. end
  73.  
  74. class Scene_Battle < Scene_Base
  75.   alias create_all_windows_rout create_all_windows
  76.   def create_all_windows
  77.     create_all_windows_rout
  78.   end
  79.   alias create_actor_command_window_rout create_actor_command_window
  80.   def create_actor_command_window
  81.     create_actor_command_window_rout
  82.     @actor_command_window.set_handler(:rout, method(:command_rout))
  83.   end
  84.   def on_enemy_ok
  85.     BattleManager.actor.input.target_index = @enemy_window.enemy.index
  86.     @enemy_window.hide
  87.     @skill_window.hide
  88.     @item_window.hide
  89.     next_command
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 敌人“取消”
  93.   #--------------------------------------------------------------------------
  94.   alias rout_on_enemy_cancel on_enemy_cancel
  95.   def on_enemy_cancel
  96.     case @actor_command_window.current_symbol
  97.     when :rout
  98.       @actor_command_window.activate
  99.     end
  100.     rout_on_enemy_cancel
  101.   end
  102. end
好累啊,今天又是不睡觉的一天

Lv4.逐梦者

梦石
0
星屑
5895
在线时间
788 小时
注册时间
2019-1-20
帖子
201
2
发表于 2024-7-29 12:05:37 | 只看该作者
  1. class Window_ActorCommand < Window_Command
  2.   alias make_command_list_rout make_command_list
  3.   def make_command_list
  4.      return unless @actor
  5.     add_attack_command
  6.     add_rout_command #
  7.     add_skill_commands
  8.     add_guard_command
  9.     add_item_command
  10.   end
  11. end #
复制代码

提高解答机会的方法:
看一下对应版本的帮助文件 看天气预报说今天不下雨
改变问题为更有可能的或常见的 如:天气自动变化下雨→天气系统 果然不准呀~
使用论坛的搜索功能查找相关问题 好丧啊... ...想看女装
清楚说明实际上你想解决的问题  想看坛友的女装  
脚本自己有改过的地方要标明  不要遮脸的
脚本有问题但不是默认的要全部贴出来 大胆点,尽情发
三包原则:包有BUG,包甩锅,包咕咕
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
3
 楼主| 发表于 2024-7-29 20:48:40 | 只看该作者

大佬这个我试过,会出现不显示
好累啊,今天又是不睡觉的一天
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
4
 楼主| 发表于 2024-7-29 20:49:42 | 只看该作者
本帖最后由 chen12311 于 2024-7-29 20:51 编辑

就像这样,也通过其他脚本来修改,但会出现没有效果的情况,点防御会报错

屏幕截图 2024-07-29 204831.png (528.04 KB, 下载次数: 16)

屏幕截图 2024-07-29 204831.png
好累啊,今天又是不睡觉的一天
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5895
在线时间
788 小时
注册时间
2019-1-20
帖子
201
5
发表于 2024-7-31 11:18:59 | 只看该作者
chen12311 发表于 2024-7-29 20:49
就像这样,也通过其他脚本来修改,但会出现没有效果的情况,点防御会报错 ...

使用默认工程是可以正常显示的

我想有3个原因
你这个脚本不全,因为有没使用到的部分--补齐看看吧?
使用的战斗系统跟这个脚本不兼容--我没辙
全局搜索 make_command_list,看看除了默认的和上面的以外的,还有没有其他地方使用的,有的话把那整个发出来

提高解答机会的方法:
看一下对应版本的帮助文件 看天气预报说今天不下雨
改变问题为更有可能的或常见的 如:天气自动变化下雨→天气系统 果然不准呀~
使用论坛的搜索功能查找相关问题 好丧啊... ...想看女装
清楚说明实际上你想解决的问题  想看坛友的女装  
脚本自己有改过的地方要标明  不要遮脸的
脚本有问题但不是默认的要全部贴出来 大胆点,尽情发
三包原则:包有BUG,包甩锅,包咕咕
回复 支持 1 反对 0

使用道具 举报

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
6
 楼主| 发表于 2024-7-31 11:29:07 | 只看该作者
srwjrevenger 发表于 2024-7-31 11:18
使用默认工程是可以正常显示的

我想有3个原因

好吧,还是感谢回答
好累啊,今天又是不睡觉的一天
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
7
 楼主| 发表于 2024-7-31 11:42:38 | 只看该作者
本帖最后由 chen12311 于 2024-7-31 12:41 编辑

是这个
RUBY 代码复制
  1. #==============================================================================
  2. # RGSS3_戦闘コマンドカスタム ver1.05
  3. # 2013/12/23公開
  4. # 2014/03/03 STATUS_MODEが無効になっていたのを修正
  5. # 2014/05/04 PARTY_MODEに設定追加  PARTY_WINDOW_POS PARTY_WIDTH PARTY_ROWを追加
  6. #           「XP風バトル(STR11_aからSTR11_eまで全て使用したもののみ)」に対応
  7. #           拡張「DAアクターコマンドPT編成」に対応
  8. # 2014/05/07スクリプト「CW戦闘中パーティ編成」に対応
  9. # 2014/05/31設定項目 PARTY_USE_MODE PARTY_ON_ACTOR_BUTTON などを追加
  10. #           アクターコマンドからパーティコマンドを開けるように
  11. #           「CW戦闘中パーティ編成」を導入していないとエラーになったのを修正
  12. # 2014/06/07戦闘中のパーティ編成後にエラーになることがあったのを修正
  13. # C Winter ([url]http://ccwinter.blog.fc2.com/[/url])
  14. #==============================================================================
  15.  
  16.  
  17. module BattleCommand_Custom
  18.   #--------------------------------------------------------------------------
  19.   # ● 設定項目
  20.   #--------------------------------------------------------------------------
  21.  
  22.   # 用語
  23.   # アクターコマンドウインドウ: 「攻撃、防御、スキル、アイテム」を選択
  24.   # パーティコマンドウインドウ: 「戦う、逃げる」を選択
  25.   # ステータスウインドウ: 各キャラのHPなどを表示
  26.  
  27.  
  28.  
  29.   # アクターコマンドウインドウの表示位置
  30.   #   0: ステータスの右に表示(デフォルトと同じ)
  31.   #   1: ステータスの左に表示(デフォルトのパーティコマンドの位置)
  32.   #   2: ACTOR_WINDOW_POSで指定した位置に表示
  33.   ACTOR_MODE = 2
  34.  
  35.   # ※ACTOR_MODEが2の時のみ
  36.   #   アクターコマンドウインドウの位置指定 [x座標, y座標]
  37.   ACTOR_WINDOW_POS = [0, 296]
  38.   # ※ACTOR_MODEが2の時のみ
  39.   #   ウインドウy座標の基準
  40.   #   0:「ACTOR_WINDOW_POSのy座標」をウインドウの上端にする
  41.   #   1:「ACTOR_WINDOW_POSのy座標」をウインドウの下端にする
  42.   ACTOR_WINDOW_Y_MODE = 1
  43.  
  44.  
  45.  
  46.   # ※ACTOR_MODEが2の時のみ
  47.   #   コマンドウインドウの1ページの「縦の行数」の[最小数, 最大数]
  48.   #   行が「最小数」より少ない場合、余った行は空白
  49.   #   行が「最大数」より多い場合、スクロールで表示
  50.   ACTOR_ROW = [4, 8]
  51.  
  52.   # コマンドウインドウの[横の列数, ウインドウの横幅]
  53.   # 「横の列数」を nil にすると、横の列数はコマンドの数と同じになる
  54.   #   (列数とコマンドの数が同じ=1行で全コマンドを表示)
  55.   # ウインドウの横幅はデフォルトでは128
  56.   ACTOR_COL = [1, 128]
  57.  
  58.  
  59.  
  60.   # アクターコマンドに表示するコマンドを指定
  61.   #   :attack     攻撃
  62.   #   :skill      スキル
  63.   #   :guard      防御
  64.   #   :item       アイテム
  65.   #   :escape     逃走
  66.   #   :CW_party   パーティ編成 使用にはスクリプト「CW戦闘中パーティ編成」が必須
  67.   #   :DA_party   パーティ編成 使用には拡張「DAアクターコマンドPT編成」が必須
  68.   #   
  69.   # 指定した並び順でアクターコマンドに表示する 指定しなかったものは表示されない
  70.   # アイテムを使わないゲーム、攻撃と防御を無くしてスキルのみ使うゲーム、
  71.   # パーティコマンドを無くしてアクターコマンドで逃走するゲーム などが作れる
  72.   #   デフォルト          [:attack, :skill, :guard, :item]
  73.   #   逃走を追加          [:attack, :skill, :guard, :item, :escape]
  74.   #   パーティ編成を追加  [:attack, :skill, :guard, :item, :CW_party]
  75.   ACTOR_COMMAND_LIST = [:attack, :skill, :guard, :item, :escape]
  76.  
  77.  
  78.  
  79.   # アクターコマンドの各項目にアイコンを表示するかどうか
  80.   # true なら表示する false なら表示しない
  81.   ACTOR_ICON  = false
  82.  
  83.   # ※ACTOR_ICONが true の時のみ
  84.   #  スキルのスキルタイプごとのアイコン番号
  85.   ACTOR_ICON_SKILL  = [116, 117, 16, 16, 16, 16, 16, 16]
  86.   # ※ACTOR_ICONが true の時のみ
  87.   #   [通常攻撃, 防御, アイテム, 逃走] のアイコン番号
  88.   ACTOR_ICON_OTHER = [116, 160, 260, 467]
  89.   # ※ACTOR_ICONが true の時のみ
  90.   #   true  : 通常攻撃のアイコンを「装備している武器」のアイコンにする
  91.   #   false : 通常攻撃のアイコンを ACTOR_ICON_OTHER で設定したアイコンにする
  92.   #  (ここが true なら
  93.   #     スキルリストの「ID1番のスキル」も「装備している武器」のアイコンにする)
  94.   ACTOR_ICON_ATTACK_WEAPON = true
  95.  
  96.  
  97.  
  98.   # パーティコマンド(戦う、逃げる)の形式
  99.   #   0: ステータスの左に表示(デフォルトと同じ)
  100.   #   1: ステータスの右に表示(デフォルトのアクターコマンドの位置)
  101.   #   2: PARTY_WINDOW_POSで指定した位置に表示
  102.   #   3: 画面上部 横幅いっぱいに表示 項目横並び
  103.   #   4: 画面上部 横幅いっぱいに表示 項目縦並び
  104.   PARTY_MODE = 3
  105.  
  106.   # ※PARTY_MODEが2の時のみ
  107.   #   パーティコマンドウインドウの位置指定 [x座標, y座標]
  108.   PARTY_WINDOW_POS = [0, 0]
  109.   # ※PARTY_MODEが2の時のみ
  110.   #   パーティコマンドウインドウの横幅 デフォルトでは128
  111.   PARTY_WIDTH = 128
  112.   # ※PARTY_MODEが2の時のみ
  113.   #   パーティコマンドウインドウの1ページの「縦の行数」 デフォルトでは4
  114.   PARTY_ROW = 4
  115.  
  116.   # パーティコマンドの各項目にアイコンを表示するかどうか
  117.   # true なら表示する false なら表示しない
  118.   PARTY_ICON = false
  119.   # ※PARTY_ICON が true の時のみ
  120.   #   各項目のアイコン番号(パーティコマンドの数だけ設定)
  121.   PARTY_ICON_LIST = [147, 467, 16, 16, 16, 16]
  122.  
  123.  
  124.   # パーティコマンドを表示するかどうか
  125.   #  1: 表示する
  126.   #  2: 無くす
  127.   #  3: (他スクリプトとの競合発生率が高め)普段は表示しないが、
  128.   #     アクターコマンド入力中に PARTY_ON_ACTOR_BUTTON が押されると表示する
  129.   PARTY_USE_MODE = 2
  130.  
  131.   # PARTY_USE_MODE が 3 の時のみ
  132.   # アクターコマンドからパーティコマンドを開くボタン
  133.   #   「Qキー = :L」「Wキー = :R」
  134.   #   「Aキー = :X」「Sキー = :Y」「Dキー = :Z」「Shiftキー = :A」
  135.   PARTY_ON_ACTOR_BUTTON = []
  136.   # PARTY_USE_MODE が 3 の時のみ
  137.   # 「パーティコマンドからアクターコマンドに戻る」のに
  138.   # 「戦う」とキャンセルキーに加えて PARTY_ON_ACTOR_BUTTON の入力でも戻れるか
  139.   PARTY_ON_ACTOR_CLOSE_BY_OPEN_BUTTON   = true
  140.  
  141.  
  142.   # ステータスウインドウの横幅
  143.   #   0: デフォルトと同じ横幅
  144.   #   1: 画面サイズと同じ横幅(ゲージの長さなどもそれに合わせて表示されます)
  145.   STATUS_MODE = 1
  146.  
  147.  
  148.  
  149.   STATUS_X = [128, 128, 128]
  150.   # 画面下部の「パーティコマンドとステータスとアクターコマンド のセット」の位置
  151.   #
  152.   # それぞれ[パーティコマンド選択中, アクターコマンド選択中, ターン中]の位置指定
  153.   # 設定値は
  154.   #     0:右側に移動 アクターコマンドは右の画面外に押し出される
  155.   #    64:中央に移動 ターン中
  156.   #   128:左側に移動 パーティコマンドは左の画面外に押し出される
  157.   #   (ACTOR_MDOEやPARTY_MODEが2以上だと、
  158.   #  そのウインドウはずっと定位置にあるのでステータスと一緒に動くことはない)
  159.   # 設定例
  160.   #   ACTOR_MODEが0、PARTY_MODEが0   の時は[0, 128, 64]
  161.   #   ACTOR_MODEが0、PARTY_MODEが2以上 の時は[64, 128, 64]や[128, 128, 128]
  162.   #   ACTOR_MODEが2、PARTY_MODEが0   の時は[0, 64, 64]  や[0, 128, 128]
  163.   #   ACTOR_MODEが2、PARTY_MODEが2以上 の時は[64, 64, 64] や[128, 128, 128]
  164.   #   STATUS_MODEが1 の時は[128, 128, 128]
  165.  
  166.  
  167. =begin
  168.  
  169.   ももまるLabs 様「XPスタイルバトル」使用時
  170.  
  171.     ACTOR_MODE
  172.     ACTOR_WINDOW_POS
  173.     ACTOR_WINDOW_Y_MODE
  174.       は無効 アクターコマンドの座標は、XPスタイルバトル側の設定で決まる
  175.       
  176.     STATUS_MODE
  177.     STATUS_X
  178.       は無効
  179.       
  180.       
  181.   DEICIDE ALMA 様(代理配布:誰かへの宣戦布告 様)「XP風バトル」使用時
  182.   (XP風バトルへの対応確認は不十分なのでうまく動かない部分があるかもしれません)
  183.  
  184.     ACTOR_MODE
  185.     ACTOR_WINDOW_POS
  186.     ACTOR_WINDOW_Y_MODE
  187.       は無効
  188.       
  189.     STATUS_MODE
  190.     STATUS_X
  191.       は無効
  192.       
  193. =end
  194.  
  195. end
  196.  
  197. #==============================================================================
  198. # ■ BattleCommand_Custom
  199. #==============================================================================
  200. module BattleCommand_Custom
  201.   def self.sideview?
  202.     begin
  203.       N03::ACTOR_POSITION
  204.       return true
  205.     rescue
  206.       return false
  207.     end
  208.   end
  209.  
  210.   def self.xp_style?
  211.     return ($lnx_include != nil and $lnx_include[:lnx11a] != nil)
  212.   end
  213.   def self.renne_xp_huu?
  214.     return ($renne_rgss3 != nil and $renne_rgss3[:xp_style_battle_a] != nil)
  215.   end
  216.   def self.no_layout_script?
  217.     return false if self.xp_style?
  218.     return false if self.renne_xp_huu?
  219.     return true
  220.   end
  221.  
  222.   STRRGSS2::PCOMMAND_W = false if self.renne_xp_huu?
  223.  
  224.   def self.renne_member_change_in_battle?
  225.     return ($renne_rgss3 != nil and $renne_rgss3[:member_change_in_battle] != nil)
  226.   end
  227.   def self.ex_DA_party?
  228.     return false
  229.   end
  230.  
  231.   def self.default_under_viewport?
  232.     return false if self.xp_style?
  233.     return false if self.renne_xp_huu?
  234.     return true
  235.   end
  236.   def self.default_actor_command_window?
  237.     return false if self.xp_style?
  238.     return false if self.renne_xp_huu?
  239.     return false if ACTOR_MODE == 2
  240.     return true
  241.   end
  242. end
  243.  
  244. $cwinter_script_battle_command_custom = true
  245.  
  246. #==============================================================================
  247. # ■ Scene_Battle
  248. #==============================================================================
  249. class Scene_Battle < Scene_Base
  250.   #--------------------------------------------------------------------------
  251.   # ● 情報表示ビューポートの更新
  252.   #--------------------------------------------------------------------------
  253.   def update_info_viewport
  254.     if BattleCommand_Custom.default_under_viewport?
  255.       move_info_viewport(BattleCommand_Custom::STATUS_X[0]) if @party_command_window.active
  256.       move_info_viewport(BattleCommand_Custom::STATUS_X[1]) if @actor_command_window.active
  257.       move_info_viewport(BattleCommand_Custom::STATUS_X[2]) if BattleManager.in_turn?
  258.     end
  259.     if sideview_actor_pos_command?
  260.       @actor_command_window.set_position
  261.     end
  262.   end
  263.   def sideview_actor_pos_command?
  264.     return false
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ● 全ウィンドウの作成
  268.   #--------------------------------------------------------------------------
  269.   alias :battle_command_custom_create_all_windows :create_all_windows
  270.   def create_all_windows
  271.     battle_command_custom_create_all_windows
  272.     default_create_all_windows      if BattleCommand_Custom.no_layout_script?
  273.     xp_style_create_all_windows     if BattleCommand_Custom.xp_style?
  274.     renne_xp_huu_create_all_windows if BattleCommand_Custom.renne_xp_huu?
  275.     set_ex_handler
  276.   end
  277.   def default_create_all_windows
  278.     # アクターコマンドの位置を変えると
  279.     # ウインドウリフォーム使用時にスキルウインドウ等と重なって変なことになる
  280.     # のを防止するためz座標を変更
  281.     @actor_command_window.z = 5
  282.     @actor_command_window.viewport = nil if BattleCommand_Custom::ACTOR_MODE >= 2
  283.     @party_command_window.viewport = nil if BattleCommand_Custom::PARTY_MODE >= 2
  284.     @actor_command_window.x = 0 if BattleCommand_Custom::ACTOR_MODE == 1
  285.     case BattleCommand_Custom::PARTY_MODE
  286.     when 1
  287.       @party_command_window.x = Graphics.width
  288.     when 2
  289.       @party_command_window.x = BattleCommand_Custom::PARTY_WINDOW_POS[0]
  290.       @party_command_window.y = BattleCommand_Custom::PARTY_WINDOW_POS[1]
  291.     end
  292.     if BattleCommand_Custom::PARTY_USE_MODE == 1
  293.       @info_viewport.ox = BattleCommand_Custom::STATUS_X[0]
  294.     else
  295.       @info_viewport.ox = BattleCommand_Custom::STATUS_X[1]
  296.     end
  297.   end
  298.   def xp_style_create_all_windows
  299.   end
  300.   def renne_xp_huu_create_all_windows
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● ハンドラの追加
  304.   #--------------------------------------------------------------------------
  305.   def set_ex_handler
  306.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  307.       @party_command_window.set_handler(:fight_on_actor,  method(:command_fight_on_actor))
  308.       @party_command_window.set_handler(:cancel,  method(:command_fight_on_actor))
  309.     end
  310.     @actor_command_window.set_handler(:party_on_actor, method(:open_party_command_on_actor))
  311.     @actor_command_window.set_handler(:escape, method(:command_escape))
  312.     if defined?(command_CW_formation)
  313.       @actor_command_window.set_handler(:CW_party, method(:command_CW_formation))
  314.     end
  315.   end
  316.   #--------------------------------------------------------------------------
  317.   # ○ アクタースプライトの作成
  318.   #--------------------------------------------------------------------------
  319.   def sv_re_create_actor_sprites
  320.     @spriteset.dispose_actors
  321.     @spriteset.create_actors
  322.     refresh_status
  323.     Graphics.frame_reset
  324.   end
  325.   #--------------------------------------------------------------------------
  326.   # ○ CWパーティ編成 ステータスの再作成
  327.   #--------------------------------------------------------------------------
  328.   def cw_status_window_reset
  329.     if BattleCommand_Custom.xp_style?
  330.       # XPスタイルバトル SVXP
  331.       refresh_actors
  332.     elsif BattleCommand_Custom.sideview?
  333.       # サイドビュー
  334.       sv_re_create_actor_sprites
  335.     elsif BattleCommand_Custom.renne_xp_huu?
  336.       # XP風バトル
  337.       process_event
  338.       refresh_status
  339.     end
  340.   end
  341. end
  342. if BattleCommand_Custom.renne_member_change_in_battle?
  343. #==============================================================================
  344. # ■ Scene_Battle
  345. #==============================================================================
  346. class Scene_Battle < Scene_Base
  347.   #--------------------------------------------------------------------------
  348.   # ○ PT編成選択終了
  349.   #--------------------------------------------------------------------------
  350.   alias :battle_command_custom_member_change_end :member_change_end
  351.   def member_change_end
  352.     cw_status_window_reset
  353.     battle_command_custom_member_change_end
  354.   end
  355. end
  356. end
  357. #==============================================================================
  358. # ■ Window_ActorCommand
  359. #==============================================================================
  360. class Window_ActorCommand < Window_Command
  361.   #--------------------------------------------------------------------------
  362.   # ● 桁数の取得
  363.   #--------------------------------------------------------------------------
  364.   def col_max
  365.     if BattleCommand_Custom::ACTOR_COL[0] == nil
  366.       return @list.size == 0 ? 1 : @list.size
  367.     else
  368.       return BattleCommand_Custom::ACTOR_COL[0]
  369.     end
  370.   end
  371.   #--------------------------------------------------------------------------
  372.   # ● カーソルを下に移動
  373.   #--------------------------------------------------------------------------
  374.   def cursor_down(wrap = false)
  375.     return if item_max <= 1
  376.     return if (item_max - 1) / col_max <= 0
  377.     if wrap || (index / col_max != (item_max - 1) / col_max)
  378.       i = index + col_max
  379.       if i >= item_max
  380.         if index / col_max == (item_max - 1) / col_max
  381.           i = index % col_max
  382.         else
  383.           i = item_max - 1
  384.         end
  385.       end
  386.       select(i)
  387.     end
  388.   end
  389.   #--------------------------------------------------------------------------
  390.   # ● カーソルを上に移動
  391.   #--------------------------------------------------------------------------
  392.   def cursor_up(wrap = false)
  393.     return if item_max <= 1
  394.     return if (item_max - 1) / col_max <= 0
  395.     if wrap || (index / col_max != 0)
  396.       i = index - col_max
  397.       if i < 0
  398.         if index % col_max <= (item_max - 1) % col_max
  399.           i = index + (item_max - 1) / col_max * col_max
  400.         else
  401.           i = item_max - 1
  402.         end
  403.       end
  404.       select(i)
  405.     end
  406.   end
  407.   #--------------------------------------------------------------------------
  408.   # ● カーソルを右に移動
  409.   #--------------------------------------------------------------------------
  410.   def cursor_right(wrap = false)
  411.     return if item_max <= 1
  412.     return if col_max <= 1
  413.     if wrap || (index % col_max != (col_max - 1))
  414.       i = index + 1
  415.       if (i >= item_max) or (index / col_max != i / col_max)
  416.         i -= col_max
  417.         i = [i, 0].max
  418.       end
  419.       select(i)
  420.     end
  421.   end
  422.   #--------------------------------------------------------------------------
  423.   # ● カーソルを左に移動
  424.   #--------------------------------------------------------------------------
  425.   def cursor_left(wrap = false)
  426.     return if item_max <= 1
  427.     return if col_max <= 1
  428.     if wrap || (index % col_max != 0)
  429.       i = index - 1
  430.       if index / col_max != i / col_max
  431.         if i + col_max < item_max
  432.           i += col_max
  433.         end
  434.       end
  435.       select(i)
  436.     end
  437.   end
  438.   #--------------------------------------------------------------------------
  439.   # ● ウィンドウ幅の取得
  440.   #--------------------------------------------------------------------------
  441.   def original_window_width
  442.     return BattleCommand_Custom::ACTOR_COL[1]
  443.   end
  444.   def window_width
  445.     return original_window_width
  446.   end
  447.   #--------------------------------------------------------------------------
  448.   # ● ウィンドウ高さの取得
  449.   #--------------------------------------------------------------------------
  450.   def original_window_height
  451.     if BattleCommand_Custom.default_actor_command_window?
  452.       return 120
  453.     else
  454.       fitting_height(visible_line_number)
  455.     end
  456.   end
  457.   def window_height
  458.     return original_window_height
  459.   end
  460.   #--------------------------------------------------------------------------
  461.   # ● 表示行数の取得
  462.   #--------------------------------------------------------------------------
  463.   def visible_line_number
  464.     if (not BattleCommand_Custom.default_actor_command_window?)
  465.       return custom_visible_line_number
  466.     else
  467.       return default_visible_line_number
  468.     end
  469.   end
  470.   def default_visible_line_number
  471.     return 4
  472.   end
  473.   def custom_visible_line_number
  474.     n = @list.size / col_max + (@list.size % col_max > 0 ? 1 : 0)
  475.     n = [BattleCommand_Custom::ACTOR_ROW[0], n].max
  476.     n = [BattleCommand_Custom::ACTOR_ROW[1], n].min
  477.     return n
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● 横に項目が並ぶときの空白の幅を取得
  481.   #--------------------------------------------------------------------------
  482.   def spacing
  483.     return 0
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● セットアップ
  487.   #--------------------------------------------------------------------------
  488.   alias :battle_command_custom_setup :setup
  489.   def setup(actor)
  490.     battle_command_custom_setup(actor)
  491.     show
  492.     open
  493.     self.arrows_visible = true
  494.   end
  495.   #--------------------------------------------------------------------------
  496.   # ● コマンドリストの作成
  497.   #--------------------------------------------------------------------------
  498.   def make_command_list
  499.     return unless @actor
  500.     for symbol in BattleCommand_Custom::ACTOR_COMMAND_LIST
  501.       make_command_list_by_symbol(symbol)
  502.     end
  503.     set_position if BattleCommand_Custom::ACTOR_MODE >= 2
  504.   end
  505.   def make_command_list_by_symbol(symbol)
  506.     case symbol
  507.     when :attack    ; add_attack_command
  508.     when :skill     ; add_skill_commands
  509.     when :guard     ; add_guard_command
  510.     when :item      ; add_item_command
  511.     when :escape    ; add_escape_command
  512.     when :CW_party  ; add_CW_party_command
  513.     when :DA_party  ; add_DA_party_command
  514.     end
  515.   end
  516.   #--------------------------------------------------------------------------
  517.   # ● パーティ編成コマンドの追加
  518.   #--------------------------------------------------------------------------
  519.   def add_CW_party_command
  520.     unless $cwinter_script_battle_formation
  521.       text  = "エラー「戦闘コマンドカスタム」nn"
  522.       text += "元スクリプト「CW戦闘中パーティ編成」が導入されていませんnn"
  523.       text += "元スクリプト「CW戦闘中パーティ編成」を導入するかn"
  524.       text += "設定項目 ACTOR_COMMAND_LIST から :CW_party を消してください"
  525.       msgbox text
  526.     end
  527.     name = BATTLE_FORMATION::BATTLE_COMMAND_NAME
  528.     icon = BATTLE_FORMATION::ACTOR_ICON_CW_MEMBER_CHANGE
  529.     flag = BATTLE_FORMATION.can_CW_formation?
  530.     add_command([name, icon], :CW_party, flag)
  531.   end
  532.   #--------------------------------------------------------------------------
  533.   # ● パーティ編成コマンドの追加
  534.   #--------------------------------------------------------------------------
  535.   def add_DA_party_command
  536.     unless BattleCommand_Custom.ex_DA_party?
  537.       text  = "エラー「戦闘コマンドカスタム」nn"
  538.       text += "拡張スクリプト「DAアクターコマンドPT編成」が導入されていませんnn"
  539.       text += "拡張スクリプト「DAアクターコマンドPT編成」を導入するかn"
  540.       text += "設定項目 ACTOR_COMMAND_LIST から :DA_party を消してください"
  541.       msgbox text
  542.     end
  543.     name = RENNE::Member_Change::NAME
  544.     icon = BattleCommand_Custom::ACTOR_ICON_MEMBER_CHANGE
  545.     flag = true
  546.     add_command([name, icon], :DA_party, flag)
  547.   end
  548.   #--------------------------------------------------------------------------
  549.   # ● 項目の描画
  550.   #--------------------------------------------------------------------------
  551.   def draw_item(index)
  552.     change_color(normal_color, command_enabled?(index))
  553.     par = command_name(index)
  554.     rect = item_rect_for_text(index)
  555.     if BattleCommand_Custom::ACTOR_ICON
  556.       draw_icon(par[1], rect.x, rect.y)
  557.       rect.x += 24
  558.       rect.width -= 24
  559.       draw_text(rect, par[0], alignment)
  560.     else
  561.       draw_text(rect, par[0], alignment)
  562.     end
  563.   end
  564.   #--------------------------------------------------------------------------
  565.   # ● 高さと座標の更新
  566.   #--------------------------------------------------------------------------
  567.   def set_position
  568.     self.height = window_height
  569.     pos = window_pos
  570.     if $cwinter_script_actor_command_reform_ex_image
  571.       l_space = left_space
  572.       t_space = top_space
  573.       u_space = under_space
  574.     else
  575.       l_space = 0
  576.       t_space = 0
  577.       u_space = 0
  578.     end
  579.     self.x = pos[0] + l_space
  580.     if BattleCommand_Custom::ACTOR_WINDOW_Y_MODE == 0
  581.       self.y = pos[1] + t_space
  582.     else
  583.       self.y = pos[1] - self.height - u_space
  584.     end
  585.   end
  586.   def window_pos
  587.     return BattleCommand_Custom::ACTOR_WINDOW_POS
  588.   end
  589.   #--------------------------------------------------------------------------
  590.   # ● [追加]:X 座標をアクターに合わせる
  591.   #--------------------------------------------------------------------------
  592.   def actor_x(actor)
  593.     if $cwinter_script_actor_command_reform_ex_image
  594.       l_space = left_space
  595.     else
  596.       l_space = 0
  597.     end
  598.     left_width  = self.width - l_space
  599.     right_width = self.width
  600.     ax = $game_party.members_screen_x_nooffset[actor.index] - left_width / 2
  601.     left_pad  = LNX11::STATUS_SIDE_PADDING / 2 + l_space
  602.     right_pad = LNX11::STATUS_SIDE_PADDING / 2
  603.     # 画面内に収める
  604.     self.x = [[ax, left_pad].max, Graphics.width - right_pad - right_width].min
  605.     self.x += LNX11::ACTOR_COMMAND_OFFSET[:x]
  606.   end
  607.   #--------------------------------------------------------------------------
  608.   # ● [追加]:Y 座標をアクターに合わせる
  609.   #--------------------------------------------------------------------------
  610.   def actor_y(actor)
  611.     if $cwinter_script_actor_command_reform_ex_image
  612.       u_space = under_space
  613.     else
  614.       u_space = 0
  615.     end
  616.     self_height = self.height + u_space
  617.     self.y = actor.screen_y_top - self_height
  618.     self.y += LNX11::ACTOR_COMMAND_OFFSET[:y]
  619.   end
  620.   #--------------------------------------------------------------------------
  621.   # ● [追加]:固定 Y 座標
  622.   #--------------------------------------------------------------------------
  623.   def screen_y
  624.     if $cwinter_script_actor_command_reform_ex_image
  625.       u_space = under_space
  626.     else
  627.       u_space = 0
  628.     end
  629.     if LNX11::ACTOR_COMMAND_Y_POSITION == 0
  630.       self_height = self.height + u_space
  631.       self.y = Graphics.height - self_height + LNX11::ACTOR_COMMAND_OFFSET[:y]
  632.     else
  633.       self.y = LNX11::ACTOR_COMMAND_OFFSET[:y]
  634.     end
  635.   end
  636.   #--------------------------------------------------------------------------
  637.   # ● 攻撃コマンドをリストに追加
  638.   #--------------------------------------------------------------------------
  639.   def add_attack_command
  640.     if BattleCommand_Custom::ACTOR_ICON_ATTACK_WEAPON and @actor.weapons[0]
  641.       par = [Vocab::attack, @actor.weapons[0].icon_index]
  642.     else
  643.       par = [Vocab::attack, BattleCommand_Custom::ACTOR_ICON_OTHER[0]]
  644.     end
  645.     add_command(par, :attack, @actor.attack_usable?)
  646.   end
  647.   #--------------------------------------------------------------------------
  648.   # ● スキルコマンドをリストに追加
  649.   #--------------------------------------------------------------------------
  650.   def add_skill_commands
  651.     @actor.added_skill_types.sort.each do |stype_id|
  652.       name = $data_system.skill_types[stype_id]
  653.       par = [name, BattleCommand_Custom::ACTOR_ICON_SKILL[stype_id - 1]]
  654.       add_command(par, :skill, true, stype_id)
  655.     end
  656.   end
  657.   #--------------------------------------------------------------------------
  658.   # ● 防御コマンドをリストに追加
  659.   #--------------------------------------------------------------------------
  660.   def add_guard_command
  661.     par = [Vocab::guard, BattleCommand_Custom::ACTOR_ICON_OTHER[1]]
  662.     add_command(par, :guard, @actor.guard_usable?)
  663.   end
  664.   #--------------------------------------------------------------------------
  665.   # ● アイテムコマンドをリストに追加
  666.   #--------------------------------------------------------------------------
  667.   def add_item_command
  668.     par = [Vocab::item, BattleCommand_Custom::ACTOR_ICON_OTHER[2]]
  669.     add_command(par, :item)
  670.   end
  671.   #--------------------------------------------------------------------------
  672.   # ● 逃走コマンドをリストに追加
  673.   #--------------------------------------------------------------------------
  674.   def add_escape_command
  675.     par = [Vocab::escape, BattleCommand_Custom::ACTOR_ICON_OTHER[3]]
  676.     add_command(par, :escape, BattleManager.can_escape?)
  677.   end
  678. end
  679. #==============================================================================
  680. # ■ Window_SkillList
  681. #==============================================================================
  682. class Window_SkillList < Window_Selectable
  683.   #--------------------------------------------------------------------------
  684.   # ● アイテム名の描画
  685.   #--------------------------------------------------------------------------
  686.   def draw_item_name(item, x, y, enabled = true, width = 172)
  687.     return unless item
  688.     if item.id == 1 and
  689.        BattleCommand_Custom::ACTOR_ICON_ATTACK_WEAPON and @actor.weapons[0]
  690.       icon = @actor.weapons[0].icon_index
  691.     else
  692.       icon = item.icon_index
  693.     end
  694.     draw_icon(icon, x, y, enabled)
  695.     change_color(normal_color, enabled)
  696.     draw_text(x + 24, y, width, line_height, item.name)
  697.   end
  698. end
  699. if [2, 3, 4].include?(BattleCommand_Custom::PARTY_MODE)
  700. #==============================================================================
  701. # ■ Window_PartyCommand
  702. #==============================================================================
  703. class Window_PartyCommand < Window_Command
  704.   #--------------------------------------------------------------------------
  705.   # ● ウィンドウ幅の取得
  706.   #--------------------------------------------------------------------------
  707.   def window_width
  708.     case BattleCommand_Custom::PARTY_MODE
  709.     when 2; return BattleCommand_Custom::PARTY_WIDTH
  710.     when 3; return Graphics.width
  711.     when 4; return Graphics.width
  712.     end
  713.   end
  714.   #--------------------------------------------------------------------------
  715.   # ● 表示行数の取得
  716.   #--------------------------------------------------------------------------
  717.   def visible_line_number
  718.     case BattleCommand_Custom::PARTY_MODE
  719.     when 2; return BattleCommand_Custom::PARTY_ROW
  720.     when 3; return 1
  721.     when 4; return @list.size
  722.     end
  723.   end
  724.   #--------------------------------------------------------------------------
  725.   # ● 桁数の取得
  726.   #--------------------------------------------------------------------------
  727.   def col_max
  728.     case BattleCommand_Custom::PARTY_MODE
  729.     when 2; return 1
  730.     when 3; return @list.size
  731.     when 4; return 1
  732.     end
  733.   end
  734.   #--------------------------------------------------------------------------
  735.   # ● 横に項目が並ぶときの空白の幅を取得
  736.   #--------------------------------------------------------------------------
  737.   def spacing
  738.     return 16
  739.   end
  740.   #--------------------------------------------------------------------------
  741.   # ● 項目の描画
  742.   #--------------------------------------------------------------------------
  743.   def draw_item(index)
  744.     case BattleCommand_Custom::PARTY_MODE
  745.     when 2; return draw_item_alignment_0(index)
  746.     when 3; return draw_item_alignment_1(index)
  747.     when 4; return draw_item_alignment_1(index)
  748.     end
  749.   end
  750.   #--------------------------------------------------------------------------
  751.   # ● 項目の描画
  752.   #--------------------------------------------------------------------------
  753.   def draw_item_alignment_0(index)
  754.     rect   = item_rect_for_text(index)
  755.     enable = command_enabled?(index)
  756.     if BattleCommand_Custom::PARTY_ICON
  757.       x = rect.x
  758.       y = rect.y
  759.       draw_icon(BattleCommand_Custom::PARTY_ICON_LIST[index], x, y, enable)
  760.       rect.x += 24
  761.     end
  762.     change_color(normal_color, enable)
  763.     draw_text(rect, command_name(index), 0)
  764.   end
  765.   #--------------------------------------------------------------------------
  766.   # ● 項目の描画
  767.   #--------------------------------------------------------------------------
  768.   def draw_item_alignment_1(index)
  769.     rect   = item_rect_for_text(index)
  770.     enable = command_enabled?(index)
  771.     if BattleCommand_Custom::PARTY_ICON
  772.       t_rect = self.contents.text_size(command_name(index))
  773.       x = rect.x + (rect.width / 2 - t_rect.width / 2) - 25
  774.       y = rect.y
  775.       draw_icon(BattleCommand_Custom::PARTY_ICON_LIST[index], x, y, enable)
  776.     end
  777.     rect   = item_rect_for_text(index)
  778.     change_color(normal_color, enable)
  779.     draw_text(rect, command_name(index), 1)
  780.   end
  781. end
  782. end
  783. #==============================================================================
  784. # ■ Window_PartyCommand
  785. #==============================================================================
  786. class Window_PartyCommand < Window_Command
  787.   #--------------------------------------------------------------------------
  788.   # ● セットアップ
  789.   #--------------------------------------------------------------------------
  790.   alias :setup_on_actor :setup
  791.   def setup
  792.     if BattleCommand_Custom::PARTY_USE_MODE == 1
  793.       setup_on_actor
  794.     else
  795.       call_handler(:fight)
  796.     end
  797.   end
  798. end
  799. # PARTY_USE_MODE
  800. #==============================================================================
  801. # ■ Window_PartyCommand
  802. #==============================================================================
  803. class Window_PartyCommand < Window_Command
  804.   #--------------------------------------------------------------------------
  805.   # ● コマンドリストの作成
  806.   #--------------------------------------------------------------------------
  807.   alias :battle_command_custom_make_command_list :make_command_list
  808.   def make_command_list
  809.     battle_command_custom_make_command_list
  810.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  811.       @list[0][:symbol] = :fight_on_actor
  812.     end
  813.   end
  814.   #--------------------------------------------------------------------------
  815.   # ● 決定やキャンセルなどのハンドリング処理
  816.   #--------------------------------------------------------------------------
  817.   def process_handling
  818.     return unless open? && active
  819.     return process_ok       if ok_enabled?        && Input.trigger?(:C)
  820.     return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
  821.     if BattleCommand_Custom::PARTY_ON_ACTOR_CLOSE_BY_OPEN_BUTTON
  822.       for symbol in BattleCommand_Custom::PARTY_ON_ACTOR_BUTTON
  823.         return process_cancel   if cancel_enabled?    && Input.trigger?(symbol)
  824.       end
  825.     end
  826.     return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
  827.     return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  828.   end
  829. end
  830. #==============================================================================
  831. # ■ Window_ActorCommand
  832. #==============================================================================
  833. class Window_ActorCommand < Window_Command
  834.   #--------------------------------------------------------------------------
  835.   # ● 決定やキャンセルなどのハンドリング処理
  836.   #--------------------------------------------------------------------------
  837.   def process_handling
  838.     return unless open? && active
  839.     return process_ok       if ok_enabled?        && Input.trigger?(:C)
  840.     return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
  841.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  842.       for symbol in BattleCommand_Custom::PARTY_ON_ACTOR_BUTTON
  843.         return process_party_on_actor if handle?(:party_on_actor) && Input.trigger?(symbol)
  844.       end
  845.     end
  846.     return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
  847.     return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  848.   end
  849.   #--------------------------------------------------------------------------
  850.   # ● サブウインドウキーが押された時の処理
  851.   #--------------------------------------------------------------------------
  852.   def process_party_on_actor
  853.     Sound.play_ok
  854.     Input.update
  855.     # XPスタイルバトル導入時は deactivate を使うと自動的に hide されるため
  856.     # deactivateは使わない
  857.     self.active = false
  858.     call_handler(:party_on_actor)
  859.   end
  860. end
  861. #==============================================================================
  862. # ■ Scene_Battle
  863. #==============================================================================
  864. class Scene_Battle < Scene_Base
  865.   def open_party_command_on_actor
  866.     @actor_command_window.close
  867.     @actor_command_window.deactivate
  868.     @party_command_window.setup_on_actor
  869.   end
  870.   def command_fight_on_actor
  871.     start_actor_command_selection
  872.   end
  873.   #--------------------------------------------------------------------------
  874.   # ● アクターコマンド選択の開始
  875.   #--------------------------------------------------------------------------
  876.   alias :battle_command_custom_start_actor_command_selection :start_actor_command_selection
  877.   def start_actor_command_selection
  878.     if BattleManager.actor == nil
  879.       next_command
  880.     else
  881.       battle_command_custom_start_actor_command_selection
  882.     end
  883.   end
  884. end
  885. # PARTY_USE_MODE
  886. if BattleCommand_Custom.no_layout_script? and
  887.    BattleCommand_Custom::STATUS_MODE == 1
  888. #==============================================================================
  889. # ■ Window_BattleStatus
  890. #==============================================================================
  891. class Window_BattleStatus < Window_Selectable
  892.   #--------------------------------------------------------------------------
  893.   # ● ウィンドウ幅の取得
  894.   #--------------------------------------------------------------------------
  895.   def window_width
  896.     Graphics.width
  897.   end
  898.   #--------------------------------------------------------------------------
  899.   # ● ゲージエリアの幅を取得
  900.   #--------------------------------------------------------------------------
  901.   def gauge_area_width
  902.     return 348
  903.   end
  904.   #--------------------------------------------------------------------------
  905.   # ● ゲージエリアの描画(TP あり)
  906.   #--------------------------------------------------------------------------
  907.   def draw_gauge_area_with_tp(rect, actor)
  908.     draw_actor_hp(actor, rect.x + 128 - 60 + 0, rect.y, 72 + 20)
  909.     draw_actor_mp(actor, rect.x + 128 - 40 + 82, rect.y, 64 + 20)
  910.     draw_actor_tp(actor, rect.x + 128 - 20 + 156, rect.y, 64 + 20)
  911.   end
  912.   #--------------------------------------------------------------------------
  913.   # ● ゲージエリアの描画(TP なし)
  914.   #--------------------------------------------------------------------------
  915.   def draw_gauge_area_without_tp(rect, actor)
  916.     draw_actor_hp(actor, rect.x + 128 - 60 + 0, rect.y, 134 + 30)
  917.     draw_actor_mp(actor, rect.x + 128 - 30 + 144,  rect.y, 76 + 30)
  918.   end
  919. end
  920. #==============================================================================
  921. # ■ Window_BattleActor
  922. #==============================================================================
  923. class Window_BattleActor < Window_BattleStatus
  924.   #--------------------------------------------------------------------------
  925.   # ● ウィンドウ幅の取得
  926.   #--------------------------------------------------------------------------
  927.   def window_width
  928.     Graphics.width - 128
  929.   end
  930.   #--------------------------------------------------------------------------
  931.   # ● ゲージエリアの幅を取得
  932.   #--------------------------------------------------------------------------
  933.   def gauge_area_width
  934.     return 220
  935.   end
  936.   #--------------------------------------------------------------------------
  937.   # ● ゲージエリアの描画(TP あり)
  938.   #--------------------------------------------------------------------------
  939.   def draw_gauge_area_with_tp(rect, actor)
  940.     draw_actor_hp(actor, rect.x + 0, rect.y, 72)
  941.     draw_actor_mp(actor, rect.x + 82, rect.y, 64)
  942.     draw_actor_tp(actor, rect.x + 156, rect.y, 64)
  943.   end
  944.   #--------------------------------------------------------------------------
  945.   # ● ゲージエリアの描画(TP なし)
  946.   #--------------------------------------------------------------------------
  947.   def draw_gauge_area_without_tp(rect, actor)
  948.     draw_actor_hp(actor, rect.x + 0, rect.y, 134)
  949.     draw_actor_mp(actor, rect.x + 144,  rect.y, 76)
  950.   end
  951. end
  952. end
好累啊,今天又是不睡觉的一天
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5895
在线时间
788 小时
注册时间
2019-1-20
帖子
201
8
发表于 2024-7-31 13:59:33 | 只看该作者
  1. #==============================================================================
  2. # RGSS3_戦闘コマンドカスタム ver1.05
  3. # 2013/12/23公開
  4. # 2014/03/03 STATUS_MODEが無効になっていたのを修正
  5. # 2014/05/04 PARTY_MODEに設定追加  PARTY_WINDOW_POS PARTY_WIDTH PARTY_ROWを追加
  6. #           「XP風バトル(STR11_aからSTR11_eまで全て使用したもののみ)」に対応
  7. #           拡張「DAアクターコマンドPT編成」に対応
  8. # 2014/05/07スクリプト「CW戦闘中パーティ編成」に対応
  9. # 2014/05/31設定項目 PARTY_USE_MODE PARTY_ON_ACTOR_BUTTON などを追加
  10. #           アクターコマンドからパーティコマンドを開けるように
  11. #           「CW戦闘中パーティ編成」を導入していないとエラーになったのを修正
  12. # 2014/06/07戦闘中のパーティ編成後にエラーになることがあったのを修正
  13. # C Winter (http://ccwinter.blog.fc2.com/)
  14. #==============================================================================


  15. module BattleCommand_Custom
  16.   #--------------------------------------------------------------------------
  17.   # ● 設定項目
  18.   #--------------------------------------------------------------------------
  19.   
  20.   # 用語
  21.   # アクターコマンドウインドウ: 「攻撃、防御、スキル、アイテム」を選択
  22.   # パーティコマンドウインドウ: 「戦う、逃げる」を選択
  23.   # ステータスウインドウ: 各キャラのHPなどを表示
  24.   
  25.   

  26.   # アクターコマンドウインドウの表示位置
  27.   #   0: ステータスの右に表示(デフォルトと同じ)
  28.   #   1: ステータスの左に表示(デフォルトのパーティコマンドの位置)
  29.   #   2: ACTOR_WINDOW_POSで指定した位置に表示
  30.   ACTOR_MODE = 2
  31.   
  32.   # ※ACTOR_MODEが2の時のみ
  33.   #   アクターコマンドウインドウの位置指定 [x座標, y座標]
  34.   ACTOR_WINDOW_POS = [0, 296]
  35.   # ※ACTOR_MODEが2の時のみ
  36.   #   ウインドウy座標の基準
  37.   #   0:「ACTOR_WINDOW_POSのy座標」をウインドウの上端にする
  38.   #   1:「ACTOR_WINDOW_POSのy座標」をウインドウの下端にする
  39.   ACTOR_WINDOW_Y_MODE = 1
  40.   
  41.   
  42.   
  43.   # ※ACTOR_MODEが2の時のみ
  44.   #   コマンドウインドウの1ページの「縦の行数」の[最小数, 最大数]
  45.   #   行が「最小数」より少ない場合、余った行は空白
  46.   #   行が「最大数」より多い場合、スクロールで表示
  47.   ACTOR_ROW = [4, 8]
  48.   
  49.   # コマンドウインドウの[横の列数, ウインドウの横幅]
  50.   # 「横の列数」を nil にすると、横の列数はコマンドの数と同じになる
  51.   #   (列数とコマンドの数が同じ=1行で全コマンドを表示)
  52.   # ウインドウの横幅はデフォルトでは128
  53.   ACTOR_COL = [1, 128]
  54.   
  55.   
  56.   
  57.   # アクターコマンドに表示するコマンドを指定
  58.   #   :attack     攻撃
  59.   #   :skill      スキル
  60.   #   :guard      防御
  61.   #   :item       アイテム
  62.   #   :escape     逃走
  63.   #   :CW_party   パーティ編成 使用にはスクリプト「CW戦闘中パーティ編成」が必須
  64.   #   :DA_party   パーティ編成 使用には拡張「DAアクターコマンドPT編成」が必須
  65.   #   
  66.   # 指定した並び順でアクターコマンドに表示する 指定しなかったものは表示されない
  67.   # アイテムを使わないゲーム、攻撃と防御を無くしてスキルのみ使うゲーム、
  68.   # パーティコマンドを無くしてアクターコマンドで逃走するゲーム などが作れる
  69.   #   デフォルト          [:attack, :skill, :guard, :item]
  70.   #   逃走を追加          [:attack, :skill, :guard, :item, :escape]
  71.   #   パーティ編成を追加  [:attack, :skill, :guard, :item, :CW_party]
  72.   #ACTOR_COMMAND_LIST = [:attack, :skill, :guard, :item, :escape]
  73.   ACTOR_COMMAND_LIST = [:attack, :rout, :skill, :guard, :item, :escape] #sjr
  74.   
  75.   
  76.   
  77.   # アクターコマンドの各項目にアイコンを表示するかどうか
  78.   # true なら表示する false なら表示しない
  79.   ACTOR_ICON  = false
  80.   
  81.   # ※ACTOR_ICONが true の時のみ
  82.   #  スキルのスキルタイプごとのアイコン番号
  83.   ACTOR_ICON_SKILL  = [116, 117, 16, 16, 16, 16, 16, 16]
  84.   # ※ACTOR_ICONが true の時のみ
  85.   #   [通常攻撃, 防御, アイテム, 逃走] のアイコン番号
  86.   ACTOR_ICON_OTHER = [116, 160, 260, 467]
  87.   # ※ACTOR_ICONが true の時のみ
  88.   #   true  : 通常攻撃のアイコンを「装備している武器」のアイコンにする
  89.   #   false : 通常攻撃のアイコンを ACTOR_ICON_OTHER で設定したアイコンにする
  90.   #  (ここが true なら
  91.   #     スキルリストの「ID1番のスキル」も「装備している武器」のアイコンにする)
  92.   ACTOR_ICON_ATTACK_WEAPON = true
  93.   
  94.   
  95.   
  96.   # パーティコマンド(戦う、逃げる)の形式
  97.   #   0: ステータスの左に表示(デフォルトと同じ)
  98.   #   1: ステータスの右に表示(デフォルトのアクターコマンドの位置)
  99.   #   2: PARTY_WINDOW_POSで指定した位置に表示
  100.   #   3: 画面上部 横幅いっぱいに表示 項目横並び
  101.   #   4: 画面上部 横幅いっぱいに表示 項目縦並び
  102.   PARTY_MODE = 3
  103.   
  104.   # ※PARTY_MODEが2の時のみ
  105.   #   パーティコマンドウインドウの位置指定 [x座標, y座標]
  106.   PARTY_WINDOW_POS = [0, 0]
  107.   # ※PARTY_MODEが2の時のみ
  108.   #   パーティコマンドウインドウの横幅 デフォルトでは128
  109.   PARTY_WIDTH = 128
  110.   # ※PARTY_MODEが2の時のみ
  111.   #   パーティコマンドウインドウの1ページの「縦の行数」 デフォルトでは4
  112.   PARTY_ROW = 4
  113.   
  114.   # パーティコマンドの各項目にアイコンを表示するかどうか
  115.   # true なら表示する false なら表示しない
  116.   PARTY_ICON = false
  117.   # ※PARTY_ICON が true の時のみ
  118.   #   各項目のアイコン番号(パーティコマンドの数だけ設定)
  119.   PARTY_ICON_LIST = [147, 467, 16, 16, 16, 16]
  120.   
  121.   
  122.   # パーティコマンドを表示するかどうか
  123.   #  1: 表示する
  124.   #  2: 無くす
  125.   #  3: (他スクリプトとの競合発生率が高め)普段は表示しないが、
  126.   #     アクターコマンド入力中に PARTY_ON_ACTOR_BUTTON が押されると表示する
  127.   PARTY_USE_MODE = 2
  128.   
  129.   # PARTY_USE_MODE が 3 の時のみ
  130.   # アクターコマンドからパーティコマンドを開くボタン
  131.   #   「Qキー = :L」「Wキー = :R」
  132.   #   「Aキー = :X」「Sキー = :Y」「Dキー = :Z」「Shiftキー = :A」
  133.   PARTY_ON_ACTOR_BUTTON = []
  134.   # PARTY_USE_MODE が 3 の時のみ
  135.   # 「パーティコマンドからアクターコマンドに戻る」のに
  136.   # 「戦う」とキャンセルキーに加えて PARTY_ON_ACTOR_BUTTON の入力でも戻れるか
  137.   PARTY_ON_ACTOR_CLOSE_BY_OPEN_BUTTON   = true
  138.   
  139.   
  140.   # ステータスウインドウの横幅
  141.   #   0: デフォルトと同じ横幅
  142.   #   1: 画面サイズと同じ横幅(ゲージの長さなどもそれに合わせて表示されます)
  143.   STATUS_MODE = 1
  144.   
  145.   
  146.   
  147.   STATUS_X = [128, 128, 128]
  148.   # 画面下部の「パーティコマンドとステータスとアクターコマンド のセット」の位置
  149.   #
  150.   # それぞれ[パーティコマンド選択中, アクターコマンド選択中, ターン中]の位置指定
  151.   # 設定値は
  152.   #     0:右側に移動 アクターコマンドは右の画面外に押し出される
  153.   #    64:中央に移動 ターン中
  154.   #   128:左側に移動 パーティコマンドは左の画面外に押し出される
  155.   #   (ACTOR_MDOEやPARTY_MODEが2以上だと、
  156.   #  そのウインドウはずっと定位置にあるのでステータスと一緒に動くことはない)
  157.   # 設定例
  158.   #   ACTOR_MODEが0、PARTY_MODEが0   の時は[0, 128, 64]
  159.   #   ACTOR_MODEが0、PARTY_MODEが2以上 の時は[64, 128, 64]や[128, 128, 128]
  160.   #   ACTOR_MODEが2、PARTY_MODEが0   の時は[0, 64, 64]  や[0, 128, 128]
  161.   #   ACTOR_MODEが2、PARTY_MODEが2以上 の時は[64, 64, 64] や[128, 128, 128]
  162.   #   STATUS_MODEが1 の時は[128, 128, 128]
  163.   
  164.   
  165. =begin
  166.   
  167.   ももまるLabs 様「XPスタイルバトル」使用時
  168.   
  169.     ACTOR_MODE
  170.     ACTOR_WINDOW_POS
  171.     ACTOR_WINDOW_Y_MODE
  172.       は無効 アクターコマンドの座標は、XPスタイルバトル側の設定で決まる
  173.       
  174.     STATUS_MODE
  175.     STATUS_X
  176.       は無効
  177.       
  178.       
  179.   DEICIDE ALMA 様(代理配布:誰かへの宣戦布告 様)「XP風バトル」使用時
  180.   (XP風バトルへの対応確認は不十分なのでうまく動かない部分があるかもしれません)
  181.   
  182.     ACTOR_MODE
  183.     ACTOR_WINDOW_POS
  184.     ACTOR_WINDOW_Y_MODE
  185.       は無効
  186.       
  187.     STATUS_MODE
  188.     STATUS_X
  189.       は無効
  190.       
  191. =end
  192.   
  193. end

  194. #==============================================================================
  195. # ■ BattleCommand_Custom
  196. #==============================================================================
  197. module BattleCommand_Custom
  198.   def self.sideview?
  199.     begin
  200.       N03::ACTOR_POSITION
  201.       return true
  202.     rescue
  203.       return false
  204.     end
  205.   end
  206.   
  207.   def self.xp_style?
  208.     return ($lnx_include != nil and $lnx_include[:lnx11a] != nil)
  209.   end
  210.   def self.renne_xp_huu?
  211.     return ($renne_rgss3 != nil and $renne_rgss3[:xp_style_battle_a] != nil)
  212.   end
  213.   def self.no_layout_script?
  214.     return false if self.xp_style?
  215.     return false if self.renne_xp_huu?
  216.     return true
  217.   end
  218.   
  219.   STRRGSS2::PCOMMAND_W = false if self.renne_xp_huu?

  220.   def self.renne_member_change_in_battle?
  221.     return ($renne_rgss3 != nil and $renne_rgss3[:member_change_in_battle] != nil)
  222.   end
  223.   def self.ex_DA_party?
  224.     return false
  225.   end
  226.   
  227.   def self.default_under_viewport?
  228.     return false if self.xp_style?
  229.     return false if self.renne_xp_huu?
  230.     return true
  231.   end
  232.   def self.default_actor_command_window?
  233.     return false if self.xp_style?
  234.     return false if self.renne_xp_huu?
  235.     return false if ACTOR_MODE == 2
  236.     return true
  237.   end
  238. end

  239. $cwinter_script_battle_command_custom = true

  240. #==============================================================================
  241. # ■ Scene_Battle
  242. #==============================================================================
  243. class Scene_Battle < Scene_Base
  244.   #--------------------------------------------------------------------------
  245.   # ● 情報表示ビューポートの更新
  246.   #--------------------------------------------------------------------------
  247.   def update_info_viewport
  248.     if BattleCommand_Custom.default_under_viewport?
  249.       move_info_viewport(BattleCommand_Custom::STATUS_X[0]) if @party_command_window.active
  250.       move_info_viewport(BattleCommand_Custom::STATUS_X[1]) if @actor_command_window.active
  251.       move_info_viewport(BattleCommand_Custom::STATUS_X[2]) if BattleManager.in_turn?
  252.     end
  253.     if sideview_actor_pos_command?
  254.       @actor_command_window.set_position
  255.     end
  256.   end
  257.   def sideview_actor_pos_command?
  258.     return false
  259.   end
  260.   #--------------------------------------------------------------------------
  261.   # ● 全ウィンドウの作成
  262.   #--------------------------------------------------------------------------
  263.   alias :battle_command_custom_create_all_windows :create_all_windows
  264.   def create_all_windows
  265.     battle_command_custom_create_all_windows
  266.     default_create_all_windows      if BattleCommand_Custom.no_layout_script?
  267.     xp_style_create_all_windows     if BattleCommand_Custom.xp_style?
  268.     renne_xp_huu_create_all_windows if BattleCommand_Custom.renne_xp_huu?
  269.     set_ex_handler
  270.   end
  271.   def default_create_all_windows
  272.     # アクターコマンドの位置を変えると
  273.     # ウインドウリフォーム使用時にスキルウインドウ等と重なって変なことになる
  274.     # のを防止するためz座標を変更
  275.     @actor_command_window.z = 5
  276.     @actor_command_window.viewport = nil if BattleCommand_Custom::ACTOR_MODE >= 2
  277.     @party_command_window.viewport = nil if BattleCommand_Custom::PARTY_MODE >= 2
  278.     @actor_command_window.x = 0 if BattleCommand_Custom::ACTOR_MODE == 1
  279.     case BattleCommand_Custom::PARTY_MODE
  280.     when 1
  281.       @party_command_window.x = Graphics.width
  282.     when 2
  283.       @party_command_window.x = BattleCommand_Custom::PARTY_WINDOW_POS[0]
  284.       @party_command_window.y = BattleCommand_Custom::PARTY_WINDOW_POS[1]
  285.     end
  286.     if BattleCommand_Custom::PARTY_USE_MODE == 1
  287.       @info_viewport.ox = BattleCommand_Custom::STATUS_X[0]
  288.     else
  289.       @info_viewport.ox = BattleCommand_Custom::STATUS_X[1]
  290.     end
  291.   end
  292.   def xp_style_create_all_windows
  293.   end
  294.   def renne_xp_huu_create_all_windows
  295.   end
  296.   #--------------------------------------------------------------------------
  297.   # ● ハンドラの追加
  298.   #--------------------------------------------------------------------------
  299.   def set_ex_handler
  300.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  301.       @party_command_window.set_handler(:fight_on_actor,  method(:command_fight_on_actor))
  302.       @party_command_window.set_handler(:cancel,  method(:command_fight_on_actor))
  303.     end
  304.     @actor_command_window.set_handler(:party_on_actor, method(:open_party_command_on_actor))
  305.     @actor_command_window.set_handler(:escape, method(:command_escape))
  306.     if defined?(command_CW_formation)
  307.       @actor_command_window.set_handler(:CW_party, method(:command_CW_formation))
  308.     end
  309.   end
  310.   #--------------------------------------------------------------------------
  311.   # ○ アクタースプライトの作成
  312.   #--------------------------------------------------------------------------
  313.   def sv_re_create_actor_sprites
  314.     @spriteset.dispose_actors
  315.     @spriteset.create_actors
  316.     refresh_status
  317.     Graphics.frame_reset
  318.   end
  319.   #--------------------------------------------------------------------------
  320.   # ○ CWパーティ編成 ステータスの再作成
  321.   #--------------------------------------------------------------------------
  322.   def cw_status_window_reset
  323.     if BattleCommand_Custom.xp_style?
  324.       # XPスタイルバトル SVXP
  325.       refresh_actors
  326.     elsif BattleCommand_Custom.sideview?
  327.       # サイドビュー
  328.       sv_re_create_actor_sprites
  329.     elsif BattleCommand_Custom.renne_xp_huu?
  330.       # XP風バトル
  331.       process_event
  332.       refresh_status
  333.     end
  334.   end
  335. end
  336. if BattleCommand_Custom.renne_member_change_in_battle?
  337. #==============================================================================
  338. # ■ Scene_Battle
  339. #==============================================================================
  340. class Scene_Battle < Scene_Base
  341.   #--------------------------------------------------------------------------
  342.   # ○ PT編成選択終了
  343.   #--------------------------------------------------------------------------
  344.   alias :battle_command_custom_member_change_end :member_change_end
  345.   def member_change_end
  346.     cw_status_window_reset
  347.     battle_command_custom_member_change_end
  348.   end
  349. end
  350. end


  351. #==============================================================================
  352. # ■ Window_ActorCommand
  353. #==============================================================================
  354. class Window_ActorCommand < Window_Command
  355.   #--------------------------------------------------------------------------
  356.   # ● 桁数の取得
  357.   #--------------------------------------------------------------------------
  358.   def col_max
  359.     if BattleCommand_Custom::ACTOR_COL[0] == nil
  360.       return @list.size == 0 ? 1 : @list.size
  361.     else
  362.       return BattleCommand_Custom::ACTOR_COL[0]
  363.     end
  364.   end
  365.   #--------------------------------------------------------------------------
  366.   # ● カーソルを下に移動
  367.   #--------------------------------------------------------------------------
  368.   def cursor_down(wrap = false)
  369.     return if item_max <= 1
  370.     return if (item_max - 1) / col_max <= 0
  371.     if wrap || (index / col_max != (item_max - 1) / col_max)
  372.       i = index + col_max
  373.       if i >= item_max
  374.         if index / col_max == (item_max - 1) / col_max
  375.           i = index % col_max
  376.         else
  377.           i = item_max - 1
  378.         end
  379.       end
  380.       select(i)
  381.     end
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● カーソルを上に移動
  385.   #--------------------------------------------------------------------------
  386.   def cursor_up(wrap = false)
  387.     return if item_max <= 1
  388.     return if (item_max - 1) / col_max <= 0
  389.     if wrap || (index / col_max != 0)
  390.       i = index - col_max
  391.       if i < 0
  392.         if index % col_max <= (item_max - 1) % col_max
  393.           i = index + (item_max - 1) / col_max * col_max
  394.         else
  395.           i = item_max - 1
  396.         end
  397.       end
  398.       select(i)
  399.     end
  400.   end
  401.   #--------------------------------------------------------------------------
  402.   # ● カーソルを右に移動
  403.   #--------------------------------------------------------------------------
  404.   def cursor_right(wrap = false)
  405.     return if item_max <= 1
  406.     return if col_max <= 1
  407.     if wrap || (index % col_max != (col_max - 1))
  408.       i = index + 1
  409.       if (i >= item_max) or (index / col_max != i / col_max)
  410.         i -= col_max
  411.         i = [i, 0].max
  412.       end
  413.       select(i)
  414.     end
  415.   end
  416.   #--------------------------------------------------------------------------
  417.   # ● カーソルを左に移動
  418.   #--------------------------------------------------------------------------
  419.   def cursor_left(wrap = false)
  420.     return if item_max <= 1
  421.     return if col_max <= 1
  422.     if wrap || (index % col_max != 0)
  423.       i = index - 1
  424.       if index / col_max != i / col_max
  425.         if i + col_max < item_max
  426.           i += col_max
  427.         end
  428.       end
  429.       select(i)
  430.     end
  431.   end
  432.   #--------------------------------------------------------------------------
  433.   # ● ウィンドウ幅の取得
  434.   #--------------------------------------------------------------------------
  435.   def original_window_width
  436.     return BattleCommand_Custom::ACTOR_COL[1]
  437.   end
  438.   def window_width
  439.     return original_window_width
  440.   end
  441.   #--------------------------------------------------------------------------
  442.   # ● ウィンドウ高さの取得
  443.   #--------------------------------------------------------------------------
  444.   def original_window_height
  445.     if BattleCommand_Custom.default_actor_command_window?
  446.       return 120
  447.     else
  448.       fitting_height(visible_line_number)
  449.     end
  450.   end
  451.   def window_height
  452.     return original_window_height
  453.   end
  454.   #--------------------------------------------------------------------------
  455.   # ● 表示行数の取得
  456.   #--------------------------------------------------------------------------
  457.   def visible_line_number
  458.     if (not BattleCommand_Custom.default_actor_command_window?)
  459.       return custom_visible_line_number
  460.     else
  461.       return default_visible_line_number
  462.     end
  463.   end
  464.   def default_visible_line_number
  465.     return 4
  466.   end
  467.   def custom_visible_line_number
  468.     n = @list.size / col_max + (@list.size % col_max > 0 ? 1 : 0)
  469.     n = [BattleCommand_Custom::ACTOR_ROW[0], n].max
  470.     n = [BattleCommand_Custom::ACTOR_ROW[1], n].min
  471.     return n
  472.   end
  473.   #--------------------------------------------------------------------------
  474.   # ● 横に項目が並ぶときの空白の幅を取得
  475.   #--------------------------------------------------------------------------
  476.   def spacing
  477.     return 0
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● セットアップ
  481.   #--------------------------------------------------------------------------
  482.   alias :battle_command_custom_setup :setup
  483.   def setup(actor)
  484.     battle_command_custom_setup(actor)
  485.     show
  486.     open
  487.     self.arrows_visible = true
  488.   end
  489.   #--------------------------------------------------------------------------
  490.   # ● コマンドリストの作成
  491.   #--------------------------------------------------------------------------
  492.   def make_command_list
  493.     return unless @actor
  494.     for symbol in BattleCommand_Custom::ACTOR_COMMAND_LIST
  495.       make_command_list_by_symbol(symbol)
  496.     end
  497.     set_position if BattleCommand_Custom::ACTOR_MODE >= 2
  498.   end
  499.   def make_command_list_by_symbol(symbol)
  500.     case symbol
  501.     when :attack    ; add_attack_command
  502.      
  503.     when :rout ;add_rout_command #sjr  
  504.       
  505.     when :skill     ; add_skill_commands
  506.     when :guard     ; add_guard_command
  507.     when :item      ; add_item_command
  508.     when :escape    ; add_escape_command
  509.     when :CW_party  ; add_CW_party_command
  510.     when :DA_party  ; add_DA_party_command
  511.     end
  512.   end
  513.   #--------------------------------------------------------------------------
  514.   # ● パーティ編成コマンドの追加
  515.   #--------------------------------------------------------------------------
  516.   def add_CW_party_command
  517.     unless $cwinter_script_battle_formation
  518.       text  = "エラー「戦闘コマンドカスタム」nn"
  519.       text += "元スクリプト「CW戦闘中パーティ編成」が導入されていませんnn"
  520.       text += "元スクリプト「CW戦闘中パーティ編成」を導入するかn"
  521.       text += "設定項目 ACTOR_COMMAND_LIST から :CW_party を消してください"
  522.       msgbox text
  523.     end
  524.     name = BATTLE_FORMATION::BATTLE_COMMAND_NAME
  525.     icon = BATTLE_FORMATION::ACTOR_ICON_CW_MEMBER_CHANGE
  526.     flag = BATTLE_FORMATION.can_CW_formation?
  527.     add_command([name, icon], :CW_party, flag)
  528.   end
  529.   #--------------------------------------------------------------------------
  530.   # ● パーティ編成コマンドの追加
  531.   #--------------------------------------------------------------------------
  532.   def add_DA_party_command
  533.     unless BattleCommand_Custom.ex_DA_party?
  534.       text  = "エラー「戦闘コマンドカスタム」nn"
  535.       text += "拡張スクリプト「DAアクターコマンドPT編成」が導入されていませんnn"
  536.       text += "拡張スクリプト「DAアクターコマンドPT編成」を導入するかn"
  537.       text += "設定項目 ACTOR_COMMAND_LIST から :DA_party を消してください"
  538.       msgbox text
  539.     end
  540.     name = RENNE::Member_Change::NAME
  541.     icon = BattleCommand_Custom::ACTOR_ICON_MEMBER_CHANGE
  542.     flag = true
  543.     add_command([name, icon], :DA_party, flag)
  544.   end
  545.   #--------------------------------------------------------------------------
  546.   # ● 項目の描画
  547.   #--------------------------------------------------------------------------
  548.   def draw_item(index)
  549.     change_color(normal_color, command_enabled?(index))
  550.     par = command_name(index)
  551.     rect = item_rect_for_text(index)
  552.     if BattleCommand_Custom::ACTOR_ICON
  553.       draw_icon(par[1], rect.x, rect.y)
  554.       rect.x += 24
  555.       rect.width -= 24
  556.       draw_text(rect, par[0], alignment)
  557.     else
  558.       draw_text(rect, par[0], alignment)
  559.     end
  560.   end
  561.   #--------------------------------------------------------------------------
  562.   # ● 高さと座標の更新
  563.   #--------------------------------------------------------------------------
  564.   def set_position
  565.     self.height = window_height
  566.     pos = window_pos
  567.     if $cwinter_script_actor_command_reform_ex_image
  568.       l_space = left_space
  569.       t_space = top_space
  570.       u_space = under_space
  571.     else
  572.       l_space = 0
  573.       t_space = 0
  574.       u_space = 0
  575.     end
  576.     self.x = pos[0] + l_space
  577.     if BattleCommand_Custom::ACTOR_WINDOW_Y_MODE == 0
  578.       self.y = pos[1] + t_space
  579.     else
  580.       self.y = pos[1] - self.height - u_space
  581.     end
  582.   end
  583.   def window_pos
  584.     return BattleCommand_Custom::ACTOR_WINDOW_POS
  585.   end
  586.   #--------------------------------------------------------------------------
  587.   # ● [追加]:X 座標をアクターに合わせる
  588.   #--------------------------------------------------------------------------
  589.   def actor_x(actor)
  590.     if $cwinter_script_actor_command_reform_ex_image
  591.       l_space = left_space
  592.     else
  593.       l_space = 0
  594.     end
  595.     left_width  = self.width - l_space
  596.     right_width = self.width
  597.     ax = $game_party.members_screen_x_nooffset[actor.index] - left_width / 2
  598.     left_pad  = LNX11::STATUS_SIDE_PADDING / 2 + l_space
  599.     right_pad = LNX11::STATUS_SIDE_PADDING / 2
  600.     # 画面内に収める
  601.     self.x = [[ax, left_pad].max, Graphics.width - right_pad - right_width].min
  602.     self.x += LNX11::ACTOR_COMMAND_OFFSET[:x]
  603.   end
  604.   #--------------------------------------------------------------------------
  605.   # ● [追加]:Y 座標をアクターに合わせる
  606.   #--------------------------------------------------------------------------
  607.   def actor_y(actor)
  608.     if $cwinter_script_actor_command_reform_ex_image
  609.       u_space = under_space
  610.     else
  611.       u_space = 0
  612.     end
  613.     self_height = self.height + u_space
  614.     self.y = actor.screen_y_top - self_height
  615.     self.y += LNX11::ACTOR_COMMAND_OFFSET[:y]
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # ● [追加]:固定 Y 座標
  619.   #--------------------------------------------------------------------------
  620.   def screen_y
  621.     if $cwinter_script_actor_command_reform_ex_image
  622.       u_space = under_space
  623.     else
  624.       u_space = 0
  625.     end
  626.     if LNX11::ACTOR_COMMAND_Y_POSITION == 0
  627.       self_height = self.height + u_space
  628.       self.y = Graphics.height - self_height + LNX11::ACTOR_COMMAND_OFFSET[:y]
  629.     else
  630.       self.y = LNX11::ACTOR_COMMAND_OFFSET[:y]
  631.     end
  632.   end
  633.   #--------------------------------------------------------------------------
  634.   # ● 攻撃コマンドをリストに追加
  635.   #--------------------------------------------------------------------------
  636.   def add_attack_command
  637.     if BattleCommand_Custom::ACTOR_ICON_ATTACK_WEAPON and @actor.weapons[0]
  638.       par = [Vocab::attack, @actor.weapons[0].icon_index]
  639.     else
  640.       par = [Vocab::attack, BattleCommand_Custom::ACTOR_ICON_OTHER[0]]
  641.     end
  642.     add_command(par, :attack, @actor.attack_usable?)
  643.   end
  644.   #--------------------------------------------------------------------------
  645.   # ● スキルコマンドをリストに追加
  646.   #--------------------------------------------------------------------------
  647.   def add_skill_commands
  648.     @actor.added_skill_types.sort.each do |stype_id|
  649.       name = $data_system.skill_types[stype_id]
  650.       par = [name, BattleCommand_Custom::ACTOR_ICON_SKILL[stype_id - 1]]
  651.       add_command(par, :skill, true, stype_id)
  652.     end
  653.   end
  654.   #--------------------------------------------------------------------------
  655.   # ● 防御コマンドをリストに追加
  656.   #--------------------------------------------------------------------------
  657.   def add_guard_command
  658.     par = [Vocab::guard, BattleCommand_Custom::ACTOR_ICON_OTHER[1]]
  659.     add_command(par, :guard, @actor.guard_usable?)
  660.   end
  661.   #--------------------------------------------------------------------------
  662.   # ● アイテムコマンドをリストに追加
  663.   #--------------------------------------------------------------------------
  664.   def add_item_command
  665.     par = [Vocab::item, BattleCommand_Custom::ACTOR_ICON_OTHER[2]]
  666.     add_command(par, :item)
  667.   end
  668.   #--------------------------------------------------------------------------
  669.   # ● 逃走コマンドをリストに追加
  670.   #--------------------------------------------------------------------------
  671.   def add_escape_command
  672.     par = [Vocab::escape, BattleCommand_Custom::ACTOR_ICON_OTHER[3]]
  673.     add_command(par, :escape, BattleManager.can_escape?)
  674.   end
  675. end
  676. #==============================================================================
  677. # ■ Window_SkillList
  678. #==============================================================================
  679. class Window_SkillList < Window_Selectable
  680.   #--------------------------------------------------------------------------
  681.   # ● アイテム名の描画
  682.   #--------------------------------------------------------------------------
  683.   def draw_item_name(item, x, y, enabled = true, width = 172)
  684.     return unless item
  685.     if item.id == 1 and
  686.        BattleCommand_Custom::ACTOR_ICON_ATTACK_WEAPON and @actor.weapons[0]
  687.       icon = @actor.weapons[0].icon_index
  688.     else
  689.       icon = item.icon_index
  690.     end
  691.     draw_icon(icon, x, y, enabled)
  692.     change_color(normal_color, enabled)
  693.     draw_text(x + 24, y, width, line_height, item.name)
  694.   end
  695. end
  696. if [2, 3, 4].include?(BattleCommand_Custom::PARTY_MODE)
  697. #==============================================================================
  698. # ■ Window_PartyCommand
  699. #==============================================================================
  700. class Window_PartyCommand < Window_Command
  701.   #--------------------------------------------------------------------------
  702.   # ● ウィンドウ幅の取得
  703.   #--------------------------------------------------------------------------
  704.   def window_width
  705.     case BattleCommand_Custom::PARTY_MODE
  706.     when 2; return BattleCommand_Custom::PARTY_WIDTH
  707.     when 3; return Graphics.width
  708.     when 4; return Graphics.width
  709.     end
  710.   end
  711.   #--------------------------------------------------------------------------
  712.   # ● 表示行数の取得
  713.   #--------------------------------------------------------------------------
  714.   def visible_line_number
  715.     case BattleCommand_Custom::PARTY_MODE
  716.     when 2; return BattleCommand_Custom::PARTY_ROW
  717.     when 3; return 1
  718.     when 4; return @list.size
  719.     end
  720.   end
  721.   #--------------------------------------------------------------------------
  722.   # ● 桁数の取得
  723.   #--------------------------------------------------------------------------
  724.   def col_max
  725.     case BattleCommand_Custom::PARTY_MODE
  726.     when 2; return 1
  727.     when 3; return @list.size
  728.     when 4; return 1
  729.     end
  730.   end
  731.   #--------------------------------------------------------------------------
  732.   # ● 横に項目が並ぶときの空白の幅を取得
  733.   #--------------------------------------------------------------------------
  734.   def spacing
  735.     return 16
  736.   end
  737.   #--------------------------------------------------------------------------
  738.   # ● 項目の描画
  739.   #--------------------------------------------------------------------------
  740.   def draw_item(index)
  741.     case BattleCommand_Custom::PARTY_MODE
  742.     when 2; return draw_item_alignment_0(index)
  743.     when 3; return draw_item_alignment_1(index)
  744.     when 4; return draw_item_alignment_1(index)
  745.     end
  746.   end
  747.   #--------------------------------------------------------------------------
  748.   # ● 項目の描画
  749.   #--------------------------------------------------------------------------
  750.   def draw_item_alignment_0(index)
  751.     rect   = item_rect_for_text(index)
  752.     enable = command_enabled?(index)
  753.     if BattleCommand_Custom::PARTY_ICON
  754.       x = rect.x
  755.       y = rect.y
  756.       draw_icon(BattleCommand_Custom::PARTY_ICON_LIST[index], x, y, enable)
  757.       rect.x += 24
  758.     end
  759.     change_color(normal_color, enable)
  760.     draw_text(rect, command_name(index), 0)
  761.   end
  762.   #--------------------------------------------------------------------------
  763.   # ● 項目の描画
  764.   #--------------------------------------------------------------------------
  765.   def draw_item_alignment_1(index)
  766.     rect   = item_rect_for_text(index)
  767.     enable = command_enabled?(index)
  768.     if BattleCommand_Custom::PARTY_ICON
  769.       t_rect = self.contents.text_size(command_name(index))
  770.       x = rect.x + (rect.width / 2 - t_rect.width / 2) - 25
  771.       y = rect.y
  772.       draw_icon(BattleCommand_Custom::PARTY_ICON_LIST[index], x, y, enable)
  773.     end
  774.     rect   = item_rect_for_text(index)
  775.     change_color(normal_color, enable)
  776.     draw_text(rect, command_name(index), 1)
  777.   end
  778. end
  779. end
  780. #==============================================================================
  781. # ■ Window_PartyCommand
  782. #==============================================================================
  783. class Window_PartyCommand < Window_Command
  784.   #--------------------------------------------------------------------------
  785.   # ● セットアップ
  786.   #--------------------------------------------------------------------------
  787.   alias :setup_on_actor :setup
  788.   def setup
  789.     if BattleCommand_Custom::PARTY_USE_MODE == 1
  790.       setup_on_actor
  791.     else
  792.       call_handler(:fight)
  793.     end
  794.   end
  795. end
  796. # PARTY_USE_MODE
  797. #==============================================================================
  798. # ■ Window_PartyCommand
  799. #==============================================================================
  800. class Window_PartyCommand < Window_Command
  801.   #--------------------------------------------------------------------------
  802.   # ● コマンドリストの作成
  803.   #--------------------------------------------------------------------------
  804.   alias :battle_command_custom_make_command_list :make_command_list
  805.   def make_command_list
  806.     battle_command_custom_make_command_list
  807.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  808.       @list[0][:symbol] = :fight_on_actor
  809.     end
  810.   end
  811.   #--------------------------------------------------------------------------
  812.   # ● 決定やキャンセルなどのハンドリング処理
  813.   #--------------------------------------------------------------------------
  814.   def process_handling
  815.     return unless open? && active
  816.     return process_ok       if ok_enabled?        && Input.trigger?(:C)
  817.     return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
  818.     if BattleCommand_Custom::PARTY_ON_ACTOR_CLOSE_BY_OPEN_BUTTON
  819.       for symbol in BattleCommand_Custom::PARTY_ON_ACTOR_BUTTON
  820.         return process_cancel   if cancel_enabled?    && Input.trigger?(symbol)
  821.       end
  822.     end
  823.     return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
  824.     return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  825.   end
  826. end
  827. #==============================================================================
  828. # ■ Window_ActorCommand
  829. #==============================================================================
  830. class Window_ActorCommand < Window_Command
  831.   #--------------------------------------------------------------------------
  832.   # ● 決定やキャンセルなどのハンドリング処理
  833.   #--------------------------------------------------------------------------
  834.   def process_handling
  835.     return unless open? && active
  836.     return process_ok       if ok_enabled?        && Input.trigger?(:C)
  837.     return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
  838.     if BattleCommand_Custom::PARTY_USE_MODE == 3
  839.       for symbol in BattleCommand_Custom::PARTY_ON_ACTOR_BUTTON
  840.         return process_party_on_actor if handle?(:party_on_actor) && Input.trigger?(symbol)
  841.       end
  842.     end
  843.     return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
  844.     return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  845.   end
  846.   #--------------------------------------------------------------------------
  847.   # ● サブウインドウキーが押された時の処理
  848.   #--------------------------------------------------------------------------
  849.   def process_party_on_actor
  850.     Sound.play_ok
  851.     Input.update
  852.     # XPスタイルバトル導入時は deactivate を使うと自動的に hide されるため
  853.     # deactivateは使わない
  854.     self.active = false
  855.     call_handler(:party_on_actor)
  856.   end
  857. end
  858. #==============================================================================
  859. # ■ Scene_Battle
  860. #==============================================================================
  861. class Scene_Battle < Scene_Base
  862.   def open_party_command_on_actor
  863.     @actor_command_window.close
  864.     @actor_command_window.deactivate
  865.     @party_command_window.setup_on_actor
  866.   end
  867.   def command_fight_on_actor
  868.     start_actor_command_selection
  869.   end
  870.   #--------------------------------------------------------------------------
  871.   # ● アクターコマンド選択の開始
  872.   #--------------------------------------------------------------------------
  873.   alias :battle_command_custom_start_actor_command_selection :start_actor_command_selection
  874.   def start_actor_command_selection
  875.     if BattleManager.actor == nil
  876.       next_command
  877.     else
  878.       battle_command_custom_start_actor_command_selection
  879.     end
  880.   end
  881. end
  882. # PARTY_USE_MODE
  883. if BattleCommand_Custom.no_layout_script? and
  884.    BattleCommand_Custom::STATUS_MODE == 1
  885. #==============================================================================
  886. # ■ Window_BattleStatus
  887. #==============================================================================
  888. class Window_BattleStatus < Window_Selectable
  889.   #--------------------------------------------------------------------------
  890.   # ● ウィンドウ幅の取得
  891.   #--------------------------------------------------------------------------
  892.   def window_width
  893.     Graphics.width
  894.   end
  895.   #--------------------------------------------------------------------------
  896.   # ● ゲージエリアの幅を取得
  897.   #--------------------------------------------------------------------------
  898.   def gauge_area_width
  899.     return 348
  900.   end
  901.   #--------------------------------------------------------------------------
  902.   # ● ゲージエリアの描画(TP あり)
  903.   #--------------------------------------------------------------------------
  904.   def draw_gauge_area_with_tp(rect, actor)
  905.     draw_actor_hp(actor, rect.x + 128 - 60 + 0, rect.y, 72 + 20)
  906.     draw_actor_mp(actor, rect.x + 128 - 40 + 82, rect.y, 64 + 20)
  907.     draw_actor_tp(actor, rect.x + 128 - 20 + 156, rect.y, 64 + 20)
  908.   end
  909.   #--------------------------------------------------------------------------
  910.   # ● ゲージエリアの描画(TP なし)
  911.   #--------------------------------------------------------------------------
  912.   def draw_gauge_area_without_tp(rect, actor)
  913.     draw_actor_hp(actor, rect.x + 128 - 60 + 0, rect.y, 134 + 30)
  914.     draw_actor_mp(actor, rect.x + 128 - 30 + 144,  rect.y, 76 + 30)
  915.   end
  916. end
  917. #==============================================================================
  918. # ■ Window_BattleActor
  919. #==============================================================================
  920. class Window_BattleActor < Window_BattleStatus
  921.   #--------------------------------------------------------------------------
  922.   # ● ウィンドウ幅の取得
  923.   #--------------------------------------------------------------------------
  924.   def window_width
  925.     Graphics.width - 128
  926.   end
  927.   #--------------------------------------------------------------------------
  928.   # ● ゲージエリアの幅を取得
  929.   #--------------------------------------------------------------------------
  930.   def gauge_area_width
  931.     return 220
  932.   end
  933.   #--------------------------------------------------------------------------
  934.   # ● ゲージエリアの描画(TP あり)
  935.   #--------------------------------------------------------------------------
  936.   def draw_gauge_area_with_tp(rect, actor)
  937.     draw_actor_hp(actor, rect.x + 0, rect.y, 72)
  938.     draw_actor_mp(actor, rect.x + 82, rect.y, 64)
  939.     draw_actor_tp(actor, rect.x + 156, rect.y, 64)
  940.   end
  941.   #--------------------------------------------------------------------------
  942.   # ● ゲージエリアの描画(TP なし)
  943.   #--------------------------------------------------------------------------
  944.   def draw_gauge_area_without_tp(rect, actor)
  945.     draw_actor_hp(actor, rect.x + 0, rect.y, 134)
  946.     draw_actor_mp(actor, rect.x + 144,  rect.y, 76)
  947.   end
  948. end
  949. end
复制代码


点评

抱歉到现在才看到,解决了感谢  发表于 2024-8-6 20:03

评分

参与人数 1+1 收起 理由
chen12311 + 1 认可答案

查看全部评分


提高解答机会的方法:
看一下对应版本的帮助文件 看天气预报说今天不下雨
改变问题为更有可能的或常见的 如:天气自动变化下雨→天气系统 果然不准呀~
使用论坛的搜索功能查找相关问题 好丧啊... ...想看女装
清楚说明实际上你想解决的问题  想看坛友的女装  
脚本自己有改过的地方要标明  不要遮脸的
脚本有问题但不是默认的要全部贴出来 大胆点,尽情发
三包原则:包有BUG,包甩锅,包咕咕
回复 支持 1 反对 0

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5895
在线时间
788 小时
注册时间
2019-1-20
帖子
201
9
发表于 2024-7-31 14:03:56 | 只看该作者
chen12311 发表于 2024-7-31 11:42
是这个
#==============================================================================
# RGSS3_戦闘 ...

可以的话,把 弱点击破 的源网址或者原脚本发一下吧,为什么不能使用?OTL

提高解答机会的方法:
看一下对应版本的帮助文件 看天气预报说今天不下雨
改变问题为更有可能的或常见的 如:天气自动变化下雨→天气系统 果然不准呀~
使用论坛的搜索功能查找相关问题 好丧啊... ...想看女装
清楚说明实际上你想解决的问题  想看坛友的女装  
脚本自己有改过的地方要标明  不要遮脸的
脚本有问题但不是默认的要全部贴出来 大胆点,尽情发
三包原则:包有BUG,包甩锅,包咕咕
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
556
在线时间
82 小时
注册时间
2024-4-13
帖子
55
10
 楼主| 发表于 2024-7-31 15:03:12 | 只看该作者
本帖最后由 chen12311 于 2024-8-2 16:53 编辑

这个是我现在写的代码,看起来会有点乱
RUBY 代码复制
  1. module Text
  2.   SKILL_ID=[]       
  3.   ROUT_ID=[]
  4.   ZHU_ID=[]
  5.   ZHU_RATE=[]
  6.   ZHU_SKILL_RATE=[]
  7.  
  8.   #主武器无法ID#
  9.   ZHU_RATE[1]=[107,108,109,110,111]
  10.   ZHU_RATE[2]=124
  11.   #主武器状态ID#
  12.   ZHU_SKILL_RATE[1]=[106,116,117,118]
  13.   #副武器状态无法ID#
  14.   RATE_ID=[86,92,70,71]
  15.   #副武器技能ID#
  16.   ROUT=[1,2,3]
  17.   ZHU_ROUT=[1,2,3,4,5]
  18.   ROUT_ID[1]=[5,44,47]
  19.   #主武器技能ID#
  20.   ROUT_ID[2]=[158,166,167,168,169]
  21.   ROUT_ID[3]=187
  22.   #副武器数据库ID#
  23.   SKILL_I=[1,2,3]
  24.   SKILL_ID[1]=["霰弹击溃",69]
  25.   SKILL_ID[2]=["枪火击溃",70]
  26.   SKILL_ID[3]=["枪火击溃",71]
  27.   #主武器数据库ID#
  28.   ZHU_II=[1,2,3,4]
  29.   ZHU_ID[1]=["炮火击溃",126]
  30.   ZHU_ID[2]=["炮火击溃",127]
  31.   ZHU_ID[3]=["炮火击溃",128]
  32.   ZHU_ID[4]=["炮火击溃",129]
  33.   ZHU_ID[5]=["炮火击溃",130]
  34.   ZHU_ID[6]=["法术轰击",169]
  35.  
  36.   SKILL=["弱点击溃",27]#弱点击溃技能ID#
  37. end
  38. #获得技能ID
  39. class NilClass
  40.   def method_missing(m, *args, &block)
  41.     self
  42.   end
  43. end
  44. class Game_Action
  45.   def rout?
  46.     item == $data_skills[subject.rout_skill_id]
  47.   end
  48.   def set_rout
  49.     set_skill(subject.rout_skill_id)
  50.     self
  51.   end
  52. end
  53. class Game_BattlerBase
  54.   def rout_skill_id
  55.     Text::SKILL_I.each {|i|return Text::ROUT_ID[1][i-1] if $game_party.battle_members[0].equips[1].id == Text::SKILL_ID[i][1] }
  56. ###
  57.     Text::ZHU_II.each {|i|return Text::ROUT_ID[2][i-1] if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[i][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_SKILL_RATE[1][i-1])== true}
  58.     return Text::ROUT_ID[2][4] if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[5][1]
  59. ###
  60.     return Text::ROUT_ID[3] if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[6][1]
  61. ###
  62.     return Text::SKILL[1]
  63.   end
  64. #判定技能使用
  65.   def rout_usable?
  66.     usable?($data_skills[rout_skill_id])
  67.   end
  68. end
  69. class Window_ActorCommand < Window_Command
  70.   def add_rout_command
  71.     add_command(Vocab::rout, :rout, @actor.rout_usable?)
  72.   end
  73. end
  74. class Scene_Battle < Scene_Base
  75.   def command_rout
  76.     BattleManager.actor.input.set_rout
  77.     select_enemy_selection
  78.   end
  79. end
  80. #以上为谈话技能选项的前台,不能显示谈判选项
  81. class Game_Temp
  82.   attr_accessor :battle_rout
  83.   alias initialize_battle_rout initialize
  84.   def initialize
  85.     initialize_battle_rout  
  86.   end
  87. end
  88. class Window_ActorCommand < Window_Command
  89.   def add_rout_command
  90.     Text::SKILL_I.each {|i| return add_command([Text::SKILL_ID[i][0], nil], :rout, true) if $game_party.battle_members[0].equips[1].id == Text::SKILL_ID[i][1]}
  91. ####
  92.     Text::ZHU_II.each {|i| return add_command([Text::ZHU_ID[i][0], nil], :rout, true) if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[i][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_SKILL_RATE[1][i-1])== true}
  93.     return add_command([Text::ZHU_ID[5][0], nil], :rout, true) if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[5][1]
  94. ####
  95.     return add_command([Text::ZHU_ID[6][0], nil], :rout, true) if $game_party.battle_members[0].equips[0].id == Text::ZHU_ID[6][1]
  96. ####
  97.     return add_command(Text::SKILL, :rout, true)
  98.   end
  99.  
  100.   alias make_command_list_rout make_command_list
  101.   def make_command_list
  102.     make_command_list_rout
  103.     add_rout_command
  104.   end
  105.   def set_up(a)
  106.     @actor=a
  107.     clear_command_list
  108.     make_command_list
  109.     refresh
  110.     select(0)
  111.     activate
  112.     open
  113.   end
  114. end
  115.  
  116. class Scene_Battle < Scene_Base
  117.   alias create_all_windows_rout create_all_windows
  118.   def create_all_windows
  119.     create_all_windows_rout
  120.   end
  121.   alias create_actor_command_window_rout create_actor_command_window
  122.   def create_actor_command_window
  123.     create_actor_command_window_rout
  124.     @actor_command_window.set_handler(:rout, method(:command_rout))
  125.   end
  126.   #--------------------------------------------------------------------------
  127.   # ● 确定敌人
  128.   #--------------------------------------------------------------------------
  129.   def on_enemy_ok
  130.     BattleManager.actor.input.target_index = @enemy_window.enemy.index
  131.     @enemy_window.hide
  132.     @skill_window.hide
  133.     @item_window.hide
  134.     next_command
  135.   end
  136.   #--------------------------------------------------------------------------
  137.   # ● 敌人“取消”
  138.   #--------------------------------------------------------------------------
  139.   alias rout_on_enemy_cancel on_enemy_cancel
  140.   def on_enemy_cancel
  141.     case @actor_command_window.current_symbol
  142.     when :rout
  143.       @actor_command_window.activate
  144.     end
  145.     rout_on_enemy_cancel
  146.   end
  147. end
  148.   #--------------------------------------------------------------------------
  149.   # ● 技能无法使用
  150.   #--------------------------------------------------------------------------
  151. class Window_Command < Window_Selectable
  152.   def command_enabled?(index)
  153.  
  154.     if(@list[index][:name][0] == Text::SKILL_ID[1][0] &&$game_party.battle_members[0].equips[1].id == Text::SKILL_ID[1][1] && $game_actors[$game_variables[14]].state?(Text::RATE_ID[1])== true)
  155.       @list[index][:enabled] = false
  156.     elsif(@list[index][:name][0] == Text::SKILL_ID[2][0] &&$game_party.battle_members[0].equips[1].id == Text::SKILL_ID[2][1] && $game_actors[$game_variables[14]].state?(Text::RATE_ID[2])== true)
  157.       @list[index][:enabled] = false
  158.     elsif(@list[index][:name][0] == Text::SKILL_ID[3][0] &&$game_party.battle_members[0].equips[1].id == Text::SKILL_ID[3][1] && $game_actors[$game_variables[14]].state?(Text::RATE_ID[3])== true)
  159.       @list[index][:enabled] = false
  160. ####      
  161.     elsif(@list[index][:name][0] == Text::ZHU_ID[1][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[1][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[1][0])== true)
  162.       @list[index][:enabled] = false
  163.     elsif(@list[index][:name][0] == Text::ZHU_ID[2][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[2][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[1][1])== true)
  164.       @list[index][:enabled] = false
  165.     elsif(@list[index][:name][0] == Text::ZHU_ID[3][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[3][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[1][2])== true)
  166.       @list[index][:enabled] = false
  167.     elsif(@list[index][:name][0] == Text::ZHU_ID[4][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[4][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[1][3])== true)
  168.       @list[index][:enabled] = false
  169.     elsif(@list[index][:name][0] == Text::ZHU_ID[5][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[5][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[1][4])== true)
  170.       @list[index][:enabled] = false
  171. ####
  172.     elsif(@list[index][:name][0] == Text::ZHU_ID[6][0] &&$game_party.battle_members[0].equips[0].id == Text::ZHU_ID[6][1] && $game_actors[$game_variables[14]].state?(Text::ZHU_RATE[2])== true)
  173.       @list[index][:enabled] = false
  174. ####
  175.     elsif(@list[index][:name][0] == Text::SKILL[0] && $game_actors[$game_variables[14]].state?(Text::RATE_ID[0])== true)
  176.       @list[index][:enabled] = false
  177.     end
  178.     @list[index][:enabled]
  179.   end
  180. end
好累啊,今天又是不睡觉的一天
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-8 08:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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