#==============================================================================
# ■ 战后回复HP,SP
#------------------------------------------------------------------------------
# 如标题
#==============================================================================
module HPSP_RECOVER
HP_RECOVER_RATE = 50
# HP回复比例 范围0..100
SP_RECOVER_RATE = 50
# SP回复比例 范围0..100
ENABLE_SWITCH_ID = 0
# 控制功能的开关编号
# -1 一直禁用 0 一直启用 正整数 对应开关的状态
def self.enable?
id = ENABLE_SWITCH_ID
if id < 0 then false
elsif id == 0 then true
else $game_switches[id] end
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# ● 开始结束战斗回合
#--------------------------------------------------------------------------
alias start_phase5_hpsp_recover start_phase5
def start_phase5
start_phase5_hpsp_recover # 原方法
return 0 unless HPSP_RECOVER.enable?
$game_party.actors.each do |actor|
actor.hp += actor.maxhp * HPSP_RECOVER::HP_RECOVER_RATE / 100
actor.sp += actor.maxsp * HPSP_RECOVER::SP_RECOVER_RATE / 100
end
end
end