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
181 전투 KGC_SeparationCommand file 백호 2009.02.22 1713
180 이동 및 탈것 KGC_RemoveElements file 백호 2009.02.22 1127
179 전투 KGC_RateDamage(비율 데미지) 3 file 백호 2009.02.22 1657
178 전투 KGC_RankConception(대열 개념) file 백호 2009.02.22 1719
177 전투 KGC_RandomTarget(랜덤 타겟) 1 file 백호 2009.02.22 1500
176 전투 KGC_PreempAttack(선제공격) file 백호 2009.02.22 1406
175 전투 KGC_OverDrive(오버 드라이브) 3 file 백호 2009.02.22 2551
174 스킬 KGC_HideNameSkill(명칭 비표시 스킬) 백호 2009.02.22 1124
173 전투 KGC_GuardRecover(방어시 HP회복) 4 백호 2009.02.22 1348
172 전투 KGC_FusionEnemy(에너미 융합) 1 백호 2009.02.22 1660
171 장비 KGC_EquipmentBreak(장비품 파괴) 1 백호 2009.02.22 1356
170 전투 KGC_DamageAlter(데미지 표시 개조) 8.24 14 file 백호 2009.02.22 3157
169 스킬 KGC_CrashSkill(자폭스킬) 4 file 백호 2009.02.22 2030
168 전투 KGC_BonusGauge (보너스게이지) 3 file 백호 2009.02.22 2765
167 전투 KGC_BattlerEffect(버틀러 효과) 2 file 백호 2009.02.22 1959
166 전투 KGC_AutoRecover(매턴 자동 회복) 1 백호 2009.02.22 1431
165 전투 KGC_Active Count Battle (7/30일자) 7 file 백호 2009.02.22 1846
164 저장 KGC_2PaneSave 15 file 키라링 2009.01.23 1869
163 파티 KGC-대규모파티 25 rgnrk001 2010.03.01 3774
162 기타 KGC, SG 필수 스크립트 1 백호 2009.02.22 1110
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52