feedback5 CB3: 银灰's normal attack no longer plays his S3 swing (and S2 / S3 impact); 雷蛇, 初雪 and 圣约送葬人 lose a skill mode's impact the same way (community report of 2026-10-06, item 54)
Official (excel/audio_data.json, local client charpack char_172_svrash): his normal attack is the Default mode's Combat — ON_ABILITY_HIT.char_172_svrash.combat p_imp_spear_n, no swing bank; .attack.2 (p_atk_silver_n swing, p_imp_sword_n impact) is his S3 mode, .attack.1 his S2 mode. Cause: tools/assets/audio.mjs pickUnitSfx took the numbered variants because their files end in _n (its skill-mode test is by file name). Now an operator whose default mode is the unsuffixed ability (a plain attack / combat bank of any event) never takes a numbered variant; operators that number their default mode (attack.0 …) keep the earlier order. Over the 209 operators of the manifest it changes 4: 银灰 (charpack modes Default / S2 / S3), 雷蛇 (attack.1 = S2, lightning impact), 初雪 (attack.1 = her S1-2 mode) and 圣约送葬人 (attack.4 = S3_End). data/assets.json regenerated offline (fetch-assets --offline --add-only --allow-shrink; JSON compare: exactly the 4 operators' entries, hash and stats): 雷蛇 / 初雪 / 圣约送葬人 drop their wrong `hit`; 银灰's entry goes too, because his official impact p_imp_spear_n.mp3 was never downloaded on this machine — one online `node tools/fetch-assets.mjs --add-only` adds it (needs the owner's OK for that download). Golden: unchanged (the manifest is client-side). Tests: test/feedback5-operator-sfx.test.js (3; 2 fail on the parent). Docs: docs/ASSETS.md.
This commit is contained in:
1 parent
3d472e2304
commit
fe2a0cbc29
4 files changed
+64
-2
No files matched your search
@@ -167,6 +167,21 @@ export function pickUnitSfx(banks, opts = {}) {
|
||||
};
|
||||
const exact = (event) => ['attack', 'combat'].map((ab) => banks.get(`${event}.${ab}`)).find((p) => p?.length && ok(p)) ?? null;
|
||||
const own = (p) => (p?.length && ok(p) ? p : null);
|
||||
// operators whose default mode is the unsuffixed ability (a plain attack / combat bank of any event): every numbered
|
||||
// variant (attack.1, attack.2 …) is then a skill mode's ability, whatever its file name — 银灰's attack.2 swing
|
||||
// p_atk_silver_n is his S3 mode's (charpack modes Default / S2 / S3), his normal attack is the Default mode's Combat (impact
|
||||
// ON_ABILITY_HIT.combat p_imp_spear_n, no swing bank): community report of 2026-10-06 (item 54) 「银灰的普通攻击的音效错误
|
||||
// 的使用了3技能期间的攻击音效」. Only the plain banks then, or the operator's own projectile banks; newer operators number
|
||||
// their default mode too (attack.0 …) and keep the rule below
|
||||
if (opts.operator && ['ON_ABILITY_START', 'ON_ABILITY_ON', 'ON_ABILITY_HIT'].some((e) => exact(e))) {
|
||||
const swing = exact('ON_ABILITY_START') ?? exact('ON_ABILITY_ON') ?? own(proj.born);
|
||||
const impact = exact('ON_ABILITY_HIT') ?? own(proj.hit);
|
||||
if (swing) out.attack = swing;
|
||||
if (impact) out.hit = impact;
|
||||
if (banks.get('ON_UNIT_DEAD')?.length) out.die = banks.get('ON_UNIT_DEAD');
|
||||
if (banks.get('ON_UNIT_BORN')?.length) out.born = banks.get('ON_UNIT_BORN');
|
||||
return out;
|
||||
}
|
||||
// operators: the plain ability of either event before any numbered variant
|
||||
const plain = opts.operator ? exact('ON_ABILITY_START') ?? exact('ON_ABILITY_ON') : null;
|
||||
const attack = plain
|
||||
|
||||
Reference in new issue
Block a user