#==============================================================================
#  @> Level Up HP Adjust ~ Karin's Soulkeeper, 2015
#------------------------------------------------------------------------------
#   v1.0 - May 10 : Started & finished.
#------------------------------------------------------------------------------
#  * Description:
#    VXA simply increases MHP without doing the same for HP, thus leaving you
#    with lesser HP per MHP than before leveling up. The same also goes for
#    MP and MMP. This small script remedies that by maintaining the previous
#    proportions accordingly.
#------------------------------------------------------------------------------
#  * To Use:
#    Put this script below Materials and above Main.
#------------------------------------------------------------------------------
#  * Compatibility:
#    This script overwrites Game_Actor.level_up. May cause conflicts with other
#    scripts that also change the said method.
#------------------------------------------------------------------------------
#  * Terms:
#    Free to use in any kind of project, with or without credit. I wouldn't
#    really mind. Though I'd appreciate it! (^w^)/
#    Just don't, you know, claim that you made this here script yourself,
#    Because that's just mean (._.)
#==============================================================================

#==============================================================================
# ** Modified Class: Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Overwrite: Level Up
  #--------------------------------------------------------------------------
  def level_up
    hp_prev = @hp.to_f / mhp * 100
    mp_prev = @mp.to_f / mmp * 100
    @level += 1
    @hp *= hp_prev
    @mp *= mp_prev
    self.class.learnings.each do |learning|
      learn_skill(learning.skill_id) if learning.level == @level
    end
  end
end