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 6153
741 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1348
740 전투 KGC_GuardRecover(방어시 HP회복) 4 백호 2009.02.22 1348
739 기타 실제시간표시스크립트입니다...[중뷁이면지성;;] 4 백호 2009.02.22 1349
738 전투 매턴 자동 회복이나 도트힐 3 file 백호 2009.02.22 1350
737 장비 KGC_EquipmentBreak(장비품 파괴) 1 백호 2009.02.22 1356
736 기타 빛의 퍼즐 -미니게임- 1 file 백호 2009.02.21 1360
735 기타 스크린샷 찍는 스크립트 9 file 백호 2009.02.22 1363
734 기타 Minesweeper(지뢰찾기) by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1363
733 변수/스위치 지정범위안에 들어오면 특정 스위치를 온/오프/교환 한다!! 2 백호 2009.02.21 1365
732 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1367
731 기타 Chaos Project Debug System 1.06b by Blizzard file Alkaid 2010.09.07 1367
730 기타 [All RGSS] 게임 다중 실행 방지 스크립트 1 file Cheapmunk 2014.05.24 1373
729 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1374
728 이동 및 탈것 플레이어 텔레포트 시키기 1 백호 2009.02.22 1375
727 기타 CG모드 도입 스크립트 file 백호 2009.02.21 1383
726 이동 및 탈것 금금님 요청 대쉬 1 백호 2009.02.22 1383
725 기타 KGC_UsableWeapon file 백호 2009.02.22 1384
» 스킬 Skills_Consume_Hp[By: Gando] - HP를 소비하는 스킬 스크립트 4 쉴더 2009.02.21 1385
723 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1389
722 기타 간단한 Scene_Base Alkaid 2010.09.09 1390
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ... 52 Next
/ 52