XP 스크립트

방어시회복하는거래요.

 

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

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

class Scene_Battle
  # ◆HP回復割合(%)
  RECOVER_HP_RATE =  10
  # ◆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.hp}+ #{recover_hp}"
        end
      end
      @active_battler.hp += recover_hp
      @active_battler.sp += recover_sp
      # 回復値を表示
      @target_battlers |= [@active_battler]
    end
  end
end

Comment '8'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
134 전투 Minkoff's Animated Battlers - Enhanced 13.3 by DerVVulfman file Alkaid 2010.10.14 1646
133 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1458
132 전투 Minkoff's Animated Battlers - Enhanced 13.8 by DerVVulfman 1 Alkaid 2012.08.26 1832
131 전투 Mr Mo DVV Addon #14~#17 3 Alkaid 2011.05.23 1285
130 전투 Mr Mo DVV Addon #18~#19 Alkaid 2011.07.13 1266
129 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1432
128 전투 Mr. Mo's ABS 5.5 13 Alkaid 2010.09.10 3459
127 전투 Mr. Mo's ABS Ultimate 1.2 by DerVVulfman Alkaid 2011.11.13 1640
126 전투 Mr. Mo's ABS Ultimate 1.9 by DerVVulfman 2 Alkaid 2011.12.01 1900
125 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
124 전투 Mr.Mo's ABS Ultimate 2.6 by DerVVulfman Alkaid 2012.01.04 1820
123 전투 Mr.Mo's ABS Ultimate 3.4 by DerVVulfman Alkaid 2012.03.14 1803
122 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
121 전투 Mr.mo's SBABS Lite 5 6 아방스마니아 2010.11.14 2947
120 전투 MrMo DVV Add-On #13: Tinuke's Smart Missiles 2 Alkaid 2011.01.24 1846
119 전투 Prize Point System 2.0 by Dark Ruby@rmxp.org 3 file 백호 2009.02.22 1742
118 전투 Real Time Active Battle(RTAB) 1.14 from 歯車の城 3 file 백호 2009.02.22 1315
117 전투 RPG Advocate의 데모에서 발췌한 사이드뷰용 전투상태창 4 file 백호 2009.02.22 3599
116 전투 RTAB 1.15와 애드온 from 歯車の城 4 file 백호 2009.02.22 1186
115 전투 RTAB 1.16ver 12 file 백호 2009.02.22 3962
Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9