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 28932
217 그래픽 셰이크 강화 스크립트 file 시낵스 2023.12.13 163
216 오디오 볼륨변경 스크립트 레기우스州 2020.08.09 517
215 전투 LNX11 전투 RPGXP 전투처럼 만들기 큔. 2018.11.23 1451
214 온라인 브라우저 열기 스크립트 1 큔. 2018.09.09 674
213 타이틀/게임오버 GG침 스크립트 file 큔. 2018.07.18 839
212 메뉴 파티 개별 인벤토리 스크립트 안나카레리나 2018.06.25 742
211 전투 기본전투의 커스텀 명중률 제작 안나카레리나 2018.06.10 544
210 기타 LUD Script Package file LuD 2017.08.15 1081
209 맵/타일 레이어 맵 <layer> 기능 2 file LuD 2017.08.03 1474
208 HUD 아이템 레어리티 스크립트 (번역기 돌림) 2 file 부초 2017.07.21 1427
207 기타 (링크)RPG VX ACE 블랙잭 스크립트 게임애호가 2017.06.18 1004
206 전투 SPRG 컨버터 NEXT 1 file 게임애호가 2016.06.09 1906
205 전투 Tomoaky's RGSS3_SRPG ver.0.15a 한국어번역 3 file 초코빙수 2016.06.05 2074
204 맵/타일 Map Zoom Ace by MGC 습작 2016.02.28 1017
203 메시지 Item Choice Help Window for Ace 2 file 습작 2016.02.15 1380
202 기타 '결정 키로 이벤트 시작' 조건분기 추가 file Bunny_Boy 2016.01.16 1169
201 그래픽 커스텀 아이콘 적용하기 2 file 간로 2015.09.28 2724
200 버그픽스 RGSS3 Unofficial Bug Fix Snippets Alkaid 2015.09.09 662
199 이동 및 탈것 Khas Pathfinder(길찾기 스크립트) 15 찬잎 2015.07.10 1961
198 메시지 아이템 정보 메세지가 뜨는 아이템 획득 1 폴라 2015.05.21 2369
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11