Scale lesson gain by warmth the same way hunger already did.
The bar was live and drove dressing; a frozen pupil in class still learned as if it were May. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,9 +3,8 @@ using HSchool.Content;
|
||||
namespace HSchool.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// How much a lesson adds to one skill this step. Hungry learns worse; trait offsets and the
|
||||
/// teacher's subject skill scale the rate. The world stores the running total — this is just
|
||||
/// the number.
|
||||
/// How much a lesson adds to one skill this step. Hungry or cold learns worse; trait offsets and
|
||||
/// the teacher's subject skill scale the rate. Missing warmth is treated as 1.
|
||||
/// </summary>
|
||||
public static class LessonLearning
|
||||
{
|
||||
@@ -54,13 +53,15 @@ public static class LessonLearning
|
||||
float hours,
|
||||
float hunger,
|
||||
int traitOffset,
|
||||
float teacherSkill)
|
||||
float teacherSkill,
|
||||
float warmth = 1f)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(skill);
|
||||
var delta = share
|
||||
* lessonSkillPerHour
|
||||
* hours
|
||||
* NeedFactor(hunger)
|
||||
* NeedFactor(warmth)
|
||||
* TraitFactor(traitOffset)
|
||||
* TeacherFactor(teacherSkill);
|
||||
return Math.Clamp(current + delta, skill.Range.Min, skill.Range.Max);
|
||||
|
||||
Reference in New Issue
Block a user