Merge branch 'phase/41-opinions'

# Conflicts:
#	docs/phases/README.md
This commit is contained in:
Leonid Pershin
2026-08-20 07:58:05 +03:00
25 changed files with 1021 additions and 28 deletions
+40
View File
@@ -308,6 +308,38 @@ public sealed class BehaviorDef : Def
/// <summary>Game minutes for <c>ChangeClothes*</c> actions.</summary>
public float ChangeClothesMinutes { get; init; } = 5f;
/// <summary>Parent → child start. Child → parent uses <see cref="OpinionChildToParentStart"/>.</summary>
public int OpinionParentToChildStart { get; init; } = 85;
public int OpinionChildToParentStart { get; init; } = 75;
public int OpinionSiblingStart { get; init; } = 45;
public int OpinionPartnerStart { get; init; } = 65;
/// <summary>Points each work morning moves an opinion toward family basis or zero.</summary>
public int OpinionDriftPerMorning { get; init; } = 3;
/// <summary>How many non-family friends or enemies the card lists at the top.</summary>
public int OpinionTopCount { get; init; } = 5;
/// <summary>
/// Caption bands for 100…100. Highest <see cref="OpinionBand.Min"/> the value still meets wins.
/// Empty falls back to <see cref="DefaultOpinionBands"/>.
/// </summary>
public IReadOnlyList<OpinionBand> OpinionBands { get; init; } = DefaultOpinionBands;
public static IReadOnlyList<OpinionBand> DefaultOpinionBands { get; } =
[
new() { Min = 70, Id = "OpinionCloseFriend" },
new() { Min = 40, Id = "OpinionFriend" },
new() { Min = 20, Id = "OpinionPleasant" },
new() { Min = 1, Id = "OpinionAcquaintance" },
new() { Min = -1, Id = "OpinionStrained" },
new() { Min = -40, Id = "OpinionDislike" },
new() { Min = -100, Id = "OpinionEnemy" },
];
public static IReadOnlyList<ApparelConditionBand> DefaultConditionBands { get; } =
[
new() { Min = 0.75f, Id = "ApparelConditionIntact" },
@@ -325,6 +357,14 @@ public sealed class ApparelConditionBand
public required string Id { get; init; }
}
/// <summary>One caption on an opinion value. <see cref="Id"/> is a locale key, not a Def.</summary>
public sealed class OpinionBand
{
public int Min { get; init; }
public required string Id { get; init; }
}
public enum BodyAttributeKind
{
Number,