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 5592
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 29398
77 기타 Yanfly Engine Ace Alkaid 2011.12.10 4410
76 전투 Yanfly 엔진 - 몬스터의 레벨 설정 6 file 스리아씨 2013.11.08 13040
75 그래픽 [ACE][BR] Awesome Light Effects 1.0(빛관련 스크립트) 37 file 꿈꾸는사람 2012.08.02 7058
74 이동 및 탈것 [RPG VX ACE]CSCA 텔레포트 스크립트 스리아씨 2014.01.05 2451
73 전투 [VX Ace] Damage Popup by Dargor 7 Alkaid 2011.12.04 5476
72 메뉴 [VX Ace] 다이얼 링 메뉴 스크립트 8 file RaonHank 2012.04.16 6702
71 타이틀/게임오버 [VX ACE]타이틀 화면에 맵을 표시하는 스크립트 4 file 스리아씨 2013.12.07 3567
70 스킬 [VX/VX Ace] Skill_Update_System 10 file 허걱 2012.06.11 4021
69 기타 [스크립트 사용자용] Tag System 1 허걱 2012.11.12 2112
68 메시지 [스크립트] Ace Message System - by. Yanfly 17 file 허걱 2012.05.21 7295
67 이동 및 탈것 [스크립트] Setp Sound (발걸음 소리) 20 file 허걱 2012.05.19 4684
66 전투 [스크립트] Sideview Battle System ver. 1.00 (일본어) 7 file 허걱 2012.05.20 6931
65 전투 多人数SRPGコンバータ for Ace by AD.Bank 6 습작 2013.05.13 4070
64 기타 게임속 이벤트를 텍스트 파일로 추출 2 file 영감쟁e 2013.10.15 3797
63 전투 공격시 반동데미지 스크립트 8 스리아씨 2013.10.11 1916
62 전투 기본전투의 커스텀 명중률 제작 안나카레리나 2018.06.10 577
61 전투 능력 강화/약화의 누적식 개조(버그수정) 13 아이미르 2012.02.08 3896
60 기타 던전 자동생성 4 Alkaid 2012.09.08 3175
59 전투 데미지의 한계치를 정하는 스크립트 3 file 스리아씨 2013.11.07 2075
58 HUD 동방프로젝트(풍신록) 맵 이름 표시 3 file 스리아씨 2013.09.24 3278
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11