XP 스크립트

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆마법 반사 - KGC_SkillReflection◆
#_/----------------------------------------------------------------------------
#_/ 마법 반사 기능을 추가합니다.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

# 도입이 끝난 플래그를 온
$imported["SkillReflection"] = true

# 마법 반사용 스테이트 ID취득
for state in $data_states
  next if state == nil
  if state.name == "리후레크"
    $game_state_reflection = state.id
    break
  end
end

#==============================================================================
# ★ 커스터마이즈 항목 ★
#==============================================================================

class Scene_Battle
  # 리후레크용 애니메이션 ID
  REFLECTION_ANIM_ID = 101
end

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

#=== ===========================================================================
# ■ Game_Battler (분할 정의 2)
#------------------------------------------------------------------------------
#  버틀러를 취급하는 클래스입니다.이 클래스는 Game_Actor 클래스와 Game_Enemy 곳간
# 스의 슈퍼 클래스로서 사용됩니다.
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# ● 스테이트 [리후레크] 판정
# skill : 처리 대상의 스킬
#----------------------------------------------------------------- ---------
  def reflection?(skill)
    # 스테이트[리후레크]가 부가, 한편 스킬이 마법의 경우
    if @states.include?($game_state_reflection) &&
        skill.atk_f == 0 && skill.int_f > 0
      return true
    end
    return false
  end
end

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

#============================ ==================================================
# ■ Game_Battler (분할 정의 3)
#------------------------------------------------------------------------------
#  버틀러를 취급하는 클래스입니다.이 클래스는 Game_Actor 클래스와 Game_Enemy 곳간
# 스의 슈퍼 클래스로서 사용됩니다.
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# ● 스킬의 효과 적용
# user : 스킬의 사용자 (버틀러)
# skill : 스킬
#-------------------------------------------- ------------------------------
  alias skill_effect_KGC_SkillReflection skill_effect
  def skill_effect(user, skill)
    # 반사할 수 있는 경우는 돌아온다
    return false if user != self && self.reflection?(skill)

    # 원래의 처리를 실행
    return skill_effect_KGC_SkillReflection(user, skill)
  end
end

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

#==============================================================================
# ■ Scene_Battle (분할 정의 4)
#------------------------------------------------------------------------------
#  배틀 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 스킬 액션 결과 작성
  #--------------------------------------------------------------------------
  alias make_skill_action_result_KGC_SkillReflection make_skill_action_result
  def make_skill_action_result
    # 원래의 처리를 실행
    make_skill_action_result_KGC_SkillReflection

    # 리후레크 발동 플래그를 오프
    @skill_reflected = false
    # 원래의 발동자 데미지를 초기화
    user_damage = 0
    for target in @target_battlers
      # 리후 레크 발동 판정
      if @skill != nil && target != @active_battler && target.reflection?(@skill)
        # 리후레크 발동 플래그를 온
        @skill_reflected = true
        # 발동자에게 뒤집는다
        @active_battler.skill_effect(@active_battler, @skill)
        # 데미지가 양쪽 모두 수치의 경우
        if user_damage.is_a?(Numeric) && @active_battler.damage.is_a?(Numeric)
          # 데미지를 가산
          user_damage += @active_battler.damage
        else
          # 그대로 설정
          user_damage = @active_battler.damage
        end
      end
    end
    # 최종적인 데미지를 적용
    @active_battler.damage = user_damage if @skill_reflected
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 국면 스텝 4 : 대상측 애니메이션)
  #--------------------------------------------------------------------------
  alias update_phase4_step4_KGC_SkillReflection update_phase4_step4
  def update_phase4_step4
    # 원래의 처리를 실행
    update_phase4_step4_KGC_SkillReflection

    # 리후레크가 발동했을 경우
    if @active_battler.current_action.kind == 1 && @skill_reflected
      # 대상측 애니메이션
      for target in @target_battlers
        # 대상의 리후레크가 발동했을 경우
        if target.reflection?(@skill)
          # 발동자에게 아니메이시 를 돌려준다
          @active_battler.animation_id = @animation2_id
          @active_battler.animation_hit = (target.damage != "Miss")
          # 타겟트후레크 발동 애니메이션을 설정
          target.animation_id = REFLECTION_ANIM_ID
          target.animation_hit = true
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (メインフェ?ズ ステップ 5 : ダメ?ジ表示)
  #--------------------------------------------------------------------------
  alias update_phase4_step5_KGC_SkillReflection update_phase4_step5
  def update_phase4_step5
    # 元の?理を?行
    update_phase4_step5_KGC_SkillReflection

    # リフレクが?動した場合
    if @skill_reflected
      # ?動者もダメ?ジ表示
      if @active_battler.damage != nil
        @active_battler.damage_pop = true
      end
      @skill_reflected = false
    end
  end
end

Who's *ps인간

?

Top mia

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
601 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1622
600 오디오 WinAMP 플러그인을 이용하여 RMXP에서 다른 형식의 음악파일 재생하기 file 백호 2009.02.22 1259
599 기타 아래 스크립트에 대한 Guillaume777님의 개량판입니다. 백호 2009.02.22 880
598 아이템 아이템을 얻으면 자동으로 아이템 입수 메세지윈도우 띄우기 4 백호 2009.02.22 2279
597 메뉴 자작 커스텀 메뉴(데모 첨부) 3 백호 2009.02.22 2348
596 메뉴 KGC 메뉴화면 개조 스크립트 번역 3 file 백호 2009.02.22 1942
595 기타 KGC 디버거 (최신 올라온 것에 비해 성능은 딸리지만) file 백호 2009.02.22 929
594 장비 Multi-equip script ver.6 by Guillaume777 4 file 백호 2009.02.22 1210
593 기타 일시정지 스크립트 2 file 백호 2009.02.22 1796
592 아이템 아이템 인벤토리 2 file 백호 2009.02.22 3356
591 기타 Weather Script 1.02 by ccoa 1 file 백호 2009.02.22 810
590 메시지 Animated Window Skin by Tana 1 백호 2009.02.22 1338
589 스킬 Skill Shop by SephirothSpawn file 백호 2009.02.22 813
588 기타 다중 파노라마 사용 by Guillaume777 file 백호 2009.02.22 886
587 그래픽 Bitmap update 2.0 by Linkin_T 1 백호 2009.02.22 985
586 기타 ABS 몬스터 HP 게이지 바 11 백호 2009.02.22 2485
585 맵/타일 Map Event Large Make 2 백호 2009.02.22 1134
584 기타 파노라마 스크롤 스크립트 개량판 by Guillaume777 1 백호 2009.02.22 896
583 HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1463
582 기타 제작한 게임의 파일을 모두 exe파일 하나에 쓸어담기 by sheefo@Creation Asylum 1 file 백호 2009.02.22 1240
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ... 52 Next
/ 52