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 7326
201 스킬 스킬변화를 주는 스크립트 2 백호 2009.02.21 1215
200 기타 창고 스크립트 2 백호 2009.02.21 1214
199 영상 XP에서 AVI파일을 지원가능하게 하는 스크립트 2 백호 2009.02.21 1214
198 기타 [신기술 체험] 빠른 애니매이션 1 file 백호 2009.02.22 1213
197 전투 Steal Script 5.5 by trickster@rmxp.net (SDK호환) file 백호 2009.02.22 1213
196 기타 Defining Encounter Areas by RPG Advocate (사용법 첨부) file 백호 2009.02.22 1207
195 전투 Advanced Individual Battle Command v2.1 by Trickster@rmxp.org (SDK호환) 1 file 백호 2009.02.22 1206
194 전투 SimpleAction (출처 -RPGXP 포럼 비밀소년님의 자작품) 1 file 백호 2009.02.21 1205
193 장비 장비무기가이드&쉴드방어 1 백호 2009.02.22 1194
192 전투 RTAB 1.15와 애드온 from 歯車の城 4 file 백호 2009.02.22 1192
191 기타 Resolution Changer Ultimate by Zeus81 7 file 습작 2013.05.05 1191
190 기타 Steal Script (SDK Required) file 백호 2009.02.21 1191
189 이름입력 Advanced Enter Hero Name Window by RPG Advocate 백호 2009.02.22 1190
188 기타 상점 변동시세 적용 스크립트 3 file 백호 2009.02.21 1190
187 기타 현재 맵BGM을 그대로 전투 BGM으로 연결 from phylomortis.com 백호 2009.02.22 1188
186 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1187
185 맵/타일 Mode07 0.5 by mewsterus 3 백호 2009.02.22 1183
» 상태/속성 순간 적으로 무적상태되는 스크립트 백호 2009.02.21 1183
183 기타 마우스로 길찾기 스크립트 예제 file 백호 2009.02.21 1181
182 기타 메세지를 분출해 표시 백호 2009.02.22 1178
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