[pre lang="ruby"] #每秒恢复生命魔法HPMP
unless self.battler == nil
if Graphics.frame_count % 40 == 0
hp = self.battler.maxhp/100
if hp < 1
@hhp = 0 if @hhp == nil
@hhp += hp
end
sp = self.battler.maxsp/100
self.battler.hp+=hp
self.battler.sp+=sp
unless @hhp < 1 and @hhp == nil
@hhp -= (@hhp).to_i
end
end
end
[/pre]