Mines are flat by data: refuse falloff on a mine layer, Lay reads no factor; clamp test

A mine layer carries no EffectiveRange or DamageAtMaxRange (StatValidation.ValidateMineLayerFlat, run wherever the other catalog rules run), so RangeFactor is 1 inside its gate for the mine, the AI and the panel without any reader branching on type; Lay's damage is the weapon's damage again. Adds a test that fails without Deliver's min(reach, MaxRange) clamp. Not built or tested yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-14 09:06:20 +02:00
commit aff6086c01
5 changed files with 64 additions and 20 deletions

View file

@ -797,9 +797,9 @@ public static class FireControl
FuseDelay = data.FuseDelay,
Lifetime = data.Lifetime,
BlastRadius = blastRadius,
// A mine is laid at the layer, distance 0: it goes through the same falloff as every other payload, so a layer's
// authored ranges decide its mines, the AI's reading of it and its panel alike.
Damage = weapon.Damage * weapon.RangeFactor(0f),
// Mines are flat (ruling effective-range-authoring-ruled): a mine layer carries no falloff authoring
// (StatValidation.ValidateMineLayerFlat), so its figure is the AI's and the panel's at every distance it can engage.
Damage = weapon.Damage,
DamageType = weapon.WeaponData.DamageType,
Layer = source,
LayerFaction = source.Faction