class Scene_Map alias cld99_update update def update cld99_update update_recover_hp end def update_recover_hp @time ||= 0 Input.dir4 == 0 ? @time += 1 : @time = 0 if @time == 300 $game_party.members.each do |actor| actor.change_hp(actor.mhp / 5, true) end @time = 0 end end end
class Scene_Map
alias cld99_update update
def update
cld99_update
update_recover_hp
end
def update_recover_hp
@time ||= 0
Input.dir4 == 0 ? @time += 1 : @time = 0
if @time == 300
$game_party.members.each do |actor|
actor.change_hp(actor.mhp / 5, true)
end
@time = 0
end
end
end
修改13行的actor.mhp / 5来得到你要恢复的量,目前是最大hp的5分之1
|