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
| Param | Default | Meaning |
|---|---|---|
target | 'random' | 'random' picks a uniformly random weapon slot; 'slot_0' targets the first weapon; 'all' empowers every equipped weapon. |
damageMult | 2 | Multiplicative damage factor. Resolved via inst.values, so '$mult' substitution from artifact tier values is supported. |
shotsRemaining | 1 | How 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
| Aspect | empower_weapon | Modifier system |
|---|---|---|
| Lifetime | N shots fired, then auto-clear | Run-long until end of run |
| Stacking | Overwrites prior empower on same weapon | Stacks additively / multiplicatively per source-tag |
| Source tracking | None — flat field on weapon | Tagged by source for selective removal |
| Stat surface | Damage only | Any ship/weapon stat |
| Cleanup | Automatic on shot-count exhaust | Explicit 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.ts→actEmpowerWeapon(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.