public int Rest(int days = 1) { int regainedHealth = 0; for (int d = 0; d < days; d++) { double restEffectiveness = DiceRoller.PickRandomDouble(new double[] { 0.05, 0.075, 0.10 }); int regainedToday = Math.Min((int)Math.Max(restEffectiveness * MaxHitPoints, 1), attributes[Attribute.DamageTaken]); regainedHealth += regainedToday; CurHitPoints += regainedToday; } return(regainedHealth); }