Ace 스크립트

스킬을 훔치는 시스템입니다.


돈 밝히는 모 게임회사의 온라인게임에서 새로나온 직업이 아마 이런 기술을 가지고 있죠?


저는 아직 rgss가 미숙해서 잘 이해가 되진 않지만, 잘 아시는 분들이 아마 잘 활용하리라 믿습니다.


출처 : http://translate.googleusercontent.com/translate_c?hl=ko&prev=/search%3Fq%3Drpg%2Bvx%2Bace%26hl%3Dko%26newwindow%3D1%26biw%3D667%26bih%3D639%26tbs%3Dqdr:h%26prmd%3Dimvns&rurl=translate.google.co.kr&sl=en&twu=1&u=http://yamiworld.wordpress.com/2011/12/11/yeas-add-on-skill-steal-unofficial-edition-v1-00/&usg=ALkJrhgZA81UMIKE1w1s40raka35XXm_-A






#==============================================================================

# 겈 Yanfly Engine Ace - Skill Steal v1.00

#   Yami's Unofficial Edition

# -- Last Updated: 2011.12.11

# -- Level: Normal

# -- Requires: n/a

#==============================================================================


$imported = {} if $imported.nil?

$imported["YEA-SkillSteal"] = true


#==============================================================================

# 겈 Updates

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# 2011.12.11 - Edited (Yami).

# 2011.12.10 - Started Script and Finished.

#==============================================================================

# 겈 Introduction

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# This script enables items and skills to have skill stealing properties. When

# an actor uses that said item or skill on an enemy and the enemy has skills

# that can be stolen, that actor will learn all of the skills the enemy has to

# provide. This skill stealing system is madeakin to the Final Fantasy X's

# Lancet skill from Kimahri.

#==============================================================================

# 겈 Instructions

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# To install this script, open up your script editor and copy/paste this script

# to an open slot below 겈 Materials/멹띫 but above 겈 Main. Remember to save.

# -----------------------------------------------------------------------------

# Skill Notetags - These notetags go in the skills notebox in the database.

# -----------------------------------------------------------------------------

# <skill steal>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list.

#

# <skill steal temp>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list, but all learned skills

# will be forget when the battle ends.

# <stealable skill: x>

# A skill with this notetag can be stolen from enemies if it is listed within

# the enemy's action list. x is the chance this skill can be stolen.

# -----------------------------------------------------------------------------

# Item Notetags - These notetags go in the items notebox in the database.

# -----------------------------------------------------------------------------

# <skill steal>

# If this item targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list.

#

# <skill steal temp>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list, but all learned skills

# will be forget when the battle ends.

#==============================================================================

# 겈 Compatibility

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that

# it will run with RPG Maker VX without adjusting.

#==============================================================================


module YEA

  module SKILL_STEAL

    

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - Battlelog Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # These are the various battlelog settings made for skill stealing. Change

    # the text and message duration for a successful skill stealing.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    MSG_SKILL_STEAL = "%s learns %s from %s!" # Text for successful steal.

    MSG_FAIL        = "%s fails on learning %s from %s!" # Text for successful steal.

    MSG_DURATION    = 4                       # Lower number = shorter duration.

    

  end # SKILL_STEAL

end # YEA


#==============================================================================

# 겈 Editting anything past this point may potentially result in causing

# computer damage, incontinence, explosion of user's head, coma, death, and/or

# halitosis so edit at your own risk.

#==============================================================================


module YEA

  module REGEXP

  module USABLEITEM

    

    SKILL_STEAL     = /<(?:SKILL_STEAL|skill steal)>/i

    SKILL_STEAL_TEM = /<(?:SKILL_STEAL_TEMP|skill steal temp)>/i

    STEALABLE_SKILL = /<(?:STEALABLE_SKILL|stealable skill):[ ](d+)?>/i

    

  end # USABLEITEM

  end # REGEXP

end # YEA


#==============================================================================

# 걾 DataManager

#==============================================================================


module DataManager

  

  #--------------------------------------------------------------------------

  # alias method: load_database

  #--------------------------------------------------------------------------

  class <<self; alias load_database_ss load_database; end

  def self.load_database

    load_database_ss

    load_notetags_ss

  end

  

  #--------------------------------------------------------------------------

  # new method: load_notetags_ss

  #--------------------------------------------------------------------------

  def self.load_notetags_ss

    groups = [$data_skills, $data_items]

    for group in groups

      for obj in group

        next if obj.nil?

        obj.load_notetags_ss if obj.is_a?(RPG::Skill)

        obj.load_notetags_ss if obj.is_a?(RPG::Item)

      end

    end

  end

  

