Visibility 5: a fired gun is aimable and its same-design twin is not; fix stale reveal-ranking comment
Builds: yes (verified by the follow-up job). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f866db1e1c
commit
a58aea6375
2 changed files with 29 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue