diff --git a/tests/Aetheria.Shared.Tests/ContactRevealTests.cs b/tests/Aetheria.Shared.Tests/ContactRevealTests.cs index 0194eb6de..de55501ff 100644 --- a/tests/Aetheria.Shared.Tests/ContactRevealTests.cs +++ b/tests/Aetheria.Shared.Tests/ContactRevealTests.cs @@ -249,6 +249,33 @@ public sealed class ContactRevealTests : IDisposable Assert.Empty(e.RevealsOf(o)); // a ship is not told what it shows } + // ---- AFiredGunIsAimableAndItsTwinIsNot ---- + + // Two guns of one design: firing one makes that gun, and only that gun, something the observer can select and + // keep aimed at. The book is per item, not per design or per hardpoint type. + [Fact] + public void AFiredGunIsAimableAndItsTwinIsNot() + { + var e = Add(float3(30, 0, 40), new[] { "Gun", "Gun" }); + var o = Add(float3(0, 0, 0), new[] { "Eye" }); + var guns = Guns(e); + Assert.Same(guns[0].Data, guns[1].Data); // the same design + o.SetTarget(e); + Assert.False(FireControl.IsRevealed(o, guns[0])); + Assert.False(o.TrySelectTargetItem(guns[0])); + + Fire(e, guns[0]); + o.SetTarget(e); + + Assert.True(FireControl.IsRevealed(o, guns[0])); + Assert.False(FireControl.IsRevealed(o, guns[1])); + Assert.False(o.TrySelectTargetItem(guns[1])); + Assert.True(o.TrySelectTargetItem(guns[0])); + for (var i = 0; i < 300; i++) Tick(.1f); + Assert.Same(guns[0], o.ResolvedTargetItem); + Assert.False(FireControl.IsRevealed(o, guns[1])); + } + // ---- AnActAboveTheReachRevealsNothing ---- // Info settles at S x 2 / (d k): with S = 5 the act is revealed inside d = 100 / k and not beyond it, whatever k is. diff --git a/tests/Aetheria.Shared.Tests/FireControlCut6dTests.cs b/tests/Aetheria.Shared.Tests/FireControlCut6dTests.cs index 12857f0cf..c9ae69e9c 100644 --- a/tests/Aetheria.Shared.Tests/FireControlCut6dTests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlCut6dTests.cs @@ -108,8 +108,8 @@ public sealed class FireControlCut6dTests : IDisposable } } }); // Durability far above anything a single shot deals: an aim point this cut's tests fire hundreds or - // thousands of rounds at must survive being hit directly for the whole run, or Cut 5.5's "a destroyed - // item drops out of the reveal ranking" rule pulls the aim out from under later shots mid-sample and + // thousands of rounds at must survive being hit directly for the whole run, or a destroyed aim point is + // dropped from aiming (FireControl.IsRevealed) and pulls the aim out from under later shots mid-sample and // silently corrupts the landing distribution for everything fired after that point. cache.Upsert(new GearData {