From 8076f0ad7e6ccbf1b36b854d182a07cf77542dbc Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 13 Oct 2026 02:22:48 +0200 Subject: [PATCH] Visibility 5: TheAIAimsOnlyAtWhatItSaw also pins that Combat clears a destroyed gun The first form let the Combat-side IsRevealed check be removed unseen, because TrySelectTargetItem refuses an unrevealed pick anyway. A destroyed gun left in the raw aim field distinguishes Combat's own choice. Builds. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/FireControlTests.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/FireControlTests.cs b/tests/Aetheria.Shared.Tests/FireControlTests.cs index 0e3876f1b..70421bcbf 100644 --- a/tests/Aetheria.Shared.Tests/FireControlTests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlTests.cs @@ -238,7 +238,8 @@ public sealed class FireControlTests : IDisposable } // Combat picks a target item only among the items its ship holds a reveal of: the target's gun is in range and - // the target is fully tracked, yet nothing is aimed at until the shooter has seen the gun act. Mutation: + // the target is fully tracked, yet nothing is aimed at until the shooter has seen the gun act, and a destroyed + // gun is cleared by Combat's own choice. Mutation: // Combat tests weapons without IsRevealed, or IsRevealed falls back to the track. [Fact] public void TheAIAimsOnlyAtWhatItSaw() @@ -254,6 +255,13 @@ public sealed class FireControlTests : IDisposable zone.Update(1f); Assert.Same(targetGun, shooter.TargetItem.Value); + + // The gun is destroyed: nothing qualifies any more, so Combat clears the aim point itself rather than + // leaving the dead gun in the raw field. + targetGun.EquippableItem.Durability = 0f; + zone.Update(1f); + + Assert.Null(shooter.TargetItem.Value); } // Controls cut (helm split): Combat aims the shooter at the intercept (Aim) and commands the hull toward it