What this is
scaleSpreadWithCount is a boolean weapon flag that controls whether a weapon’s spread (or cone width) grows as its projectile count grows. When true, the angular gap between adjacent projectiles stays constant as extra projectiles are added — the fan widens instead of densifying. When false or unset, the spread arc is fixed regardless of projectile count, so extra projectiles pack tighter into the same arc.
The flag is opt-in. Weapons that omit it retain a fixed spread.
Opt-in weapons
| Weapon | Flag | Base spread/cone | Base count | Source |
|---|---|---|---|---|
| Shotgun | scaleSpreadWithCount: true | spreadDeg: 18 | 5 pellets | data/weapons/shotgun.ts |
| Flame | scaleSpreadWithCount: true | coneWidth: 65 | 15 embers (L1) | data/weapons/flame.ts |
Defy explicitly sets scaleSpreadWithCount: false and is not affected. All other weapons omit the flag.
Formula
The flag is consumed in two distinct code paths inside engine/weapons/weapons.ts, one for fan-projectile weapons (shotgun) and one for cone-emitter weapons (flame).
| Weapon family | Formula | Notes |
|---|---|---|
| Fan (shotgun) | effectiveSpreadDeg = spreadDeg * projCount / baseProjCount | Applied only when baseProjCount > 1. Final value converted to radians. |
| Cone (flame) | extraConeMult = max(1, fullEmberCount / baseEmberCount) then coneWidthDeg = baseConeWidthDeg * extraConeMult * earlyNerf * heatFactor | extraConeMult is clamped to a floor of 1, so removing projectiles never shrinks the cone. |
Inputs:
| Symbol | Meaning |
|---|---|
spreadDeg / coneWidth | Base arc in degrees from the weapon data table. |
baseProjCount / baseEmberCount | Projectile count derived from the weapon’s level-stepped table, before extra-projectile upgrades. |
projCount / fullEmberCount | Final projectile count after Extra Projectiles upgrades are added. |
Practical effect
Worked examples follow the formula directly.
| Weapon | Base count | Final count | Base arc | Effective arc | Gap per projectile |
|---|---|---|---|---|---|
| Shotgun | 5 | 5 | 18° | 18° | 4.50° |
| Shotgun | 5 | 6 | 18° | 21.6° | 4.32° |
| Shotgun | 5 | 7 | 18° | 25.2° | 4.20° |
| Shotgun | 5 | 10 | 18° | 36.0° | 4.00° |
| Flame | 15 | 15 | 65° | 65° (× heat × earlyNerf) | 4.33° |
| Flame | 15 | 17 | 65° | 73.67° (× heat × earlyNerf) | 4.33° |
| Flame | 15 | 28 | 65° | 121.33° (× heat × earlyNerf) | 4.33° |
| Flame | 15 | 38 | 65° | 164.67° (× heat × earlyNerf) | 4.33° |
Consequences:
- Extra projectiles increase area coverage instead of overlap.
- Angular density stays roughly flat, so per-target hit rate from a single fan does not climb with count.
- Flame cone width still multiplies against
earlyNerfandheatFactorafter the scale, so a wider cone only reaches its full angular width once the weapon is fully heated. - The shotgun branch uses
Math.floor(projCount)so fractional projectile counts from upgrades floor before scaling.