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

Project1

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

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

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3099
在线时间
518 小时
注册时间
2012-7-4
帖子
48
跳转到指定楼层
1
发表于 2017-9-27 17:38:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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


RUBY 代码复制
  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.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-InputComboSkills"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2014.08.29 - Bug Fix: Battle doesn't end if all side is dead and you still have
  17. #              to input commands.
  18. # 2011.12.26 - Bug Fix: Crash when no action is performed.
  19. # 2011.12.22 - Started Script and Finished.
  20. #
  21. #==============================================================================
  22. # ▼ Introduction
  23. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. # This script enables the usage of Input Combo Skills. When an Input Combo
  25. # Skill is activated by an actor, a list of the potential input attacks appears
  26. # on the side of the screen. The player then presses the various buttons listed
  27. # in the window and attacks will occur in a combo fashion. If a particular
  28. # attack combination is met, a special attack will occur.
  29. #
  30. #==============================================================================
  31. # ▼ Instructions
  32. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. # To install this script, open up your script editor and copy/paste this script
  34. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  35. #
  36. # -----------------------------------------------------------------------------
  37. # Skill Notetags - These notetags go in the skill notebox in the database.
  38. # -----------------------------------------------------------------------------
  39. # <combo skill L: x>
  40. # <combo skill R: x>
  41. # <combo skill X: x>
  42. # <combo skill Y: x>
  43. # <combo skill Z: x>
  44. # Makes the skill with these notetags to become potentially comboable. Replace
  45. # x with the ID of the skill you want the button to cause the skill to combo.
  46. # The combo skill will be usable even if the user has not learned the skill.
  47. # However, if the user is unable to use the skill due to a lack of resources,
  48. # then the skill will be greyed out. The skill can be inputted, but if the user
  49. # lacks the resources, it will not perform and the skill combo will break.
  50. #
  51. # <combo max: x>
  52. # Sets the maximum number of inputs the player can use for this skill. If this
  53. # tag is not present, it will use the default number of maximum inputs that's
  54. # pre-defined by the module.
  55. #
  56. # <combo special string: x>
  57. # If the player inputs a sequence that matches the string (any combination of
  58. # L, R, X, Y, Z), then the special skill x will be performed. If a combination
  59. # is met, then the combo chain will end prematurely even if there are more
  60. # inputs left. If the user does not know skill x, then the special combo skill
  61. # x will not be performed.
  62. #
  63. # <combo only>
  64. # This makes a skill only usable in a combo and cannot be directly used from a
  65. # skill menu. This effect does not affect monsters. Combo skills will still be
  66. # unusable if the user does not meet the skill's other requirements (such as a
  67. # lack of MP or TP).
  68. #
  69. #==============================================================================
  70. # ▼ Compatibility
  71. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  72. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  73. # it will run with RPG Maker VX without adjusting.
  74. #
  75. # While this script doesn't interfere with Active Chain Skills, it will most
  76. # likely be unable to used in conjunction with Active Chain Skills. I will not
  77. # provide support for any errors that may occur from this, nor will I be
  78. # responsible for any damage doing this may cause your game.
  79. #
  80. #==============================================================================
  81.  
  82. module YEA
  83.   module INPUT_COMBO
  84.  
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # - Combo Skill Settings -
  87.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88.     # These settings adjust the sound effect played when a skill is selected,
  89.     # what the minimum time windows are.
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     # This will be the sound effect played whenever an active combo skill has
  92.     # been selected for comboing.
  93.     INPUT_COMBO_SOUND = RPG::SE.new("Skill2", 80, 100)
  94.  
  95.     # This will be the sound effect played when an input combo matches and
  96.     # activates a specialized combo.
  97.     ACHIEVED_COMBO_SOUND = RPG::SE.new("Skill3", 90, 100)
  98.  
  99.     # How many frames minimum for combo allowance. Sometimes the battlelog
  100.     # window will move too fast for the player to be able to combo. This sets
  101.     # a minimum timer for how long the combo window will stay open.
  102.     MINIMUM_TIME = 90
  103.  
  104.     # This is the bonus number of frames of leeway that the player gets for
  105.     # a larger input sequence. This is because the battlelog window may move
  106.     # too fast for the player to be able to combo. This adds to the minimum
  107.     # timer for how long the combo window will stay open.
  108.     TIME_PER_INPUT = 30
  109.  
  110.     # This sets the default number of inputs that a combo skill can have at
  111.     # maximum. If you wish to exceed this amount or to have lower than this
  112.     # amount, use a notetag to change the skill's max combo amount.
  113.     DEFAULT_MAX_INPUT = 5
  114.  
  115.     # This will be the "Window" colour used for a special skill in the display.
  116.     SPECIAL_SKILL_COLOUR = 17
  117.  
  118.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  119.     # - Combo Skill Text -
  120.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  121.     # This section adjusts the text that appears for the combo skills. Adjust
  122.     # the text to appear as you see fit. Note that the vocab other than the
  123.     # title can use text codes.
  124.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  125.     COMBO_TITLE   = "Input Combo Attacks"
  126.     TITLE_SIZE    = 20
  127.     L_SKILL_ON  = "\eC[17]Q\eC[0]: "
  128.     L_SKILL_OFF = "\eC[7]Q: "
  129.     R_SKILL_ON  = "\eC[17]W\eC[0]: "
  130.     R_SKILL_OFF = "\eC[7]W: "
  131.     X_SKILL_ON  = "\eC[17]A\eC[0]: "
  132.     X_SKILL_OFF = "\eC[7]A: "
  133.     Y_SKILL_ON  = "\eC[17]S\eC[0]: "
  134.     Y_SKILL_OFF = "\eC[7]S: "
  135.     Z_SKILL_ON  = "\eC[17]D\eC[0]: "
  136.     Z_SKILL_OFF = "\eC[7]D: "
  137.  
  138.   end # INPUT_COMBO
  139. end # YEA
  140.  
  141. #==============================================================================
  142. # ▼ Editting anything past this point may potentially result in causing
  143. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  144. # halitosis so edit at your own risk.
  145. #==============================================================================
  146.  
  147. module YEA
  148.   module REGEXP
  149.   module SKILL
  150.  
  151.     COMBO_MAX     = /<(?:COMBO_MAX|combo max):[ ](\d+)>/i
  152.     COMBO_ONLY    = /<(?:COMBO_ONLY|combo only)>/i
  153.     COMBO_SKILL   = /<(?:COMBO_SKILL|combo skill)[ ]([LRXYZ]):[ ](\d+)>/i
  154.     COMBO_SPECIAL = /<(?:COMBO_SPECIAL|combo special)[ ](.*):[ ](\d+)>/i
  155.  
  156.   end # SKILL
  157.   end # REGEXP
  158. end # YEA
  159.  
  160. #==============================================================================
  161. # ■ DataManager
  162. #==============================================================================
  163.  
  164. module DataManager
  165.  
  166.   #--------------------------------------------------------------------------
  167.   # alias method: load_database
  168.   #--------------------------------------------------------------------------
  169.   class <<self; alias load_database_ics load_database; end
  170.   def self.load_database
  171.     load_database_ics
  172.     load_notetags_ics
  173.   end
  174.  
  175.   #--------------------------------------------------------------------------
  176.   # new method: load_notetags_ics
  177.   #--------------------------------------------------------------------------
  178.   def self.load_notetags_ics
  179.     for skill in $data_skills
  180.       next if skill.nil?
  181.       skill.load_notetags_ics
  182.     end
  183.   end
  184.  
  185. end # DataManager
  186.  
  187. #==============================================================================
  188. # ■ RPG::Skill
  189. #==============================================================================
  190.  
  191. class RPG::Skill < RPG::UsableItem
  192.  
  193.   #--------------------------------------------------------------------------
  194.   # public instance variables
  195.   #--------------------------------------------------------------------------
  196.   attr_accessor :combo_only
  197.   attr_accessor :combo_skill
  198.   attr_accessor :combo_max
  199.   attr_accessor :combo_special
  200.  
  201.   #--------------------------------------------------------------------------
  202.   # common cache: load_notetags_ics
  203.   #--------------------------------------------------------------------------
  204.   def load_notetags_ics
  205.     @combo_only = false
  206.     @combo_skill = {}
  207.     @combo_special = {}
  208.     @combo_max = YEA::INPUT_COMBO::DEFAULT_MAX_INPUT
  209.     #---
  210.     self.note.split(/[\r\n]+/).each { |line|
  211.       case line
  212.       #---
  213.       when YEA::REGEXP::SKILL::COMBO_ONLY
  214.         @combo_only = true
  215.       when YEA::REGEXP::SKILL::COMBO_SKILL
  216.         case $1.upcase
  217.         when "L"; @combo_skill[:L] = $2.to_i
  218.         when "R"; @combo_skill[:R] = $2.to_i
  219.         when "X"; @combo_skill[:X] = $2.to_i
  220.         when "Y"; @combo_skill[:Y] = $2.to_i
  221.         when "Z"; @combo_skill[:Z] = $2.to_i
  222.         else; next
  223.         end
  224.       when YEA::REGEXP::SKILL::COMBO_MAX
  225.         @combo_max = $1.to_i
  226.       when YEA::REGEXP::SKILL::COMBO_SPECIAL
  227.         @combo_special[$1.to_s.upcase] = $2.to_i
  228.       #---
  229.       end
  230.     } # self.note.split
  231.     #---
  232.   end
  233.  
  234. end # RPG::UsableItem
  235.  
  236. #==============================================================================
  237. # ■ Game_Action
  238. #==============================================================================
  239.  
  240. class Game_Action
  241.  
  242.   #--------------------------------------------------------------------------
  243.   # new method: set_input_combo_skill
  244.   #--------------------------------------------------------------------------
  245.   def set_input_combo_skill(skill_id)
  246.     set_skill(skill_id)
  247.     @target_index = subject.current_action.target_index
  248.     @input_combo_skill = true
  249.   end
  250.  
  251.   #--------------------------------------------------------------------------
  252.   # alias method: valid?
  253.   #--------------------------------------------------------------------------
  254.   alias game_action_valid_ics valid?
  255.   def valid?
  256.     subject.enable_input_combo(true) if @input_combo_skill
  257.     result = game_action_valid_ics
  258.     subject.enable_input_combo(false) if @input_combo_skill
  259.     return result
  260.   end
  261.  
  262. end # Game_Action
  263.  
  264. #==============================================================================
  265. # ■ Game_BattlerBase
  266. #==============================================================================
  267.  
  268. class Game_BattlerBase
  269.  
  270.   #--------------------------------------------------------------------------
  271.   # alias method: skill_conditions_met?
  272.   #--------------------------------------------------------------------------
  273.   alias game_battlerbase_skill_conditions_met_ics skill_conditions_met?
  274.   def skill_conditions_met?(skill)
  275.     return false if combo_skill_restriction?(skill)
  276.     return game_battlerbase_skill_conditions_met_ics(skill)
  277.   end
  278.  
  279.   #--------------------------------------------------------------------------
  280.   # new method: combo_skill_restriction?
  281.   #--------------------------------------------------------------------------
  282.   def combo_skill_restriction?(skill)
  283.     return false unless actor?
  284.     return false unless $game_party.in_battle
  285.     return false unless skill.combo_only
  286.     return !@input_combo_enabled
  287.   end
  288.  
  289.   #--------------------------------------------------------------------------
  290.   # alias method: hp=
  291.   #--------------------------------------------------------------------------
  292.   alias game_battlerbase_hpequals_ics hp=
  293.   def hp=(value)
  294.     game_battlerbase_hpequals_ics(value)
  295.     return unless SceneManager.scene_is?(Scene_Battle)
  296.     return unless actor?
  297.     return if value == 0
  298.     SceneManager.scene.refresh_input_combo_skill_window(self)
  299.   end
  300.  
  301.   #--------------------------------------------------------------------------
  302.   # alias method: mp=
  303.   #--------------------------------------------------------------------------
  304.   alias game_battlerbase_mpequals_ics mp=
  305.   def mp=(value)
  306.     game_battlerbase_mpequals_ics(value)
  307.     return unless SceneManager.scene_is?(Scene_Battle)
  308.     return unless actor?
  309.     return if value == 0
  310.     SceneManager.scene.refresh_input_combo_skill_window(self)
  311.   end
  312.  
  313.   #--------------------------------------------------------------------------
  314.   # alias method: tp=
  315.   #--------------------------------------------------------------------------
  316.   alias game_battlerbase_tpequals_ics tp=
  317.   def tp=(value)
  318.     game_battlerbase_tpequals_ics(value)
  319.     return unless SceneManager.scene_is?(Scene_Battle)
  320.     return unless actor?
  321.     return if value == 0
  322.     SceneManager.scene.refresh_input_combo_skill_window(self)
  323.   end
  324.  
  325. end # Game_BattlerBase
  326.  
  327. #==============================================================================
  328. # ■ Game_Battler
  329. #==============================================================================
  330.  
  331. class Game_Battler < Game_BattlerBase
  332.  
  333.   #--------------------------------------------------------------------------
  334.   # alias method: on_battle_start
  335.   #--------------------------------------------------------------------------
  336.   alias game_battler_on_battle_start_ics on_battle_start
  337.   def on_battle_start
  338.     game_battler_on_battle_start_ics
  339.     @input_combo_enabled = false
  340.   end
  341.  
  342.   #--------------------------------------------------------------------------
  343.   # alias method: on_battle_end
  344.   #--------------------------------------------------------------------------
  345.   alias game_battler_on_battle_end_ics on_battle_end
  346.   def on_battle_end
  347.     game_battler_on_battle_end_ics
  348.     @input_combo_enabled = false
  349.   end
  350.  
  351.   #--------------------------------------------------------------------------
  352.   # new method: enable_input_combo
  353.   #--------------------------------------------------------------------------
  354.   def enable_input_combo(active)
  355.     return unless actor?
  356.     @input_combo_enabled = active
  357.   end
  358.  
  359. end # Game_Battler
  360.  
  361. #==============================================================================
  362. # ■ Window_ComboSkillList
  363. #==============================================================================
  364.  
  365. class Window_ComboSkillList < Window_Base
  366.  
  367.   #--------------------------------------------------------------------------
  368.   # initialize
  369.   #--------------------------------------------------------------------------
  370.   def initialize
  371.     dw = [Graphics.width/2, 320].max
  372.     super(-standard_padding, 0, dw, fitting_height(7))
  373.     self.z = 200
  374.     self.opacity = 0
  375.     hide
  376.   end
  377.  
  378.   #--------------------------------------------------------------------------
  379.   # reveal
  380.   #--------------------------------------------------------------------------
  381.   def reveal(battler, skill)
  382.     [url=home.php?mod=space&uid=133701]@battler[/url] = battler
  383.     [url=home.php?mod=space&uid=260100]@skill[/url] = skill
  384.     @combo_skills = []
  385.     for key in skill.combo_skill
  386.       next if key[1].nil?
  387.       next if $data_skills[key[1]].nil?
  388.       @combo_skills.push($data_skills[key[1]])
  389.     end
  390.     return if @combo_skills == []
  391.     self.y = Graphics.height - fitting_height(4)
  392.     self.y -= fitting_height(@combo_skills.size + 2)
  393.     show
  394.     activate
  395.     refresh
  396.   end
  397.  
  398.   #--------------------------------------------------------------------------
  399.   # refresh_check
  400.   #--------------------------------------------------------------------------
  401.   def refresh_check(battler)
  402.     return if @battler != battler
  403.     refresh
  404.   end
  405.  
  406.   #--------------------------------------------------------------------------
  407.   # refresh
  408.   #--------------------------------------------------------------------------
  409.   def refresh
  410.     contents.clear
  411.     draw_background_colour
  412.     draw_horz_line(0)
  413.     draw_combo_title
  414.     draw_horz_line(@combo_skills.size * line_height)
  415.     draw_combo_skills
  416.   end
  417.  
  418.   #--------------------------------------------------------------------------
  419.   # draw_background_colour
  420.   #--------------------------------------------------------------------------
  421.   def draw_background_colour
  422.     dh = line_height * (@combo_skills.size + 2)
  423.     rect = Rect.new(0, 0, contents.width, dh)
  424.     back_colour1 = Color.new(0, 0, 0, 192)
  425.     back_colour2 = Color.new(0, 0, 0, 0)
  426.     contents.gradient_fill_rect(rect, back_colour1, back_colour2)
  427.   end
  428.  
  429.   #--------------------------------------------------------------------------
  430.   # draw_horz_line
  431.   #--------------------------------------------------------------------------
  432.   def draw_horz_line(dy)
  433.     line_y = dy + line_height - 2
  434.     line_colour = normal_color
  435.     line_colour.alpha = 48
  436.     contents.fill_rect(0, line_y, contents.width, 2, line_colour)
  437.   end
  438.  
  439.   #--------------------------------------------------------------------------
  440.   # draw_combo_title
  441.   #--------------------------------------------------------------------------
  442.   def draw_combo_title
  443.     reset_font_settings
  444.     text = YEA::INPUT_COMBO::COMBO_TITLE
  445.     contents.font.size = YEA::INPUT_COMBO::TITLE_SIZE
  446.     contents.font.bold = true
  447.     contents.font.italic = true
  448.     draw_text(12, 0, contents.width - 12, line_height, text)
  449.     reset_font_settings
  450.   end
  451.  
  452.   #--------------------------------------------------------------------------
  453.   # draw_combo_skills
  454.   #--------------------------------------------------------------------------
  455.   def draw_combo_skills
  456.     button_array = [:L, :R, :X, :Y, :Z]
  457.     dx = 24
  458.     dy = line_height
  459.     for button in button_array
  460.       next if @skill.combo_skill[button].nil?
  461.       combo_skill = $data_skills[@skill.combo_skill[button]]
  462.       text = text_setting(button, combo_skill)
  463.       text += sprintf("\eI[%d]", combo_skill.icon_index)
  464.       text += combo_skill.name
  465.       draw_text_ex(dx, dy, text)
  466.       dy += line_height
  467.     end
  468.   end
  469.  
  470.   #--------------------------------------------------------------------------
  471.   # text_setting
  472.   #--------------------------------------------------------------------------
  473.   def text_setting(button, skill)
  474.     text = ""
  475.     case button
  476.     when :L
  477.       if @battler.usable?(skill)
  478.         text = YEA::INPUT_COMBO::L_SKILL_ON
  479.       else
  480.         text = YEA::INPUT_COMBO::L_SKILL_OFF
  481.       end
  482.     when :R
  483.       if @battler.usable?(skill)
  484.         text = YEA::INPUT_COMBO::R_SKILL_ON
  485.       else
  486.         text = YEA::INPUT_COMBO::R_SKILL_OFF
  487.       end
  488.     when :X
  489.       if @battler.usable?(skill)
  490.         text = YEA::INPUT_COMBO::X_SKILL_ON
  491.       else
  492.         text = YEA::INPUT_COMBO::X_SKILL_OFF
  493.       end
  494.     when :Y
  495.       if @battler.usable?(skill)
  496.         text = YEA::INPUT_COMBO::Y_SKILL_ON
  497.       else
  498.         text = YEA::INPUT_COMBO::Y_SKILL_OFF
  499.       end
  500.     when :Z
  501.       if @battler.usable?(skill)
  502.         text = YEA::INPUT_COMBO::Z_SKILL_ON
  503.       else
  504.         text = YEA::INPUT_COMBO::Z_SKILL_OFF
  505.       end
  506.     end
  507.     return text
  508.   end
  509.  
  510. end # Window_ComboSkillList
  511.  
  512. #==============================================================================
  513. # ■ Window_ComboInfo
  514. #==============================================================================
  515.  
  516. class Window_ComboInfo < Window_Base
  517.  
  518.   #--------------------------------------------------------------------------
  519.   # initialize
  520.   #--------------------------------------------------------------------------
  521.   def initialize
  522.     super(0, 0, Graphics.width, fitting_height(1))
  523.     self.y = Graphics.height - fitting_height(4) - fitting_height(1)
  524.     self.opacity = 0
  525.     self.z = 200
  526.     @combos = []
  527.     @special = nil
  528.     hide
  529.   end
  530.  
  531.   #--------------------------------------------------------------------------
  532.   # reveal
  533.   #--------------------------------------------------------------------------
  534.   def reveal
  535.     @combos = []
  536.     @special = nil
  537.     refresh
  538.     show
  539.   end
  540.  
  541.   #--------------------------------------------------------------------------
  542.   # refresh
  543.   #--------------------------------------------------------------------------
  544.   def refresh
  545.     contents.clear
  546.     dx = draw_combo_icons
  547.     draw_special(dx)
  548.   end
  549.  
  550.   #--------------------------------------------------------------------------
  551.   # add_combo
  552.   #--------------------------------------------------------------------------
  553.   def add_combo(icon, special = nil)
  554.     @combos.push(icon)
  555.     @special = special
  556.     refresh
  557.   end
  558.  
  559.   #--------------------------------------------------------------------------
  560.   # draw_combo_icons
  561.   #--------------------------------------------------------------------------
  562.   def draw_combo_icons
  563.     dx = 0
  564.     for icon in @combos
  565.       draw_icon(icon, dx, 0)
  566.       dx += 24
  567.     end
  568.     return dx
  569.   end
  570.  
  571.   #--------------------------------------------------------------------------
  572.   # draw_special
  573.   #--------------------------------------------------------------------------
  574.   def draw_special(dx)
  575.     return if @special.nil?
  576.     draw_icon(@special.icon_index, dx + 12, 0)
  577.     colour = text_color(YEA::INPUT_COMBO::SPECIAL_SKILL_COLOUR)
  578.     change_color(colour)
  579.     draw_text(dx + 36, 0, contents.width, line_height, @special.name)
  580.   end
  581.  
  582. end # Window_ComboInfo
  583.  
  584. #==============================================================================
  585. # ■ Scene_Battle
  586. #==============================================================================
  587.  
  588. class Scene_Battle < Scene_Base
  589.  
  590.   #--------------------------------------------------------------------------
  591.   # alias method: create_all_windows
  592.   #--------------------------------------------------------------------------
  593.   alias scene_battle_create_all_windows_ics create_all_windows
  594.   def create_all_windows
  595.     scene_battle_create_all_windows_ics
  596.     create_combo_skill_window
  597.   end
  598.  
  599.   #--------------------------------------------------------------------------
  600.   # new method: create_combo_skill_window
  601.   #--------------------------------------------------------------------------
  602.   def create_combo_skill_window
  603.     @input_combo_skill_window = Window_ComboSkillList.new
  604.     @input_combo_info_window = Window_ComboInfo.new
  605.     @input_combo_skill_counter = 0
  606.   end
  607.  
  608.   #--------------------------------------------------------------------------
  609.   # alias method: use_item
  610.   #--------------------------------------------------------------------------
  611.   alias scene_battle_use_item_ics use_item
  612.   def use_item
  613.     @subject.enable_input_combo(true)
  614.     item = @subject.current_action.item
  615.     combo_skill_list_appear(true, item)
  616.     start_input_combo_skill_counter(item)
  617.     scene_battle_use_item_ics
  618.     loop do
  619.       break if break_input_combo?(item)
  620.       update_basic
  621.       update_combo_skill_queue
  622.     end
  623.     combo_skill_list_appear(false, item)
  624.     @subject.enable_input_combo(false)
  625.   end
  626.  
  627.   #--------------------------------------------------------------------------
  628.   # new method: combo_skill_list_appear
  629.   #--------------------------------------------------------------------------
  630.   def combo_skill_list_appear(visible, skill)
  631.     return if @subject.nil?
  632.     return unless @subject.actor?
  633.     return unless skill.is_a?(RPG::Skill)
  634.     return if visible && @input_combo_skill_window.visible
  635.     if visible
  636.       @break_combo = false
  637.       @current_combo_skill = skill
  638.       @total_combo_skills = 0
  639.       @combo_skill_queue = []
  640.       @combo_skill_string = ""
  641.       @input_combo_skill_window.reveal(@subject, skill)
  642.       @input_combo_info_window.reveal
  643.     else
  644.       @input_combo_skill_window.hide
  645.       @input_combo_info_window.hide
  646.       return if @subject.current_action.nil?
  647.       @subject.current_action.set_skill(@current_combo_skill.id)
  648.     end
  649.   end
  650.  
  651.   #--------------------------------------------------------------------------
  652.   # new method: refresh_input_combo_skill_window
  653.   #--------------------------------------------------------------------------
  654.   def refresh_input_combo_skill_window(battler)
  655.     return unless @input_combo_skill_window.visible
  656.     @input_combo_skill_window.refresh_check(battler)
  657.   end
  658.  
  659.   #--------------------------------------------------------------------------
  660.   # new method: start_input_combo_skill_counter
  661.   #--------------------------------------------------------------------------
  662.   def start_input_combo_skill_counter(skill)
  663.     return unless @input_combo_skill_window.visible
  664.     @input_combo_skill_counter = YEA::INPUT_COMBO::MINIMUM_TIME
  665.     bonus_time = skill.combo_max * YEA::INPUT_COMBO::TIME_PER_INPUT
  666.     @input_combo_skill_counter += bonus_time
  667.   end
  668.  
  669.   #--------------------------------------------------------------------------
  670.   # new method: break_input_combo?
  671.   #--------------------------------------------------------------------------
  672.   def break_input_combo?(item)
  673.     # This part is added in this fix to break input combo if at least 1 side is all dead
  674.     return true if $game_party.all_dead? || $game_troop.all_dead?
  675.     #
  676.     return true if @break_combo
  677.     return true if @current_combo_skill.nil?
  678.     return true if @current_combo_skill.combo_skill == {}
  679.     return false if @combo_skill_queue != []
  680.     return true if @total_combo_skills == @current_combo_skill.combo_max
  681.     return @input_combo_skill_counter <= 0
  682.   end
  683.  
  684.   #--------------------------------------------------------------------------
  685.   # new method: update_combo_skill_queue
  686.   #--------------------------------------------------------------------------
  687.   def update_combo_skill_queue
  688.     return if @combo_skill_queue == []
  689.     action = @combo_skill_queue.shift
  690.     if !@subject.usable?(action)
  691.       @break_combo = true
  692.       return
  693.     end
  694.     @subject.current_action.set_input_combo_skill(action.id)
  695.     @log_window.clear
  696.     execute_action
  697.   end
  698.  
  699.   #--------------------------------------------------------------------------
  700.   # alias method: update_basic
  701.   #--------------------------------------------------------------------------
  702.   alias scene_battle_update_basic_ics update_basic
  703.   def update_basic
  704.     scene_battle_update_basic_ics
  705.     update_input_combo_skill_counter
  706.     update_input_combo_skill_select
  707.   end
  708.  
  709.   #--------------------------------------------------------------------------
  710.   # new method: update_input_combo_skill_counter
  711.   #--------------------------------------------------------------------------
  712.   def update_input_combo_skill_counter
  713.     return if @input_combo_skill_counter == 0
  714.     @input_combo_skill_counter -= 1
  715.   end
  716.  
  717.   #--------------------------------------------------------------------------
  718.   # new method: update_input_combo_skill_select
  719.   #--------------------------------------------------------------------------
  720.   def update_input_combo_skill_select
  721.     return unless @input_combo_skill_window.visible
  722.     return if @total_combo_skills >= @current_combo_skill.combo_max
  723.     if Input.trigger?(:L)
  724.       check_input_combo_skill(:L)
  725.     elsif Input.trigger?(:R)
  726.       check_input_combo_skill(:R)
  727.     elsif Input.trigger?(:X)
  728.       check_input_combo_skill(:X)
  729.     elsif Input.trigger?(:Y)
  730.       check_input_combo_skill(:Y)
  731.     elsif Input.trigger?(:Z)
  732.       check_input_combo_skill(:Z)
  733.     end
  734.   end
  735.  
  736.   #--------------------------------------------------------------------------
  737.   # new method: check_input_combo_skill
  738.   #--------------------------------------------------------------------------
  739.   def check_input_combo_skill(button)
  740.     skill_id = @current_combo_skill.combo_skill[button]
  741.     return if skill_id.nil?
  742.     return if $data_skills[skill_id].nil?
  743.     case button
  744.     when :L; @combo_skill_string += "L"
  745.     when :R; @combo_skill_string += "R"
  746.     when :X; @combo_skill_string += "X"
  747.     when :Y; @combo_skill_string += "Y"
  748.     when :Z; @combo_skill_string += "Z"
  749.     end
  750.     if special_input_combo?
  751.       icon = $data_skills[skill_id].icon_index
  752.       @combo_skill_queue.push($data_skills[skill_id])
  753.       skill_id = @current_combo_skill.combo_special[@combo_skill_string]
  754.       combo_skill = $data_skills[skill_id]
  755.       @input_combo_info_window.add_combo(icon, combo_skill)
  756.       YEA::INPUT_COMBO::ACHIEVED_COMBO_SOUND.play
  757.       @total_combo_skills = @current_combo_skill.combo_max
  758.     else
  759.       YEA::INPUT_COMBO::INPUT_COMBO_SOUND.play
  760.       combo_skill = $data_skills[skill_id]
  761.       @input_combo_info_window.add_combo(combo_skill.icon_index)
  762.       @total_combo_skills += 1
  763.     end
  764.     @combo_skill_queue.push(combo_skill)
  765.     return unless @total_combo_skills == @current_combo_skill.combo_max
  766.     @input_combo_skill_counter = 0
  767.   end
  768.  
  769.   #--------------------------------------------------------------------------
  770.   # new method: special_input_combo?
  771.   #--------------------------------------------------------------------------
  772.   def special_input_combo?
  773.     combo_hash = @current_combo_skill.combo_special
  774.     return false unless combo_hash.include?(@combo_skill_string)
  775.     skill = $data_skills[combo_hash[@combo_skill_string]]
  776.     return @subject.skills.include?(skill)
  777.   end
  778.  
  779. end # Scene_Battle
  780.  
  781. #==============================================================================
  782. #
  783. # ▼ End of File
  784. #
  785. #==============================================================================

Lv3.寻梦者

梦石
0
星屑
2512
在线时间
215 小时
注册时间
2017-9-27
帖子
613
2
发表于 2017-9-27 22:22:24 | 只看该作者
要按下按钮的
回复 支持 反对

使用道具 举报

Lv6.析梦学徒

老鹰

梦石
40
星屑
34725
在线时间
6740 小时
注册时间
2012-5-26
帖子
3259

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

3
发表于 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 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3099
在线时间
518 小时
注册时间
2012-7-4
帖子
48
4
 楼主| 发表于 2017-9-27 23:15:06 | 只看该作者

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

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2512
在线时间
215 小时
注册时间
2017-9-27
帖子
613
5
发表于 2017-9-28 21:43:24 | 只看该作者
忧韵谷 发表于 2017-9-27 23:15
恩恩,它允许我设定连招,可是这一个命令我不知道要怎么设置才对。

写在技能备注下

点评

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

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-17 16:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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