Arc Mortar Lifetime
What it is
Arc-mortar shells travel along a parabolic arc from spawn to a predicted landing point, then detonate on landing. The fire path computes each shell’s projectile lifetime directly from the weapon’s arc time, so the lifetime field on the weapon spec is unused for any weapon that flies on an arc.
The override
When a shell spawns, its lifetime is set to:
| Field | Value |
|---|---|
lifetime (seconds) | arcTime + 0.2 |
The flight itself completes when arc progress reaches 1.0 (advanced by dt / arcTime each frame); the extra 0.2 s is a buffer past arc completion that catches shells whose landing trigger is missed for any reason.
Why no lifetime field
Because the lifetime is derived from arc time at spawn, an arc weapon does not need (and does not consume) a separate lifetime setting. Designers author the arc time only; the projectile despawns at arc-end plus the buffer.
| Fallback | Value (seconds) |
|---|---|
Default arcTime when weapon omits it | 1.0 |
| Default arc progress divisor when bullet field is missing | 1.0 |
Which weapons use it
Three weapons dispatch through the arc-mortar fire path. Both the standard arc-mortar behavior and the plasma-mortar legendary behavior route through the same path, so the lifetime override applies identically.
| Weapon | Rarity | Behavior | Arc time (seconds) |
|---|---|---|---|
| Mortar | uncommon | arc_mortar | 1.4 |
| Cannon | rare | arc_mortar | 0.8 |
| Plasma Mortar | legendary | plasma_mortar | 1.0 |
| Weapon | Effective shell lifetime (seconds) |
|---|---|
| Mortar | 1.6 |
| Cannon | 1.0 |
| Plasma Mortar | 1.2 |
EXTRACT-CANDIDATEs
- EXTRACT-CANDIDATE: arc flight model (parabolic interpolation,
_arcProgress,_arcHeightMult, landing detonation via aoe_finish) — distinct concept from the lifetime override; deserves its own page. - EXTRACT-CANDIDATE: target-lead prediction for arc weapons (centerX/centerY using
enemy.v * arcTime) — shared by mortar and cannon, worth its own concept page. - EXTRACT-CANDIDATE: phantom-explosion suppression (landing-shell exemption when
hits.size === 0) — applies to arc_mortar and artillery_rain; belongs on a death-handler / aoe_finish page. - EXTRACT-CANDIDATE: perpendicular layout vs random scatter (
perpendicularLayout,perpSpacing,scatterRadius) — shell-placement strategies shared across explosive weapons. - EXTRACT-CANDIDATE: per-salvo double-shot proc (
doubleShotChancerolled once per fire event, entire salvo doubles) — also used outside arc weapons.