end # DataManager


#==============================================================================

# 걾 RPG::UsableItem

#==============================================================================


class RPG::UsableItem < RPG::BaseItem

  

  #--------------------------------------------------------------------------

  # public instance variables

  #--------------------------------------------------------------------------

  attr_accessor :skill_steal

  attr_accessor :skill_steal_temp

  attr_accessor :stealable_skill

  attr_accessor :stealable_skill_chance

  

  #--------------------------------------------------------------------------

  # common cache: load_notetags_s

  #--------------------------------------------------------------------------

  def load_notetags_ss

    #---

    self.note.split(/[rn]+/).each { |line|

      case line

      #---

      when YEA::REGEXP::USABLEITEM::SKILL_STEAL

        @skill_steal = true

      when YEA::REGEXP::USABLEITEM::SKILL_STEAL_TEM

        @skill_steal_temp = true

      when YEA::REGEXP::USABLEITEM::STEALABLE_SKILL

        next unless self.is_a?(RPG::Skill)

        @stealable_skill = true

        @stealable_skill_chance = $1.to_i

        @stealable_skill_chance = 0 if @stealable_skill_chance < 0

        @stealable_skill_chance = 100 if @stealable_skill_chance > 100

      #---

      end

    } # self.note.split

    #---

  end

  

end # RPG::UsableItem


#==============================================================================

# 걾 Game_Battler

#==============================================================================


class Game_Battler < Game_BattlerBase

  

  #--------------------------------------------------------------------------

  # public instance variables

  #--------------------------------------------------------------------------

  attr_accessor :stolen_skills

  

  #--------------------------------------------------------------------------

  # alias method: on_battle_start

  #--------------------------------------------------------------------------

  alias steal_skill_on_battle_start on_battle_start

  def on_battle_start

    steal_skill_on_battle_start

    @stolen_skills = [] if self.actor?

  end

  

  #--------------------------------------------------------------------------

  # alias method: on_battle_end

  #--------------------------------------------------------------------------

  alias steal_skill_on_battle_end on_battle_end

  def on_battle_end

    steal_skill_on_battle_end

    if self.actor?

      for i in @stolen_skills

        forget_skill(i)

      end

      @stolen_skills = []

    end

  end

  

  #--------------------------------------------------------------------------

  # alias method: item_user_effect

  #--------------------------------------------------------------------------

  alias game_battler_item_user_effect_ss item_user_effect

  def item_user_effect(user, item)

    game_battler_item_user_effect_ss(user, item)

    item_skill_steal_effect(user, item)

  end

  

  #--------------------------------------------------------------------------

  # new method: item_skill_steal_effect

  #--------------------------------------------------------------------------

  def item_skill_steal_effect(user, item)

    return unless item.skill_steal

    return unless user.actor?

    return if self.actor?

    for skill in stealable_skills

      next if user.skill_learn?(skill)

      @result.success = true

      break

    end

  end

  

end # Game_Battler


#==============================================================================

# 걾 Game_Enemy

#==============================================================================


class Game_Enemy < Game_Battler

  

  #--------------------------------------------------------------------------

  # stealable_skills

  #--------------------------------------------------------------------------

  def stealable_skills

    array = []

    for action in enemy.actions

      skill = $data_skills[action.skill_id]

      array.push(skill) if skill.stealable_skill

    end

    return array

  end

  

end # Game_Enemy


#==============================================================================

# 걾 Scene_Battle

#==============================================================================


