Review slice 9 C-D: persist clash opinions and the bully's victim.
FinishConflict never set RosterTalkDirty, so people.json skipped quarrel shifts until some other save — the same seam as the A-B talk-circle fix. First BullyVictimId write stayed in RAM only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -104,6 +104,24 @@ public class AffinityTests
|
||||
Assert.Equal(third.Id, left.Bonds.PartnerId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PupilTalkWithTeacherCrush_WritesRebuffAndDropsOpinion()
|
||||
{
|
||||
var catalog = Fixtures.RomanceCatalog();
|
||||
var teacher = Staff("t", female: false, "Bisexual");
|
||||
var pupil = Pupil("p", year: 8, age: 14, female: true, "Bisexual");
|
||||
SetOpinion(pupil, teacher.Id, 80);
|
||||
var roster = RosterOf(teacher, pupil, classYear: 8);
|
||||
Affinity.Refresh(catalog, roster, AsOf);
|
||||
Assert.Contains(teacher.Id, pupil.Bonds!.Crushes);
|
||||
var before = OpinionStore.Get(pupil, teacher.Id) ?? 0;
|
||||
|
||||
var events = Affinity.RebuffTalk(catalog, roster, [pupil.Id, teacher.Id], AsOf);
|
||||
|
||||
Assert.Contains(events, row => row.Type == Affinity.Rebuff && row.PersonId == pupil.Id);
|
||||
Assert.True((OpinionStore.Get(pupil, teacher.Id) ?? 0) < before);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdjacentYearStudents_CanHaveSympathy()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user