查看: 1641|回复: 6

[已经解决] 想请问一下这个技能combo的脚本中<combo special string: x>的使...

[复制链接]
梦石
0
星屑
3209
在线时间
528 小时
注册时间
2012-7-4
回帖
45
发表于 2017-9-27 17:38:47 | 显示全部楼层 |阅读模式

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

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

×
最近在学习使用Yanfly的那些脚本,其中的【 Input Combo Skills v1.01】这一个脚本里,<combo special string: x>这个特定连招触发x号技能不知道应该怎么用。论坛里搜索了一下,只看到了一个没人回复帖子。自己试了半天也没弄明白到底应该怎么填写备注栏,希望各位大大指点我一下,谢谢!


  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Input Combo Skills v1.01
  4. # -- Last Updated: 2011.12.26
  5. # -- Level: Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2014.08.29 - Bug Fix: Battle doesn't end if all side is dead and you still have
  15. #              to input commands.
  16. # 2011.12.26 - Bug Fix: Crash when no action is performed.
  17. # 2011.12.22 - Started Script and Finished.
  18. #
  19. #==============================================================================
  20. # ▼ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # This script enables the usage of Input Combo Skills. When an Input Combo
  23. # Skill is activated by an actor, a list of the potential input attacks appears
  24. # on the side of the screen. The player then presses the various buttons listed
  25. # in the window and attacks will occur in a combo fashion. If a particular
  26. # attack combination is met, a special attack will occur.
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. # -----------------------------------------------------------------------------
  35. # Skill Notetags - These notetags go in the skill notebox in the database.
  36. # -----------------------------------------------------------------------------
  37. # <combo skill L: x>
  38. # <combo skill R: x>
  39. # <combo skill X: x>
  40. # <combo skill Y: x>
  41. # <combo skill Z: x>
  42. # Makes the skill with these notetags to become potentially comboable. Replace
  43. # x with the ID of the skill you want the button to cause the skill to combo.
  44. # The combo skill will be usable even if the user has not learned the skill.
  45. # However, if the user is unable to use the skill due to a lack of resources,
  46. # then the skill will be greyed out. The skill can be inputted, but if the user
  47. # lacks the resources, it will not perform and the skill combo will break.
  48. #
  49. # <combo max: x>
  50. # Sets the maximum number of inputs the player can use for this skill. If this
  51. # tag is not present, it will use the default number of maximum inputs that's
  52. # pre-defined by the module.
  53. #
  54. # <combo special string: x>
  55. # If the player inputs a sequence that matches the string (any combination of
  56. # L, R, X, Y, Z), then the special skill x will be performed. If a combination
  57. # is met, then the combo chain will end prematurely even if there are more
  58. # inputs left. If the user does not know skill x, then the special combo skill
  59. # x will not be performed.
  60. #
  61. # <combo only>
  62. # This makes a skill only usable in a combo and cannot be directly used from a
  63. # skill menu. This effect does not affect monsters. Combo skills will still be
  64. # unusable if the user does not meet the skill's other requirements (such as a
  65. # lack of MP or TP).
  66. #
  67. #==============================================================================
  68. # ▼ Compatibility
  69. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  70. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  71. # it will run with RPG Maker VX without adjusting.
  72. #
  73. # While this script doesn't interfere with Active Chain Skills, it will most
  74. # likely be unable to used in conjunction with Active Chain Skills. I will not
  75. # provide support for any errors that may occur from this, nor will I be
  76. # responsible for any damage doing this may cause your game.
  77. #
  78. #==============================================================================

  79. module YEA
  80.   module INPUT_COMBO
  81.    
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # - Combo Skill Settings -
  84.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  85.     # These settings adjust the sound effect played when a skill is selected,
  86.     # what the minimum time windows are.
  87.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88.     # This will be the sound effect played whenever an active combo skill has
  89.     # been selected for comboing.
  90.     INPUT_COMBO_SOUND = RPG::SE.new("Skill2", 80, 100)
  91.    
  92.     # This will be the sound effect played when an input combo matches and
  93.     # activates a specialized combo.
  94.     ACHIEVED_COMBO_SOUND = RPG::SE.new("Skill3", 90, 100)
  95.    
  96.     # How many frames minimum for combo allowance. Sometimes the battlelog
  97.     # window will move too fast for the player to be able to combo. This sets
  98.     # a minimum timer for how long the combo window will stay open.
  99.     MINIMUM_TIME = 90
  100.    
  101.     # This is the bonus number of frames of leeway that the player gets for
  102.     # a larger input sequence. This is because the battlelog window may move
  103.     # too fast for the player to be able to combo. This adds to the minimum
  104.     # timer for how long the combo window will stay open.
  105.     TIME_PER_INPUT = 30
  106.    
  107.     # This sets the default number of inputs that a combo skill can have at
  108.     # maximum. If you wish to exceed this amount or to have lower than this
  109.     # amount, use a notetag to change the skill's max combo amount.
  110.     DEFAULT_MAX_INPUT = 5
  111.    
  112.     # This will be the "Window" colour used for a special skill in the display.
  113.     SPECIAL_SKILL_COLOUR = 17
  114.    
  115.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  116.     # - Combo Skill Text -
  117.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  118.     # This section adjusts the text that appears for the combo skills. Adjust
  119.     # the text to appear as you see fit. Note that the vocab other than the
  120.     # title can use text codes.
  121.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  122.     COMBO_TITLE   = "Input Combo Attacks"
  123.     TITLE_SIZE    = 20
  124.     L_SKILL_ON  = "\eC[17]Q\eC[0]: "
  125.     L_SKILL_OFF = "\eC[7]Q: "
  126.     R_SKILL_ON  = "\eC[17]W\eC[0]: "
  127.     R_SKILL_OFF = "\eC[7]W: "
  128.     X_SKILL_ON  = "\eC[17]A\eC[0]: "
  129.     X_SKILL_OFF = "\eC[7]A: "
  130.     Y_SKILL_ON  = "\eC[17]S\eC[0]: "
  131.     Y_SKILL_OFF = "\eC[7]S: "
  132.     Z_SKILL_ON  = "\eC[17]D\eC[0]: "
  133.     Z_SKILL_OFF = "\eC[7]D: "
  134.    
  135.   end # INPUT_COMBO
  136. end # YEA

  137. #==============================================================================
  138. # ▼ Editting anything past this point may potentially result in causing
  139. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  140. # halitosis so edit at your own risk.
  141. #==============================================================================

  142. module YEA
  143.   module REGEXP
  144.   module SKILL
  145.    
  146.     COMBO_MAX     = /<(?:COMBO_MAX|combo max):[ ](\d+)>/i
  147.     COMBO_ONLY    = /<(?:COMBO_ONLY|combo only)>/i
  148.     COMBO_SKILL   = /<(?:COMBO_SKILL|combo skill)[ ]([LRXYZ]):[ ](\d+)>/i
  149.     COMBO_SPECIAL = /<(?:COMBO_SPECIAL|combo special)[ ](.*):[ ](\d+)>/i
  150.    
  151.   end # SKILL
  152.   end # REGEXP
  153. end # YEA

  154. #==============================================================================
  155. # ■ DataManager
  156. #==============================================================================

  157. module DataManager
  158.   
  159.   #--------------------------------------------------------------------------
  160.   # alias method: load_database
  161.   #--------------------------------------------------------------------------
  162.   class <<self; alias load_database_ics load_database; end
  163.   def self.load_database
  164.     load_database_ics
  165.     load_notetags_ics
  166.   end
  167.   
  168.   #--------------------------------------------------------------------------
  169.   # new method: load_notetags_ics
  170.   #--------------------------------------------------------------------------
  171.   def self.load_notetags_ics
  172.     for skill in $data_skills
  173.       next if skill.nil?
  174.       skill.load_notetags_ics
  175.     end
  176.   end
  177.   
  178. end # DataManager

  179. #==============================================================================
  180. # ■ RPG::Skill
  181. #==============================================================================

  182. class RPG::Skill < RPG::UsableItem
  183.   
  184.   #--------------------------------------------------------------------------
  185.   # public instance variables
  186.   #--------------------------------------------------------------------------
  187.   attr_accessor :combo_only
  188.   attr_accessor :combo_skill
  189.   attr_accessor :combo_max
  190.   attr_accessor :combo_special
  191.   
  192.   #--------------------------------------------------------------------------
  193.   # common cache: load_notetags_ics
  194.   #--------------------------------------------------------------------------
  195.   def load_notetags_ics
  196.     @combo_only = false
  197.     @combo_skill = {}
  198.     @combo_special = {}
  199.     @combo_max = YEA::INPUT_COMBO::DEFAULT_MAX_INPUT
  200.     #---
  201.     self.note.split(/[\r\n]+/).each { |line|
  202.       case line
  203.       #---
  204.       when YEA::REGEXP::SKILL::COMBO_ONLY
  205.         @combo_only = true
  206.       when YEA::REGEXP::SKILL::COMBO_SKILL
  207.         case $1.upcase
  208.         when "L"; @combo_skill[:L] = $2.to_i
  209.         when "R"; @combo_skill[:R] = $2.to_i
  210.         when "X"; @combo_skill[:X] = $2.to_i
  211.         when "Y"; @combo_skill[:Y] = $2.to_i
  212.         when "Z"; @combo_skill[:Z] = $2.to_i
  213.         else; next
  214.         end
  215.       when YEA::REGEXP::SKILL::COMBO_MAX
  216.         @combo_max = $1.to_i
  217.       when YEA::REGEXP::SKILL::COMBO_SPECIAL
  218.         @combo_special[$1.to_s.upcase] = $2.to_i
  219.       #---
  220.       end
  221.     } # self.note.split
  222.     #---
  223.   end
  224.   
  225. end # RPG::UsableItem

  226. #==============================================================================
  227. # ■ Game_Action
  228. #==============================================================================

  229. class Game_Action
  230.   
  231.   #--------------------------------------------------------------------------
  232.   # new method: set_input_combo_skill
  233.   #--------------------------------------------------------------------------
  234.   def set_input_combo_skill(skill_id)
  235.     set_skill(skill_id)
  236.     @target_index = subject.current_action.target_index
  237.     @input_combo_skill = true
  238.   end
  239.   
  240.   #--------------------------------------------------------------------------
  241.   # alias method: valid?
  242.   #--------------------------------------------------------------------------
  243.   alias game_action_valid_ics valid?
  244.   def valid?
  245.     subject.enable_input_combo(true) if @input_combo_skill
  246.     result = game_action_valid_ics
  247.     subject.enable_input_combo(false) if @input_combo_skill
  248.     return result
  249.   end
  250.   
  251. end # Game_Action

  252. #==============================================================================
  253. # ■ Game_BattlerBase
  254. #==============================================================================

  255. class Game_BattlerBase
  256.   
  257.   #--------------------------------------------------------------------------
  258.   # alias method: skill_conditions_met?
  259.   #--------------------------------------------------------------------------
  260.   alias game_battlerbase_skill_conditions_met_ics skill_conditions_met?
  261.   def skill_conditions_met?(skill)
  262.     return false if combo_skill_restriction?(skill)
  263.     return game_battlerbase_skill_conditions_met_ics(skill)
  264.   end
  265.   
  266.   #--------------------------------------------------------------------------
  267.   # new method: combo_skill_restriction?
  268.   #--------------------------------------------------------------------------
  269.   def combo_skill_restriction?(skill)
  270.     return false unless actor?
  271.     return false unless $game_party.in_battle
  272.     return false unless skill.combo_only
  273.     return !@input_combo_enabled
  274.   end
  275.   
  276.   #--------------------------------------------------------------------------
  277.   # alias method: hp=
  278.   #--------------------------------------------------------------------------
  279.   alias game_battlerbase_hpequals_ics hp=
  280.   def hp=(value)
  281.     game_battlerbase_hpequals_ics(value)
  282.     return unless SceneManager.scene_is?(Scene_Battle)
  283.     return unless actor?
  284.     return if value == 0
  285.     SceneManager.scene.refresh_input_combo_skill_window(self)
  286.   end
  287.   
  288.   #--------------------------------------------------------------------------
  289.   # alias method: mp=
  290.   #--------------------------------------------------------------------------
  291.   alias game_battlerbase_mpequals_ics mp=
  292.   def mp=(value)
  293.     game_battlerbase_mpequals_ics(value)
  294.     return unless SceneManager.scene_is?(Scene_Battle)
  295.     return unless actor?
  296.     return if value == 0
  297.     SceneManager.scene.refresh_input_combo_skill_window(self)
  298.   end
  299.   
  300.   #--------------------------------------------------------------------------
  301.   # alias method: tp=
  302.   #--------------------------------------------------------------------------
  303.   alias game_battlerbase_tpequals_ics tp=
  304.   def tp=(value)
  305.     game_battlerbase_tpequals_ics(value)
  306.     return unless SceneManager.scene_is?(Scene_Battle)
  307.     return unless actor?
  308.     return if value == 0
  309.     SceneManager.scene.refresh_input_combo_skill_window(self)
  310.   end
  311.   
  312. end # Game_BattlerBase

  313. #==============================================================================
  314. # ■ Game_Battler
  315. #==============================================================================

  316. class Game_Battler < Game_BattlerBase
  317.   
  318.   #--------------------------------------------------------------------------
  319.   # alias method: on_battle_start
  320.   #--------------------------------------------------------------------------
  321.   alias game_battler_on_battle_start_ics on_battle_start
  322.   def on_battle_start
  323.     game_battler_on_battle_start_ics
  324.     @input_combo_enabled = false
  325.   end
  326.   
  327.   #--------------------------------------------------------------------------
  328.   # alias method: on_battle_end
  329.   #--------------------------------------------------------------------------
  330.   alias game_battler_on_battle_end_ics on_battle_end
  331.   def on_battle_end
  332.     game_battler_on_battle_end_ics
  333.     @input_combo_enabled = false
  334.   end
  335.   
  336.   #--------------------------------------------------------------------------
  337.   # new method: enable_input_combo
  338.   #--------------------------------------------------------------------------
  339.   def enable_input_combo(active)
  340.     return unless actor?
  341.     @input_combo_enabled = active
  342.   end
  343.   
  344. end # Game_Battler

  345. #==============================================================================
  346. # ■ Window_ComboSkillList
  347. #==============================================================================

  348. class Window_ComboSkillList < Window_Base
  349.   
  350.   #--------------------------------------------------------------------------
  351.   # initialize
  352.   #--------------------------------------------------------------------------
  353.   def initialize
  354.     dw = [Graphics.width/2, 320].max
  355.     super(-standard_padding, 0, dw, fitting_height(7))
  356.     self.z = 200
  357.     self.opacity = 0
  358.     hide
  359.   end
  360.   
  361.   #--------------------------------------------------------------------------
  362.   # reveal
  363.   #--------------------------------------------------------------------------
  364.   def reveal(battler, skill)
  365.     [url=home.php?mod=space&uid=133701]@battler[/url] = battler
  366.     [url=home.php?mod=space&uid=260100]@skill[/url] = skill
  367.     @combo_skills = []
  368.     for key in skill.combo_skill
  369.       next if key[1].nil?
  370.       next if $data_skills[key[1]].nil?
  371.       @combo_skills.push($data_skills[key[1]])
  372.     end
  373.     return if @combo_skills == []
  374.     self.y = Graphics.height - fitting_height(4)
  375.     self.y -= fitting_height(@combo_skills.size + 2)
  376.     show
  377.     activate
  378.     refresh
  379.   end
  380.   
  381.   #--------------------------------------------------------------------------
  382.   # refresh_check
  383.   #--------------------------------------------------------------------------
  384.   def refresh_check(battler)
  385.     return if @battler != battler
  386.     refresh
  387.   end
  388.   
  389.   #--------------------------------------------------------------------------
  390.   # refresh
  391.   #--------------------------------------------------------------------------
  392.   def refresh
  393.     contents.clear
  394.     draw_background_colour
  395.     draw_horz_line(0)
  396.     draw_combo_title
  397.     draw_horz_line(@combo_skills.size * line_height)
  398.     draw_combo_skills
  399.   end
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # draw_background_colour
  403.   #--------------------------------------------------------------------------
  404.   def draw_background_colour
  405.     dh = line_height * (@combo_skills.size + 2)
  406.     rect = Rect.new(0, 0, contents.width, dh)
  407.     back_colour1 = Color.new(0, 0, 0, 192)
  408.     back_colour2 = Color.new(0, 0, 0, 0)
  409.     contents.gradient_fill_rect(rect, back_colour1, back_colour2)
  410.   end
  411.   
  412.   #--------------------------------------------------------------------------
  413.   # draw_horz_line
  414.   #--------------------------------------------------------------------------
  415.   def draw_horz_line(dy)
  416.     line_y = dy + line_height - 2
  417.     line_colour = normal_color
  418.     line_colour.alpha = 48
  419.     contents.fill_rect(0, line_y, contents.width, 2, line_colour)
  420.   end
  421.   
  422.   #--------------------------------------------------------------------------
  423.   # draw_combo_title
  424.   #--------------------------------------------------------------------------
  425.   def draw_combo_title
  426.     reset_font_settings
  427.     text = YEA::INPUT_COMBO::COMBO_TITLE
  428.     contents.font.size = YEA::INPUT_COMBO::TITLE_SIZE
  429.     contents.font.bold = true
  430.     contents.font.italic = true
  431.     draw_text(12, 0, contents.width - 12, line_height, text)
  432.     reset_font_settings
  433.   end
  434.   
  435.   #--------------------------------------------------------------------------
  436.   # draw_combo_skills
  437.   #--------------------------------------------------------------------------
  438.   def draw_combo_skills
  439.     button_array = [:L, :R, :X, :Y, :Z]
  440.     dx = 24
  441.     dy = line_height
  442.     for button in button_array
  443.       next if @skill.combo_skill[button].nil?
  444.       combo_skill = $data_skills[@skill.combo_skill[button]]
  445.       text = text_setting(button, combo_skill)
  446.       text += sprintf("\eI[%d]", combo_skill.icon_index)
  447.       text += combo_skill.name
  448.       draw_text_ex(dx, dy, text)
  449.       dy += line_height
  450.     end
  451.   end
  452.   
  453.   #--------------------------------------------------------------------------
  454.   # text_setting
  455.   #--------------------------------------------------------------------------
  456.   def text_setting(button, skill)
  457.     text = ""
  458.     case button
  459.     when :L
  460.       if @battler.usable?(skill)
  461.         text = YEA::INPUT_COMBO::L_SKILL_ON
  462.       else
  463.         text = YEA::INPUT_COMBO::L_SKILL_OFF
  464.       end
  465.     when :R
  466.       if @battler.usable?(skill)
  467.         text = YEA::INPUT_COMBO::R_SKILL_ON
  468.       else
  469.         text = YEA::INPUT_COMBO::R_SKILL_OFF
  470.       end
  471.     when :X
  472.       if @battler.usable?(skill)
  473.         text = YEA::INPUT_COMBO::X_SKILL_ON
  474.       else
  475.         text = YEA::INPUT_COMBO::X_SKILL_OFF
  476.       end
  477.     when :Y
  478.       if @battler.usable?(skill)
  479.         text = YEA::INPUT_COMBO::Y_SKILL_ON
  480.       else
  481.         text = YEA::INPUT_COMBO::Y_SKILL_OFF
  482.       end
  483.     when :Z
  484.       if @battler.usable?(skill)
  485.         text = YEA::INPUT_COMBO::Z_SKILL_ON
  486.       else
  487.         text = YEA::INPUT_COMBO::Z_SKILL_OFF
  488.       end
  489.     end
  490.     return text
  491.   end
  492.   
  493. end # Window_ComboSkillList

  494. #==============================================================================
  495. # ■ Window_ComboInfo
  496. #==============================================================================

  497. class Window_ComboInfo < Window_Base
  498.   
  499.   #--------------------------------------------------------------------------
  500.   # initialize
  501.   #--------------------------------------------------------------------------
  502.   def initialize
  503.     super(0, 0, Graphics.width, fitting_height(1))
  504.     self.y = Graphics.height - fitting_height(4) - fitting_height(1)
  505.     self.opacity = 0
  506.     self.z = 200
  507.     @combos = []
  508.     @special = nil
  509.     hide
  510.   end
  511.   
  512.   #--------------------------------------------------------------------------
  513.   # reveal
  514.   #--------------------------------------------------------------------------
  515.   def reveal
  516.     @combos = []
  517.     @special = nil
  518.     refresh
  519.     show
  520.   end
  521.   
  522.   #--------------------------------------------------------------------------
  523.   # refresh
  524.   #--------------------------------------------------------------------------
  525.   def refresh
  526.     contents.clear
  527.     dx = draw_combo_icons
  528.     draw_special(dx)
  529.   end
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # add_combo
  533.   #--------------------------------------------------------------------------
  534.   def add_combo(icon, special = nil)
  535.     @combos.push(icon)
  536.     @special = special
  537.     refresh
  538.   end
  539.   
  540.   #--------------------------------------------------------------------------
  541.   # draw_combo_icons
  542.   #--------------------------------------------------------------------------
  543.   def draw_combo_icons
  544.     dx = 0
  545.     for icon in @combos
  546.       draw_icon(icon, dx, 0)
  547.       dx += 24
  548.     end
  549.     return dx
  550.   end
  551.   
  552.   #--------------------------------------------------------------------------
  553.   # draw_special
  554.   #--------------------------------------------------------------------------
  555.   def draw_special(dx)
  556.     return if @special.nil?
  557.     draw_icon(@special.icon_index, dx + 12, 0)
  558.     colour = text_color(YEA::INPUT_COMBO::SPECIAL_SKILL_COLOUR)
  559.     change_color(colour)
  560.     draw_text(dx + 36, 0, contents.width, line_height, @special.name)
  561.   end
  562.   
  563. end # Window_ComboInfo

  564. #==============================================================================
  565. # ■ Scene_Battle
  566. #==============================================================================

  567. class Scene_Battle < Scene_Base
  568.   
  569.   #--------------------------------------------------------------------------
  570.   # alias method: create_all_windows
  571.   #--------------------------------------------------------------------------
  572.   alias scene_battle_create_all_windows_ics create_all_windows
  573.   def create_all_windows
  574.     scene_battle_create_all_windows_ics
  575.     create_combo_skill_window
  576.   end
  577.   
  578.   #--------------------------------------------------------------------------
  579.   # new method: create_combo_skill_window
  580.   #--------------------------------------------------------------------------
  581.   def create_combo_skill_window
  582.     @input_combo_skill_window = Window_ComboSkillList.new
  583.     @input_combo_info_window = Window_ComboInfo.new
  584.     @input_combo_skill_counter = 0
  585.   end
  586.   
  587.   #--------------------------------------------------------------------------
  588.   # alias method: use_item
  589.   #--------------------------------------------------------------------------
  590.   alias scene_battle_use_item_ics use_item
  591.   def use_item
  592.     @subject.enable_input_combo(true)
  593.     item = @subject.current_action.item
  594.     combo_skill_list_appear(true, item)
  595.     start_input_combo_skill_counter(item)
  596.     scene_battle_use_item_ics
  597.     loop do
  598.       break if break_input_combo?(item)
  599.       update_basic
  600.       update_combo_skill_queue
  601.     end
  602.     combo_skill_list_appear(false, item)
  603.     @subject.enable_input_combo(false)
  604.   end
  605.   
  606.   #--------------------------------------------------------------------------
  607.   # new method: combo_skill_list_appear
  608.   #--------------------------------------------------------------------------
  609.   def combo_skill_list_appear(visible, skill)
  610.     return if @subject.nil?
  611.     return unless @subject.actor?
  612.     return unless skill.is_a?(RPG::Skill)
  613.     return if visible && @input_combo_skill_window.visible
  614.     if visible
  615.       @break_combo = false
  616.       @current_combo_skill = skill
  617.       @total_combo_skills = 0
  618.       @combo_skill_queue = []
  619.       @combo_skill_string = ""
  620.       @input_combo_skill_window.reveal(@subject, skill)
  621.       @input_combo_info_window.reveal
  622.     else
  623.       @input_combo_skill_window.hide
  624.       @input_combo_info_window.hide
  625.       return if @subject.current_action.nil?
  626.       @subject.current_action.set_skill(@current_combo_skill.id)
  627.     end
  628.   end
  629.   
  630.   #--------------------------------------------------------------------------
  631.   # new method: refresh_input_combo_skill_window
  632.   #--------------------------------------------------------------------------
  633.   def refresh_input_combo_skill_window(battler)
  634.     return unless @input_combo_skill_window.visible
  635.     @input_combo_skill_window.refresh_check(battler)
  636.   end
  637.   
  638.   #--------------------------------------------------------------------------
  639.   # new method: start_input_combo_skill_counter
  640.   #--------------------------------------------------------------------------
  641.   def start_input_combo_skill_counter(skill)
  642.     return unless @input_combo_skill_window.visible
  643.     @input_combo_skill_counter = YEA::INPUT_COMBO::MINIMUM_TIME
  644.     bonus_time = skill.combo_max * YEA::INPUT_COMBO::TIME_PER_INPUT
  645.     @input_combo_skill_counter += bonus_time
  646.   end
  647.   
  648.   #--------------------------------------------------------------------------
  649.   # new method: break_input_combo?
  650.   #--------------------------------------------------------------------------
  651.   def break_input_combo?(item)
  652.     # This part is added in this fix to break input combo if at least 1 side is all dead
  653.     return true if $game_party.all_dead? || $game_troop.all_dead?
  654.     #
  655.     return true if @break_combo
  656.     return true if @current_combo_skill.nil?
  657.     return true if @current_combo_skill.combo_skill == {}
  658.     return false if @combo_skill_queue != []
  659.     return true if @total_combo_skills == @current_combo_skill.combo_max
  660.     return @input_combo_skill_counter <= 0
  661.   end
  662.   
  663.   #--------------------------------------------------------------------------
  664.   # new method: update_combo_skill_queue
  665.   #--------------------------------------------------------------------------
  666.   def update_combo_skill_queue
  667.     return if @combo_skill_queue == []
  668.     action = @combo_skill_queue.shift
  669.     if !@subject.usable?(action)
  670.       @break_combo = true
  671.       return
  672.     end
  673.     @subject.current_action.set_input_combo_skill(action.id)
  674.     @log_window.clear
  675.     execute_action
  676.   end
  677.   
  678.   #--------------------------------------------------------------------------
  679.   # alias method: update_basic
  680.   #--------------------------------------------------------------------------
  681.   alias scene_battle_update_basic_ics update_basic
  682.   def update_basic
  683.     scene_battle_update_basic_ics
  684.     update_input_combo_skill_counter
  685.     update_input_combo_skill_select
  686.   end
  687.   
  688.   #--------------------------------------------------------------------------
  689.   # new method: update_input_combo_skill_counter
  690.   #--------------------------------------------------------------------------
  691.   def update_input_combo_skill_counter
  692.     return if @input_combo_skill_counter == 0
  693.     @input_combo_skill_counter -= 1
  694.   end
  695.   
  696.   #--------------------------------------------------------------------------
  697.   # new method: update_input_combo_skill_select
  698.   #--------------------------------------------------------------------------
  699.   def update_input_combo_skill_select
  700.     return unless @input_combo_skill_window.visible
  701.     return if @total_combo_skills >= @current_combo_skill.combo_max
  702.     if Input.trigger?(:L)
  703.       check_input_combo_skill(:L)
  704.     elsif Input.trigger?(:R)
  705.       check_input_combo_skill(:R)
  706.     elsif Input.trigger?(:X)
  707.       check_input_combo_skill(:X)
  708.     elsif Input.trigger?(:Y)
  709.       check_input_combo_skill(:Y)
  710.     elsif Input.trigger?(:Z)
  711.       check_input_combo_skill(:Z)
  712.     end
  713.   end
  714.   
  715.   #--------------------------------------------------------------------------
  716.   # new method: check_input_combo_skill
  717.   #--------------------------------------------------------------------------
  718.   def check_input_combo_skill(button)
  719.     skill_id = @current_combo_skill.combo_skill[button]
  720.     return if skill_id.nil?
  721.     return if $data_skills[skill_id].nil?
  722.     case button
  723.     when :L; @combo_skill_string += "L"
  724.     when :R; @combo_skill_string += "R"
  725.     when :X; @combo_skill_string += "X"
  726.     when :Y; @combo_skill_string += "Y"
  727.     when :Z; @combo_skill_string += "Z"
  728.     end
  729.     if special_input_combo?
  730.       icon = $data_skills[skill_id].icon_index
  731.       @combo_skill_queue.push($data_skills[skill_id])
  732.       skill_id = @current_combo_skill.combo_special[@combo_skill_string]
  733.       combo_skill = $data_skills[skill_id]
  734.       @input_combo_info_window.add_combo(icon, combo_skill)
  735.       YEA::INPUT_COMBO::ACHIEVED_COMBO_SOUND.play
  736.       @total_combo_skills = @current_combo_skill.combo_max
  737.     else
  738.       YEA::INPUT_COMBO::INPUT_COMBO_SOUND.play
  739.       combo_skill = $data_skills[skill_id]
  740.       @input_combo_info_window.add_combo(combo_skill.icon_index)
  741.       @total_combo_skills += 1
  742.     end
  743.     @combo_skill_queue.push(combo_skill)
  744.     return unless @total_combo_skills == @current_combo_skill.combo_max
  745.     @input_combo_skill_counter = 0
  746.   end
  747.   
  748.   #--------------------------------------------------------------------------
  749.   # new method: special_input_combo?
  750.   #--------------------------------------------------------------------------
  751.   def special_input_combo?
  752.     combo_hash = @current_combo_skill.combo_special
  753.     return false unless combo_hash.include?(@combo_skill_string)
  754.     skill = $data_skills[combo_hash[@combo_skill_string]]
  755.     return @subject.skills.include?(skill)
  756.   end
  757.   
  758. end # Scene_Battle

  759. #==============================================================================
  760. #
  761. # ▼ End of File
  762. #
  763. #==============================================================================
