Merge branch 'phase/44-quarrel-fight'

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	docs/phases/README.md
#	src/HSchool.Content/PeopleDefs.cs
#	src/HSchool.People/Roster.cs
#	src/HSchool.People/Seed.cs
This commit is contained in:
Leonid Pershin
2026-08-20 13:24:12 +03:00
21 changed files with 1505 additions and 24 deletions
+25
View File
@@ -281,6 +281,16 @@ internal static class PeopleDefValidator
{
throw new ContentLoadException($"TraitDef '{trait.DefName}' whisperCatchMultiplier cannot be negative.");
}
if (trait.ConflictChance < 0f)
{
throw new ContentLoadException($"TraitDef '{trait.DefName}' conflictChance cannot be negative.");
}
if (trait.ApologyChance < 0f)
{
throw new ContentLoadException($"TraitDef '{trait.DefName}' apologyChance cannot be negative.");
}
}
private static void ValidateNeed(NeedDef need)
@@ -627,6 +637,21 @@ internal static class PeopleDefValidator
{
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' teacher-talk weights cannot be negative.");
}
if (behavior.QuarrelChance is < 0f or > 1f)
{
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' quarrelChance must be 01.");
}
if (behavior.FightChance is < 0f or > 1f)
{
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' fightChance must be 01.");
}
if (behavior.ApologyRestoreFraction is < 0f or > 1f)
{
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' apologyRestoreFraction must be 01.");
}
}
private static void ValidateTopic(TopicDef topic, DefCatalog catalog)