Files
ark-stronghold-protocol/public/js/render/fx.js
T
sganggs b87848a443 feedback5 R19G: 蕾缪安's S3 no longer ends by itself when nothing is in her range — it keeps its bullets and locks and locks the next enemy that comes; the bombardment follows only when the bullets are spent (community report); golden: 3 scenarios move
Seen (community report 「蕾缪安3技能范围里没人好像会自动结束」, relayed by the owner): with S3 locking, the locked enemy
killed or walking out of her range and nobody else in it, the skill ended at the next lock tick — the shells fell at
once and the bullets left were thrown away (repro on 0255afd: 3 of 5 bullets lost; a walker leaving her range, 1 lost).
Cause: chess_char_6_01-lemuen.js:169 `if (!e) { if (m.lemLocks.length) skill.end('ammo'); return; }`, there since the
initial import with no decision behind it.
Official: 「攻击装有5发弹药,打完后结束(可随时停止技能)」 — an ammo skill ends when its bullets are spent or the player
stops it; PRTS 卫戍协议/帮助 技能操作 「通常不会自动关闭技能」 (only 玛露希尔's 召唤使魔 is closed automatically); the client
(charpack char_4193_lemuen, buff_template_data lemuen_s_3): the S3 lock is an attack that needs a target and the skill
buff switches to the bombardment mode on ON_BUFF_FINISH only.
Now: with nothing to lock the skill waits (bullets and locks kept, the marks following their enemies or staying where
they left), its lock ready, so the next enemy in range (or 通缉) is locked on the next tick; it ends when the bullets are
spent and the shells fall on every mark in lock order as before. The S3 'lock' fx carry `hold`: render/fx/locks.js keeps
those reticles while the shooter's skill bit (UF.SKILL) is on and starts their LOCK_T at the skill's end (they faded 5 s
into a wait otherwise); S2's aim lock keeps its timeout.

Golden — traced on both trees (SkillRuntime start / end, the round's fields, the carried SP); in each the first
divergence is an S3 the parent ended with bullets left and nothing in her range:
- roster-018: the elite 蕾缪安's S3 of 7.63 s ended at 9.63 s with 2 of 6 bullets left; now the 6th goes at 12.00 s
  (first differing snapshot window 0–10 s).
- boss-boss_3-pair: her S3 of 27.8 s ended at 30.3 s with 4 of 9 left; now all 9 by 34.43 s (window 30–40 s); the boss
  now falls at 199.53 s instead of the 200 s cap.
- coop2-NORMAL-14-standins: ai_0's 蕾缪安 in round 11 ended S3 at 17.2 s (6 of 8 left) and 77.97 s (7 of 9); now she
  spends them, enters the 联防 with 25.96 SP instead of 10.27, casts S3 there and kills one more of h_0's leaked enemies:
  h_0 loses 1 LP less (rounds 11–12 LP 18 → 19, 8 → 9; lpLost 30 → 29; ai_0 kills +1).
bonds, standins, diy unchanged.

Tests: test/sim/feedback5-lemuen-s3-wait.test.js (3; the killed target and the walker who leaves fail on the parent),
test/render/fxproj.test.js +1 (a held lock waits while the skill bit is on; fails on the parent renderer).
Docs: CHANGELOG 0.2.0 规则(按官方), docs/history/0.2.0.md §25.22.8 (also notes, unchanged: S2 spends a bullet on every
normal attack where PRTS says only the 通缉 snipe does — left to the owner).
2026-10-07 12:19:55 +08:00

47 lines
4.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// render/fx.js — battle visual effects with pooling and hard caps (DESIGN §9).
//
// projectiles b.ev 'atk' by projKind (render/style.js PROJ): sniper tracers with a muzzle flash; arts / heal / enemy
// orbs with a particle trail; bombs and lobs as shells on an arc with a ground shadow, a smoke trail and
// an explosion; drone darts; 回环射手 boomerangs that spin out to the target and back to the thrower's
// current position, gone when caught. Flight times from the sim's projectile speeds (/sim/constants.js
// PROJECTILE_SPEEDS — the visual lands with the sim's hit), homing on the interpolated target; a burst
// per kind on arrival; chain lightning (chain / chainHeal) and beams as short-lived jagged lines
// hits glow + sparks by damage type; a melee blow adds a slash crescent swept along the blow (attacker →
// victim) in the hit colour; AoE ground rings for splash attackers
// numbers damage numbers (phys orange-white, arts purple, true white, heal green, elements orange) as
// pooled BitmapText (per font); rapid same-style hits on a target merge into a running total; big hits
// (≥ 18 % max HP) pop larger; ≤ 4 per target; laid out in screen space against every live number (lanes
// beside the head, stacked upwards) so numbers of neighbouring units never cover or touch each other;
// crowded spots get shorter lives (see number())
// skill activation burst: flash, a light pillar with a white-hot core, a shockwave + hex ring on the ground,
// rising motes; while active a slowly turning hex with a soft glow under the unit (+ a few motes)
// blasts explosions (fireball, flash, shockwave + coloured ground ring, sparks, smoke; heavy ones add debris
// and a scorch mark) for blast fx kinds and shell impacts
// bombard 蕾缪安 S3: fx 'lock' keeps a reticle on the locked enemy until the 'bombard' of the shell fired at it
// (or LOCK_T game s after the shooter's last lock / shell — a held S3 lock, `hold`, LOCK_T after her skill
// ends: it waits with its bullets while nothing is in range; the S2 aim lock until the snipe's 'crit'); 'bombardShell' = a shell fired now that
// lands on the spot after `t` game s — a launch streak leaves the shooter upwards and the shell drops out
// of the sky onto the spot (a long flight climbs out of her first), a closing warning ring marks the spot
// meanwhile; 'bombard' is the big explosion at the impact
// deploy drop-in ring + pillar; death dissolve embers; crate splinters; element bursts; leak vignette;
// bond-layer glyph pops and bounty coins (screen space, near the top of the field)
// Sizes are in tiles × the camera's px per tile at the spot, so effects read alike at every resolution and zoom (3D
// board or 2D fallback: both project through the same camera). An fx anchored on a unit (extra.id) follows that
// unit's rendered position when the event happens on it, else it happens at the event's (x, y) (_where).
// Particles live in two ParticleContainers (additive / normal) sharing the FX atlas base texture, so the whole
// particle system costs two draw calls. Every pool has a cap; when full, the oldest entry is recycled. Particle,
// projectile and lock records are pooled (the per-frame emitters allocate nothing). Cosmetic extras — trails, muzzle
// flashes, afterimages, debris, scorch marks, aura motes — are skipped at quality 'low' and under heavy load
// (adaptive load level ≥ 2), and trails yield to bursts near the particle cap (SOFT_CAP).
//
// The bodies live in public/js/render/fx/*.js. Every name this file exported before the split is
// re-exported below, so existing imports keep working. speeds.js is imported first: its dynamic
// import('/sim/constants.js') is the module's one init side effect, as it was at the top of this file.
export { setSimProjectileSpeeds, projSpeed } from './fx/speeds.js';
export { SHOT_HEIGHT, bodyZ } from './fx/camera.js';
export { ensureDamageFonts } from './fx/fonts.js';
export { FX_KINDS, fxSpec, tilesAround, wallTiles } from './fx/kinds.js';
export { FxSystem } from './fx/system.js';