id: c3 title: A C3 lance shoots from where its friends can see status: open dependsOn: [los, candidates] exitCriterion: > A mover in a C3 lance is offered, per candidate hex, whether standing there could have its to-hit boosted through the network, and a force with no C3 pays nothing for the question. #
c3 #
MegaMek already resolves C3, and WeaponAttackAction.toHit names it. A slave 13
hexes from a target, networked to a master standing 1 hex from it, is handed
4 (gunnery skill) + 0 (short range due to C3 spotter) against
4 (gunnery skill) + 2 (medium range) with the network broken - a 4 rather than
a 6, off the same call the bot already makes.
Compute.exposed_findC3Spotter picks the spotter and answers the attacker
itself when there is no network.
So this is about choosing where to stand, not about correcting a figure. Nothing the bot reads is wrong. What it cannot see is that a hex is worth standing in because of where somebody else is, which is a question about candidate generation.
The overlay #
A pass over the mover's own candidate hexes producing one fact each: could a shot from here be boosted through the network. It proposes no hex; it annotates the ones the movement search already produced.
Two populations contribute and they are not the same shape. A network member that has already moved contributes from where it stands - one position, one set of LOS answers. One that has not yet moved contributes from anywhere in its reachable set, so its contribution is a set of vantages rather than a position. That asymmetry is the cost of the pass: a search per un-moved member, their reachable sets against the mover's own candidates.
The gate is half the design #
Expensive where it applies and absent everywhere else, so the predicate that
decides whether to run it must be cheap and must be asked first.
Entity.hasAnyC3System is the umbrella over ten narrower predicates and answers
it per unit. A pass that is free when absent and expensive when present is a
different proposition from one that is uniformly expensive.
What it needs #
- The gate, per force, before any of the rest.
- Reachable sets for un-moved members:
pathfindrun for a unit that is not the one deciding. Whether that can share the side's per-turn LOS cache is the first performance question. - A rule turning a set of vantages into one answer per mover hex. "Could be boosted" over a set is optimistic - it credits a vantage the friend may not take - and crediting only already-moved members is the conservative alternative. Neither is measured.
- A feature, or an input to one. An overlay nothing scores changes no decision.
C3 and indirect-fire spotting are the same shape - one unit's shot depending on
what another can see - and both enter through Compute. The SpotAction work
may be the seam.