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:

FieldValue
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.

FallbackValue (seconds)
Default arcTime when weapon omits it1.0
Default arc progress divisor when bullet field is missing1.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.

WeaponRarityBehaviorArc time (seconds)
Mortaruncommonarc_mortar1.4
Cannonrarearc_mortar0.8
Plasma Mortarlegendaryplasma_mortar1.0
WeaponEffective shell lifetime (seconds)
Mortar1.6
Cannon1.0
Plasma Mortar1.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 (doubleShotChance rolled once per fire event, entire salvo doubles) — also used outside arc weapons.