XP 스크립트

#==============================================================================
# ** Skills_Consume_Hp
#------------------------------------------------------------------------------
# By: Gando
# 18/5 2008
#------------------------------------------------------------------------------
#                              INTRODUCTION
#------------------------------------------------------------------------------
#
#  With this script-x you can have certain skills that not only consumes sp,
#  but also hp! Let's say you want to have a character that has a very powerful
#  skill. A skill so powerful that it damages himself too.
#  With this script-x this is possible.
#
#------------------------------------------------------------------------------
#                                 SETUP
#------------------------------------------------------------------------------
#
#  To have a skill that consumes hp, first create the skill in the skill database.
#  Then in this script-x, go to "Skills" in module HpDrain and add the skill id
#  and how much hp it should drain. Like this:
#
#  skill_id => [hp]
#

#  Damage_Popup - Toggle this true/false to enable/disable the popup damage text
#                 for the skills user.
#
#------------------------------------------------------------------------------
#  CREDITS: Gando.
#==============================================================================
# ** Module HpDrain
#==============================================================================
module HpDrain
#skill_id => [hp]
  Skills = 
  {
  13 => [10],
  57 => [50],
  61 => [200]
  }
 
  Damage_Popup = true
end


#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
class Scene_Battle
  alias hp_cost_skill_action make_skill_action_result
  #--------------------------------------------------------------------------
  # * Make Skill Action Results
  #--------------------------------------------------------------------------
  def make_skill_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    if HpDrain::Skills.include?(@skill.id)
      @hp_drain = HpDrain::Skills[@skill.id][0]
      case @skill.id
      when @skill.id
        @active_battler.hp -= @hp_drain
        @active_battler.damage = @hp_drain
        @active_battler.damage_pop = HpDrain::Damage_Popup
       end
    end
    hp_cost_skill_action
  end
end

------------------------------------------------
윗 부분에서
  {
  13 => [10],
  57 => [50],
  61 => [200]
  }
이 부분의 x => [y]

부분이면 x는 스킬의 번호입니다. ex) '001:파이어' 에서 x = 1

y는 hp의 감소량입니다.

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 7316
921 기타 Defining Encounter Areas by RPG Advocate (사용법 첨부) file 백호 2009.02.22 1207
920 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1654
919 기타 Difficulty Options by SephirothSpawn 백호 2009.02.22 872
918 기타 Drago - Custom Resolution by LiTTleDRAgo Alkaid 2014.02.13 1155
917 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1088
916 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 893
915 아이템 Easy Item & Gold Gain by SephirothSpawn (SDK호환) 백호 2009.02.22 899
914 기타 Economy System by Nick@Creation Asylum 1 file 백호 2009.02.22 939
913 맵/타일 Editor Tiles by PK8 (XP/VX/VXA) Alkaid 2012.09.11 1905
912 기타 Encounter Control by SephirothSpawn (SDK호환) 4 file 백호 2009.02.22 1169
911 기타 endroll 주석 번역 6 file insertend 2010.05.15 1649
910 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1016
909 장비 Equipment Upgrade System 1.1 by Charlie Fleed Alkaid 2010.11.18 1961
908 기타 Etude87_Bone_Animation_Character ver.1.2 4 습작 2012.07.06 1275
907 전투 Etude87_Custom_Slip_Damage_XP ver.1.0 5 습작 2012.08.26 1881
906 메뉴 Etude87_Horror_Menu_XP ver.1.1 15 file 습작 2012.08.04 2806
905 메시지 Etude87_Item_Choice_XP ver.1.10 13 file 습작 2013.05.19 2225
904 맵/타일 Etude87_Map_Remember_XP ver.1.2 2 습작 2012.07.17 1653
903 변수/스위치 Etude87_Variables_XP 2 습작 2011.12.26 2130
902 메뉴 Event Spawner 1 file 백호 2009.02.22 991
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52