XP 스크립트

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆무적 상태 - KGC_Invincible◆
#_/----------------------------------------------------------------------------
#_/ 무적 상태가 되는 스테이트를 작성합니다.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

$imported["Invincible"] = true

# 무적 상태 스테이트ID취득
for state in $data_states.compact
  if state.name == "무적"
    $game_state_invincible = state.id
    break
  end
end

#==============================================================================
# ■ Game_Battler (분할 정의 2)
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ● 스테이트 [무적] 판정
  #    act : 처리 대상
  #--------------------------------------------------------------------------
  def invincible?(act = nil)
    # 스테이트[무적]이 부가되고 있는 경우
    if self.states.include?($game_state_invincible)
      # 처리 대상으로 분기
      case act
      when RPG::Skill
        return true if act.scope == 1 || act.scope == 2
      when RPG::Item
        return true if act.scope == 1 || act.scope == 2
      when nil
        return true
      end
    end
    return false
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler (분할 정의 3)
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ● 통상 공격의 효과 적용
  #--------------------------------------------------------------------------
  alias attack_effect_KGC_Invincible attack_effect
  def attack_effect(attacker)
    # 무적 상태의 경우
    if self.invincible?
      # 데미지에 "Miss" 를 설정
      self.damage = "Miss"
      # 위기 플래그를 클리어
      self.critical = false
      # 가짜를 돌려주는
      return false
    end

    # 원의 처리를 실행
    return attack_effect_KGC_Invincible(attacker)
  end
  #--------------------------------------------------------------------------
  # ● 스킬의 효과 적용
  #--------------------------------------------------------------------------
  alias skill_effect_KGC_Invincible skill_effect
  def skill_effect(user, skill)
    # 무적 상태의 경우
    if self.invincible?(skill)
      # 데미지에 "Miss" 를 설정
      self.damage = "Miss"
      # 위기 플래그를 클리어
      self.critical = false
      # 가짜를 돌려주는
      return false
    end

    # 원의 처리를 실행
    return skill_effect_KGC_Invincible(user, skill)
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 효과 적용
  #--------------------------------------------------------------------------
  alias item_effect_KGC_Invincible item_effect
  def item_effect(item)
    # 무적 상태의 경우
    if self.invincible?(item)
      # 데미지에 "Miss" 를 설정
      self.damage = "Miss"
      # 위기 플래그를 클리어
      self.critical = false
      # 가짜를 돌려주는
      return false
    end

    # 원의 처리를 실행
    return item_effect_KGC_Invincible(item)
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
201 기타 Chaos Project Debug System 1.06b by Blizzard file Alkaid 2010.09.07 1370
200 그래픽 Weather Script(버전 불명) by ccoa 1 file Alkaid 2010.09.08 1572
199 메시지 Universal Message System 1.8.0 by ccoa 1 file Alkaid 2010.09.08 2185
198 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1376
197 메뉴 Ring menu edit (Non-SDK ver.) Alkaid 2010.09.08 1547
196 기타 간단한 Scene_Base Alkaid 2010.09.09 1394
195 아이템 Categorized Items Menu 1.3 by albertfish 1 file Alkaid 2010.09.09 1798
194 메시지 Hermes(Hermes Extends RPGXP Message System) 0.3d by derula Alkaid 2010.09.10 2025
193 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1645
192 전투 Mr. Mo's ABS 5.5 13 Alkaid 2010.09.10 3459
191 전투 CTB by Charlie Fleed 3.1 - FF10 스타일의 전투시스템 6 Alkaid 2010.09.10 2975
190 전투 Minkoff's Animated Battlers - Enhanced 13.2 by DerVVulfman Alkaid 2010.09.10 1687
189 메뉴 L's Custom Menu #4: 'Compact' (SDK 2.x 필수) Alkaid 2010.09.11 1758
188 액터 크리쳐 합체, 'SW_CreatureMix(for_rmxp)' by SiotWarrior 21 file 시옷전사 2010.09.11 2781
187 HUD MOG_C_HUD. 6 file Bera 2010.09.11 2333
186 HUD MOG_Active_Hud 3 file Bera 2010.09.11 2468
185 저장 Advanced Save Menu 편집한 것. (SDK2용) Alkaid 2010.09.11 1219
184 메뉴 L's Custom Menu #3: 1인용 메뉴 Revision 1 3 Alkaid 2010.09.12 2363
183 그래픽 MAWS: Modified Advanced Weather Script 1.2 by Agckuu Coceg 2 file Alkaid 2010.09.13 1969
182 액터 Actor Customization 6.0.2 by Synthesize 4 file Alkaid 2010.09.17 1912
Board Pagination Prev 1 ... 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52