XP 스크립트

방어했을 때에 HP/SP가 회복하는 스크립트입니다.
…그것 뿐입니다.다른 무엇이기도 하지 않습니다.

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆防御時回復 - KGC_GuardRecover◆
#_/----------------------------------------------------------------------------
#_/ 防御時にHP/SPを回復する処理を追加します。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================

class Scene_Battle
  # ◆HP回復割合(%)
  RECOVER_HP_RATE = 5
  # ◆SP回復割合(%)
  RECOVER_SP_RATE = 0
end

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

$imported = {} if $imported == nil
$imported["GuardRecover"] = true

#==============================================================================
# ■ Scene_Battle (分割定義 4)
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 基本アクション 結果作成
  #--------------------------------------------------------------------------
  alias make_basic_action_result_KGC_GuardRecover make_basic_action_result
  def make_basic_action_result
    # 元の処理を実行
    make_basic_action_result_KGC_GuardRecover

    # 行動が防御の場合
    if @active_battler.current_action.kind == 0 &&
        @active_battler.current_action.basic == 1
      # 回復量計算
      recover_hp = @active_battler.maxhp * RECOVER_HP_RATE / 100
      recover_sp = @active_battler.maxsp * RECOVER_SP_RATE / 100
      if recover_hp > 0
        @active_battler.damage = -recover_hp
      end
      if recover_sp > 0
        if $imported["SPDamage"]
          @active_battler.sp_damage = -recover_sp
        else
          @active_battler.damage = "#{$data_system.words.sp}+ #{recover_sp}"
        end
      end
      @active_battler.hp += recover_hp
      @active_battler.sp += recover_sp
      # 回復値を表示
      @target_battlers |= [@active_battler]
    end
  end
end


이것으로, 방어시에 HP/SP를 회복시킬 수 있습니다.

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
701 기타 [신기술 체험] RM포트리스 4 file 백호 2009.02.22 1430
700 전투 KGC_AutoRecover(매턴 자동 회복) 1 백호 2009.02.22 1430
699 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
698 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1432
697 기타 모험 일기 스크립트 2 file 백호 2009.02.21 1434
696 전투 대전게임 Fighter 1 file 백호 2009.02.21 1436
695 스킬 Grouping and Details 8.1 by DerVVulfman 4 file Alkaid 2011.04.18 1437
694 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
693 전투 전투 난이도 설정 스크립트 file 백호 2009.02.21 1442
692 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1444
691 기타 필드에서 경험치%를 표시합니다. 4 file 백호 2009.02.22 1448
690 기타 프리 윈도우 스크립트 (상입오두막 출처) 6 백호 2009.02.21 1449
689 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1453
688 전투 SG_Batte Retry ver.4 by sandgolem 2 백호 2009.02.22 1457
687 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1458
686 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1458
685 전투 추적 공격 스크립트 백호 2009.02.21 1459
684 메뉴 FF7형식의 메뉴로 변경하는 스크립트 1 file 백호 2009.02.21 1463
683 HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1463
682 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ... 52 Next
/ 52