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 6201
841 기타 Complete Climate and Time System 1.2 by ForeverZer0 1 Alkaid 2010.09.17 1314
840 액터 Actor Customization 6.0.2 by Synthesize 4 file Alkaid 2010.09.17 1912
839 그래픽 MAWS: Modified Advanced Weather Script 1.2 by Agckuu Coceg 2 file Alkaid 2010.09.13 1969
838 메뉴 L's Custom Menu #3: 1인용 메뉴 Revision 1 3 Alkaid 2010.09.12 2363
837 저장 Advanced Save Menu 편집한 것. (SDK2용) Alkaid 2010.09.11 1219
836 HUD MOG_Active_Hud 3 file Bera 2010.09.11 2468
835 HUD MOG_C_HUD. 6 file Bera 2010.09.11 2333
834 액터 크리쳐 합체, 'SW_CreatureMix(for_rmxp)' by SiotWarrior 21 file 시옷전사 2010.09.11 2781
833 메뉴 L's Custom Menu #4: 'Compact' (SDK 2.x 필수) Alkaid 2010.09.11 1758
832 전투 Minkoff's Animated Battlers - Enhanced 13.2 by DerVVulfman Alkaid 2010.09.10 1687
831 전투 CTB by Charlie Fleed 3.1 - FF10 스타일의 전투시스템 6 Alkaid 2010.09.10 2975
830 전투 Mr. Mo's ABS 5.5 13 Alkaid 2010.09.10 3459
829 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1645
828 메시지 Hermes(Hermes Extends RPGXP Message System) 0.3d by derula Alkaid 2010.09.10 2025
827 아이템 Categorized Items Menu 1.3 by albertfish 1 file Alkaid 2010.09.09 1798
826 기타 간단한 Scene_Base Alkaid 2010.09.09 1393
825 메뉴 Ring menu edit (Non-SDK ver.) Alkaid 2010.09.08 1547
824 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1376
823 메시지 Universal Message System 1.8.0 by ccoa 1 file Alkaid 2010.09.08 2185
822 그래픽 Weather Script(버전 불명) by ccoa 1 file Alkaid 2010.09.08 1572
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