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 7326
701 기타 모험 일기 스크립트 2 file 백호 2009.02.21 1444
700 전투 대전게임 Fighter 1 file 백호 2009.02.21 1445
699 스킬 Grouping and Details 8.1 by DerVVulfman 4 file Alkaid 2011.04.18 1448
698 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1448
697 키입력 전체 키 사용 스크립트 1 백호 2009.02.21 1450
696 전투 KGC_AutoRecover(매턴 자동 회복) 1 백호 2009.02.22 1450
695 전투 전투 난이도 설정 스크립트 file 백호 2009.02.21 1452
694 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1452
693 기타 프리 윈도우 스크립트 (상입오두막 출처) 6 백호 2009.02.21 1456
692 기타 필드에서 경험치%를 표시합니다. 4 file 백호 2009.02.22 1456
691 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1456
690 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1466
689 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1470
688 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1470
687 전투 전투시 미묘한 효과 스크립트 file 백호 2009.02.21 1479
686 이동 및 탈것 대쉬 밑에 꺼 MP가 깍기는거 1 백호 2009.02.22 1481
685 메뉴 FF7형식의 메뉴로 변경하는 스크립트 1 file 백호 2009.02.21 1482
684 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1484
683 전투 SG_Batte Retry ver.4 by sandgolem 2 백호 2009.02.22 1485
682 HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1486
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