Keep defender-victim opinions as allies after a quarrel.
The clash penalty applied to every pair except defender looking at the victim, so the person being helped disliked the defender like a second enemy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -230,6 +230,34 @@ public class QuarrelFightTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Defender_AndVictim_OpinionsMoveAsAllies()
|
||||
{
|
||||
var (school, pupils) = ThreePupilsOnBreak();
|
||||
using (school)
|
||||
{
|
||||
var bully = pupils[0];
|
||||
var victim = pupils[1];
|
||||
var defender = pupils[2];
|
||||
OpinionStore.Set(bully, victim.Id, -55);
|
||||
OpinionStore.Set(victim, bully.Id, -55);
|
||||
OpinionStore.Set(defender, victim.Id, 70);
|
||||
PlaceAt(school, bully.Id, "corridor-1");
|
||||
PlaceAt(school, victim.Id, "corridor-1");
|
||||
PlaceAt(school, defender.Id, "corridor-1");
|
||||
|
||||
Assert.True(school.TryStartAction(bully.Id, TalkActions.Quarrel));
|
||||
TickWhile(school, personId => ActivityOf(school, personId) == TalkActions.Quarrel, bully.Id, victim.Id, defender.Id);
|
||||
|
||||
Assert.True((OpinionStore.Get(defender, victim.Id) ?? 0) > 70);
|
||||
Assert.True((OpinionStore.Get(victim, defender.Id) ?? 0) > 0);
|
||||
Assert.True((OpinionStore.Get(defender, bully.Id) ?? 0) < 0);
|
||||
Assert.True((OpinionStore.Get(victim, bully.Id) ?? 0) < -55);
|
||||
Assert.True((OpinionStore.Get(bully, victim.Id) ?? 0) < -55);
|
||||
Assert.True((OpinionStore.Get(bully, defender.Id) ?? 0) < 0);
|
||||
}
|
||||
}
|
||||
|
||||
private static (School School, Person First, Person Second) TwoPupilsOnBreak()
|
||||
{
|
||||
var (catalog, map) = Vanilla();
|
||||
|
||||
Reference in New Issue
Block a user