It kinda bothered me that regardless of how well the player was doing including avoiding damage or a situation where the player uses a healing item only to level at full health and lose 30% of their health as a sort of leveling tax. So I decided that a method that looks at the percentage of health the player currently has and compares it to the base health regeneration and which ever of the two is higher becomes the value the maximum health gets multiplied by.
Here’s my code snip it if you’re curious.
void RegenerateHealth()
{
float checkHealth = currentHealth/maxHealth;
maxHealth = baseStats.GetStat(Stat.HEALTH);
float regenRate = Mathf.Max(baseHealthRegen, checkHealth);
currentHealth = Mathf.Round(maxHealth*regenRate);
}