class Scene_Battle < Scene_Base

  

  #--------------------------------------------------------------------------

  # alias method: apply_item_effects

  #--------------------------------------------------------------------------

  alias scene_battle_apply_item_effects_ss apply_item_effects

  def apply_item_effects(target, item)

    scene_battle_apply_item_effects_ss(target, item)

    apply_skill_steal(target, item)

  end

  

  #--------------------------------------------------------------------------

  # new method: apply_skill_steal

  #--------------------------------------------------------------------------

  def apply_skill_steal(target, item)

    return unless item.skill_steal or item.skill_steal_temp

    return if target.actor?

    return unless @subject.actor?

    for skill in target.stealable_skills

      next if @subject.skill_learn?(skill)

      if rand(100) <= skill.stealable_skill_chance

        @subject.learn_skill(skill.id) if !item.skill_steal_temp

        if item.skill_steal_temp

          @subject.learn_skill(skill.id)

          @subject.stolen_skills.push(skill.id) if !@subject.stolen_skills.include?(skill.id)

        end

        string = YEA::SKILL_STEAL::MSG_SKILL_STEAL

        skill_text = sprintf("\i[%d]%s", skill.icon_index, skill.name)

        text = sprintf(string, @subject.name, skill_text, target.name)

        @log_window.add_text(text)

        YEA::SKILL_STEAL::MSG_DURATION.times do @log_window.wait end

        @log_window.back_one

      else

        string = YEA::SKILL_STEAL::MSG_FAIL

        skill_text = sprintf("\i[%d]%s", skill.icon_index, skill.name)

        text = sprintf(string, @subject.name, skill_text, target.name)

        @log_window.add_text(text)

        YEA::SKILL_STEAL::MSG_DURATION.times do @log_window.wait end

        @log_window.back_one

      end

    end

  end

  

end # Scene_Battle


#==============================================================================

# 겈 End of File

#==============================================================================

  • ?
    rpgxp배우미 2011.12.30 16:41

    악 메이플 ㅋㅋㅋ

  • ?
    단맛과자 2011.12.31 16:51

    몬스터의 스킬을 뺏는건가요?

  • ?
    김진리 2012.07.21 22:16
    팬텀 ㅋㅋㅋㅋ
  • profile
    시즈쿠 2015.09.30 23:08
    뭐지.. 이건 어떻게 쓰는거지.....?
  • profile
    리팝이 2016.08.28 02:14
    요기 글에 있는 스크립트를 복사해서 쓰면 안대네요
    https://github.com/Archeia/YEARepo/blob/master/Gameplay/Skill_Steal.rb#L3
    요기 링크가셔서 스크립트 복사하고 하니 잘 대네요

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28928
217 전투 스킬 캐스팅 시스템 3 스리아씨 2013.10.12 32176
216 전투 RPG VX Ace 전투 대사 한글화 37 재규어 2012.01.04 20292
215 전투 Yanfly 엔진 - 몬스터의 레벨 설정 6 file 스리아씨 2013.11.08 13003
214 이름입력 한글 이름입력창 23 file 에틴 2012.01.23 11680
213 기타 Dialog Extractor 1.04 (VXA/VX/XP) 6 AltusZeon 2014.01.16 11672
212 기타 원하는 글씨체로 변경하기 12 조말생 2012.04.20 8847
211 이름입력 전체키 + 조합한글 + 이름입력처리 변경 47 file 허걱 2012.07.04 8200
210 전투 vx ace 애니메이션 배틀 3 gor 2012.05.27 7664
209 전투 SRPG 컨버터 for Ace (SRPGコンバータ for Ace) by AD.Bank 27 file 습작 2012.04.17 7274
208 메시지 [스크립트] Ace Message System - by. Yanfly 17 file 허걱 2012.05.21 7271
207 그래픽 [ACE][BR] Awesome Light Effects 1.0(빛관련 스크립트) 37 file 꿈꾸는사람 2012.08.02 7015
206 메뉴 Etude87's Menu Editor 44 file 습작 2014.07.17 6996
205 전투 [스크립트] Sideview Battle System ver. 1.00 (일본어) 7 file 허걱 2012.05.20 6912
204 제작도구 VXAce HUD Designer by Cidiomar R. Dias Jr 1 file 습작 2013.01.19 6762
203 메뉴 [VX Ace] 다이얼 링 메뉴 스크립트 8 file RaonHank 2012.04.16 6673
202 스킬 VXACE 패시브 스킬 스크립트 Ver. 0.82 21 file 아이미르 2012.03.07 6669
201 장비 사용자 장비 슬롯 1.1 27 file 아방스 2012.01.31 6615
200 미니맵 미니맵 표시 스크립트 21 file 아방스 2012.01.16 6488
199 전투 VXAce 사이드뷰 스크립트 (번역) 23 아이미르 2012.12.10 6356
198 전투 XAS Hero Edition Ace Experimental 0.5 6 Alkaid 2012.01.15 6130
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11