empower_weapon action

Effect action that grants a temporary damage multiplier to a weapon for a fixed number of shots. Distinct from Modifiers (run-long permanent stat changes) — this is a transient per-weapon buff that decays on use, not on a timer.

What it does

empower_weapon writes two ad-hoc fields onto a target weapon:

  • _empowerMult — multiplicative damage factor applied to that weapon’s next shot.
  • _empowerShots — remaining shots before the buff clears.

Each time the empowered weapon fires, _empowerShots decrements by one. When it reaches zero, _empowerMult is reset to 0 and the buff is gone. The fire pipeline reads _empowerMult after base damage, level multipliers, hDmg, early-game adjustments, and flat bonuses — so empowerment is applied as a final multiplier on top of all other damage math.

Params

ParamDefaultMeaning
target'random''random' picks a uniformly random weapon slot; 'slot_0' targets the first weapon; 'all' empowers every equipped weapon.
damageMult2Multiplicative damage factor. Resolved via inst.values, so '$mult' substitution from artifact tier values is supported.
shotsRemaining1How many shots the buff lasts before clearing. Per-weapon (when target: 'all', each weapon gets its own counter).

Stacking and removal

The implementation is overwrite, not additive. Calling empower_weapon on a weapon that already has an active empower replaces both _empowerMult and _empowerShots with the new values — it does not multiply them together or extend the shot count. There is no source-tag tracking; the buff is a flat mutable field on the weapon, so the system has no way to attribute the current empower to a specific effect instance.

Expiry is deterministic: the buff clears the instant _empowerShots hits zero inside the weapon’s fire path. There is no time-based expiry — an empowered weapon that never fires keeps the buff indefinitely.

Who uses it

Currently only Rail Capacitor (overcharge_round, the “Every few seconds, a random weapon fires a supercharged shot” artifact). It schedules a repeating timer trigger and dispatches empower_weapon with target: 'random', damageMult: $mult (5x → 12x across tiers), shotsRemaining: 1.

Contrast with Modifiers

Aspectempower_weaponModifier system
LifetimeN shots fired, then auto-clearRun-long until end of run
StackingOverwrites prior empower on same weaponStacks additively / multiplicatively per source-tag
Source trackingNone — flat field on weaponTagged by source for selective removal
Stat surfaceDamage onlyAny ship/weapon stat
CleanupAutomatic on shot-count exhaustExplicit via remove_modifiers action

Use empower_weapon for one-shot or few-shot damage spikes. Use Modifiers for anything that should last the run or needs to be removable by source.

Code

  • Action handler: src/starship-survivors/engine/effects/actions.tsactEmpowerWeapon (around line 421).
  • Registry entry: same file, ACTION_MAP.empower_weapon.
  • Consumption site: src/starship-survivors/engine/weapons/weapons.ts (around line 578), inside the fire pipeline’s damage resolution.
  • Sole consumer: src/starship-survivors/data/artifacts/overcharge-round.ts.