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 6202
261 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
260 기타 My메세지(메세지 출력 스크립트) 1 file 백호 2009.02.22 1533
259 온라인 multy-netplay 로그인창에서 비밀번호를 ***표시해주는 script~! 1 백호 2009.02.22 1889
258 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
257 장비 Multislots! 2.2 by DerVVulfman 4 file Alkaid 2011.02.18 1611
256 장비 Multislots! 2.1 by DerVVulfman 3 file Alkaid 2010.09.02 1540
255 기타 Multiple Languages v2 by SephirothSpawn (SDK호환) file 백호 2009.02.22 1405
254 기타 Multiple Currencies(여러 개의 통화단위 사용) 2 백호 2009.02.22 1124
253 온라인 Multi-Netplay Extended[구버전용] 3 백호 2009.02.22 2176
252 온라인 Multi-Netplay Extended (신버전) 10 백호 2009.02.22 2864
251 장비 Multi-equip script 노신버전 2 file 백호 2009.02.22 1129
250 장비 Multi-equip script ver.6 by Guillaume777 4 file 백호 2009.02.22 1210
249 장비 Multi-equip script 2 file 백호 2009.02.21 1101
248 장비 Multi Equip 3.1.4 by Trickster (SDK2 호환, Method & Class Li… 4 file WMN 2008.04.06 1598
247 전투 MrMo DVV Add-On #13: Tinuke's Smart Missiles 2 Alkaid 2011.01.24 1846
246 전투 Mr.mo's SBABS Lite 5 6 아방스마니아 2010.11.14 2947
245 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
244 전투 Mr.Mo's ABS Ultimate 3.4 by DerVVulfman Alkaid 2012.03.14 1803
243 전투 Mr.Mo's ABS Ultimate 2.6 by DerVVulfman Alkaid 2012.01.04 1820
242 온라인 Mr.Metring NPE 1.0 [RPG XP 온라인 스크립트] 35 아방스 2009.01.07 6535
Board Pagination Prev 1 ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 ... 52 Next
/ 52