Per-target contact cooldown
What it is
Per-target contact cooldown is the re-hit gate used by orbiting and tethered melee-style weapons: a single weapon bullet can hit the same enemy at most once every N seconds, where N is configured per weapon. It allows blades that physically stay in contact with an enemy across many frames (orbiting swords, rotating electricity tethers) to deal a clean rhythmic tick instead of a per-frame DPS blast, while still letting them re-strike the same target on each subsequent pass.
How it works
Each affected bullet carries its own per-enemy cooldown map. On every collision check, the weapon looks up the candidate enemy in that map and skips it if it was hit too recently.
| Step | Behavior |
|---|---|
| 1 | Bullet spawns with a per-enemy cooldown map and a configured cooldown duration |
| 2 | Each frame, the bullet checks every nearby enemy for a hitbox overlap |
| 3 | If the enemy appears in the cooldown map and its remaining cooldown has not elapsed, the hit is skipped (no damage, no VFX) |
| 4 | If the enemy is not on cooldown and the hitbox overlap holds, the weapon damages the enemy and writes a new cooldown entry for that enemy |
| 5 | Cooldown either ticks down each frame (tether-style) or is compared against the bullet’s running age (orbit-style); once the gap exceeds the cooldown duration the enemy becomes hittable again |
| 6 | When the bullet is recycled back to the pool, its cooldown map is cleared so the next bullet using that slot starts fresh |
The cooldown is per bullet, per enemy — two different blades from the same weapon do not share cooldown maps, so a target sitting between two orbiting blades takes one hit from each per pass.
Default cooldown
If a weapon’s spec omits the field but its behavior reads it, the engine substitutes a default value rather than allowing infinite-rate damage.
| Quantity | Value (seconds) |
|---|---|
| Default cooldown when spec omits the field | 0.3 |
Which weapons use it
Four weapons consume the spec field directly; their cooldown is wired through the bullet’s per-enemy contact map at spawn.
| Weapon | Rarity | Behavior | Cooldown (seconds) |
|---|---|---|---|
| Sweep | epic | orbit | 0.18 |
| Fire Ring | rare | orbit | 0.18 |
| Line | epic | tesla_line | 0.08 |
| Magnetar | epic | tesla_line | 0.08 |
One additional weapon defines a cooldown in its spec but its behavior does not consume the value — its arc dies on first contact instead of re-hitting.
| Weapon | Rarity | Behavior | Spec value | Effective re-hit gate |
|---|---|---|---|---|
| Barrier | uncommon | shield_arc | 0 | Not used — bullet despawns on first hit |
The Star Halo legendary uses a different re-hit gate (one full revolution between hits, derived from spin duration ÷ spins) rather than the per-weapon cooldown field. See weapons for the legendary’s spin model.
EXTRACT-CANDIDATEs
- EXTRACT-CANDIDATE: orbit blade swept-arc hitbox model (prev-angle vs current-angle sweep delta, radial + angular-half-width check, tip-extension buffer) — a distinct concept from the cooldown, shared by Sweep and Fire Ring.
- EXTRACT-CANDIDATE: tesla-line segment hitbox model (point-to-line-segment distance with line-thickness fudge, midpoint spatial-grid query) — shared by Line and Magnetar.
- EXTRACT-CANDIDATE: bullet-pool recycle contract (which fields the pool nulls on release vs which are reset at spawn) — load-bearing for any per-bullet state, was the source of a Sentry crash when the orbit blade init guarded on the wrong field.
- EXTRACT-CANDIDATE: spawn-immunity window (
_spawnT > 0.15skip used by every contact-cooldown behavior) — a global rule that newly-spawned enemies are uncollidable for ~150 ms; deserves its own page. - EXTRACT-CANDIDATE: ship contact cooldown (the enemy-side cooldown on touching the player, separate from this bullet-side cooldown) — same name, different system; worth disambiguating on a combat page.
- EXTRACT-CANDIDATE: Star Halo revolution-based cooldown (cooldown = spinDuration ÷ spins, applied per star × enemy) — a sibling re-hit gate used only by the legendary orbit-ring behavior.