Add a test proving guard also protects a rear-guard from retirement

This commit is contained in:
MpakobecEx 2026-10-21 13:10:03 +05:00
parent b7473f73d7
commit 5262b6b93c
1 changed files with 16 additions and 0 deletions

View File

@ -608,6 +608,22 @@ public class GameEngineTests
Assert.Equal(14000, engine.EffectivePower(alfred));
}
[Fact]
public void Guard_Protects_RearGuard_From_Retirement()
{
var engine = ReadyToAttackRearGuard();
Give(engine, 1, Barcgal);
Assert.True(engine.Execute(new AttackCommand(3, 0)).Accepted);
Assert.True(engine.Execute(new GuardCommand(Barcgal)).Accepted);
Assert.True(engine.Execute(new PassGuardCommand()).Accepted);
var defender = engine.State.Players[1];
Assert.NotNull(defender.RearGuards[0]);
Assert.Contains(defender.Drop, c => c.PrintingId == Barcgal);
Assert.DoesNotContain(engine.Events, e => e is UnitRetiredEvent);
}
[Fact]
public void ResolveTrigger_Rejects_When_Nothing_Is_Pending()
{