复制代码
梦石
0
星屑
2497
在线时间
215 小时
注册时间
2017-9-27
回帖
563
发表于 2017-9-27 22:22:24 | 显示全部楼层
要按下按钮的
回复

使用道具 举报

老鹰

梦石
40
星屑
38049
在线时间
7128 小时
注册时间
2012-5-26
回帖
3306

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

发表于 2017-9-27 23:14:50 | 显示全部楼层
比如在某一个技能,你设置了按键为 LRXY 四个技能的连携
再在这里技能的备注栏里加上
<combo special LLXL: 10>
这样在连携时从一开始按下了 LLXL 的技能连携顺序,便自动再释放一个10号技能,并且直接结束连携

点评

非常感谢!  发表于 2017-9-28 01:12

评分

参与人数 3星屑 +276 赞 +1 收起 理由
刹那铃音 + 1 我很赞同
fux2 + 266 认可答案
忧韵谷 + 10 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
3209
在线时间
528 小时
注册时间
2012-7-4
回帖
45
 楼主| 发表于 2017-9-27 23:15:06 | 显示全部楼层

恩恩,它允许我设定连招,可是这一个命令我不知道要怎么设置才对。
回复

使用道具 举报

梦石
0
星屑
2497
在线时间
215 小时
注册时间
2017-9-27
回帖
563
发表于 2017-9-28 21:43:24 | 显示全部楼层
忧韵谷 发表于 2017-9-27 23:15
恩恩,它允许我设定连招,可是这一个命令我不知道要怎么设置才对。

写在技能备注下

点评

x是技能ID  发表于 2017-9-28 21:43
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部