设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 122|回复: 0

[转载发布] Battle Skills Combining

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-1 14:22:19 | 显示全部楼层 |阅读模式
    Battle Skill Combination

    Version: 1.0

    Author: Devil Knight



    Introduction
    This Script allow you in battle to Combine Between Skills To Make Stronger One

    Features

    - Easy to use.

    - Make You use high level skills in the beginning of the game

     
    How to Use

    - Put above main and below Materials
    - Other Instruction in the script

     
    Demo

    https://www.dropbox.com/s/es88hbgtyuum782/Skill%20Combination%20Demo.rar?dl=0



    Script:
    Spoiler                Code:       
    1.  #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#                       #[b]                      [/b][b] [/b]Battle Skill Combination#                       Version: 1.0#                       Author: Devil Knight#                       Date: 2nd  Oct, 2014#-------------------------------------------------------------------------------# Description:##       This Script allow you to Combine Between Skills To Make Stronger One##-------------------------------------------------------------------------------# Instruction:##     - In Editablel Region do the following:#       #       - In Skill Combination Section Write name of the skills that will Combine##       - Should Be Like This:#             "(first skill name)(space)(+)(space)(second skill name)"##       - If The Combination of skills was not in skill_combination then #           the second skill will executed#             #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=module Devil_Knight  module  Skill_Combination    #---------------------------------------------------------------------      #                                                                 #    #                  Start of EDITABLE REGION                       #    #                                                                 #    #--------------------------------------------------------------------    Skills =     {      #                                combination        :skill_combination      =>  ["Fire + Fire", "Thunder + Thunder"],      #                                    |                 |      # Result of combination              V                 V        :combination_result     =>  [   "Flame",        "Spark" ],      #                                     |                 |      # Result of combination Skill ID      V                 V        :combination_result_id  =>  [     53,               61      ], # Take it from Skill ID From Database     }    #---------------------------------------------------------------------      #                                                                 #    #                  End of EDITABLE REGION                         #    #                                                                 #    #--------------------------------------------------------------------  endend#==============================================================================# ** Window_BattleSkill#------------------------------------------------------------------------------#  This window is for selecting skills to use in the battle window.#============================================================================== class Window_BattleSkill < Window_SkillList  #--------------------------------------------------------------------------  # * Handling Processing for OK and Cancel Etc.  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_window_battleskill_process_handling  process_handling  def process_handling    devil_knight_skill_combination_window_battleskill_process_handling()    return process_select          if select_enabled?    && Input.trigger?(:SHIFT)  # Assign Button to Skill Select    return process_select_cancel   if select_disabled?    && Input.trigger?(:CTRL)  # Assign Button to Skill Select Cancel  end  #--------------------------------------------------------------------------  # * New Method: Get Activation State of Select Processing  #--------------------------------------------------------------------------  def select_enabled?    handle?(:select)  end   #--------------------------------------------------------------------------  # * New Method: Call Select Handler  #--------------------------------------------------------------------------  def call_select_handler    call_handler(:select)  end  #--------------------------------------------------------------------------  # * New Method: Get Activation State of Select Disabled Processing  #--------------------------------------------------------------------------  def select_disabled?    handle?(:cancel_select)  end  #--------------------------------------------------------------------------  # * New Method: Call Select Cancel Handler  #--------------------------------------------------------------------------  def call_select_cancel_handler    call_handler(:cancel_select)  end  #--------------------------------------------------------------------------  # * New Method: Processing When Select Button Is Pressed  #--------------------------------------------------------------------------  def process_select    if current_item_enabled?      Sound.play_ok      Input.update       call_select_handler    else      Sound.play_buzzer    end  end  #--------------------------------------------------------------------------  # * New Method: Processing When Select Cancel Button Is Pressed  #--------------------------------------------------------------------------  def process_select_cancel      Sound.play_buzzer      call_select_cancel_handler  endend #==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#============================================================================== class Scene_Battle < Scene_Base  include Devil_Knight::Skill_Combination  attr_accessor     :first_skill    # Assign First Selected Skill  attr_accessor     :secound_skill  # Assign Secound Selected Skill  #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_start   start  def start    devil_knight_skill_combination_scene_battle_start()    @first_skill    = nil    @secound_skill  = nil  end  #--------------------------------------------------------------------------  # * Create Skill Window  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_create_skill_window   create_skill_window  def create_skill_window    devil_knight_skill_combination_scene_battle_create_skill_window()    @skill_window.set_handler(:select,            method(:on_skill_select))    @skill_window.set_handler(:cancel_select,     method(:on_skill_select_cancel))  end  #--------------------------------------------------------------------------  # * Skill [OK]  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_on_skill_ok   on_skill_ok  def on_skill_ok    if @first_skill != nil  && @secound_skill != nil  # Check Is There Any Selected Skill      @skill = $data_skills[get_skill_combination_result] # Assign The Result Combination Skill       BattleManager.actor.input.set_skill(@skill.id)      BattleManager.actor.last_skill.object = @skill      @first_skill   = nil  # Delete The First Assigned Skill      @secound_skill = nil  # Delete The Secound Assigned Skill      if !@skill.need_selection?        @skill_window.hide        next_command      elsif @skill.for_opponent?        select_enemy_selection      else        select_actor_selection      end    else      devil_knight_skill_combination_scene_battle_on_skill_ok()    end  end  #--------------------------------------------------------------------------  # * New Method: Get The Result Of Skills Combination  #--------------------------------------------------------------------------  def get_skill_combination_result    i = -1    current_combination = @first_skill.name + " + " + @secound_skill.name # Make Text of Combination Skills Names To Check    Skills[:skill_combination].each do |combination|      if combination == current_combination        i += 1        return Skills[:combination_result_id][i]  # Return Result of Combination Skill ID      else        i += 1      end    end    return @secound_skill.id  # Return The ID of Secound Skill  end  #--------------------------------------------------------------------------  # * New Method: Skill [Select]  #--------------------------------------------------------------------------  def on_skill_select    if @first_skill == nil  # Check if First Skill Has Been Selected      @first_skill    = @skill_window.item  # Assign First  Skill      @help_window.set_text(@first_skill.name + " + ")  # Text Appear in Help Window For clarification    else      @secound_skill = @skill_window.item # Assign Secound  Skill      @help_window.set_text(@first_skill.name + " + " + @secound_skill.name)  # Text Appear in Help Window For clarification    end  end  #--------------------------------------------------------------------------  # * New Method: Skill [Cancel Select]  #--------------------------------------------------------------------------  def on_skill_select_cancel    if @secound_skill != nil # Check if Secound Skill Has Been Selected       @secound_skill = nil  # Delete The Secound Assigned Skill      @help_window.set_text(@first_skill.name + " + ")  # Text Appear in Help Window For clarification    elsif @first_skill != nil # Check if First Skill Has Been Selected      @first_skill = nil  # Delete The First Assigned Skill      @help_window.clear  # Clear Help Window    end  end  #--------------------------------------------------------------------------  # * Start Actor Command Selection  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_start_actor_command_selection   start_actor_command_selection   def start_actor_command_selection    @first_skill    = nil # Delete The First Assigned Skill    @secound_skill  = nil # Delete The Secound Assigned Skill    devil_knight_skill_combination_scene_battle_start_actor_command_selection()  endend
    复制代码







    Credit and Thanks

    - all Members of this community For all help they gave me to do this



    Author's Notes

    - Any Question I am More Than happy to answer

    - Please Feedback because it is really Help
    - Have Fun


    本贴来自国际rpgmaker官方论坛作者:GGSlayer处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/battle-skills-combining.32546/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 23:19 , Processed in 0.139739 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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