feedback4: a skill restarted inside its own end owns its events — Skill.end emits no trailing skillEnd / client 'skill off' when onEnd re-activated it (耀骑士临光 S2 retreats at its duration end and 不屈 redeploys her inside that call: the trailing skillEnd cleared 骑士戒律 for the whole second cast, a PR #109 regression); 伊内丝's 影哨 death hooks run before 不屈's redeploy (priority 20 over 10), so the next deployment's S3 recalls the sentry she left (0.1.4 release review); test/sim/feedback4-restart-in-end.test.js, each case fails without its fix; golden unchanged

This commit is contained in:
sganggs committed 2026-10-06 00:12:26 +08:00
1 parent cea1ad1295
commit 47789aba8d
3 files changed
+62 -5

No files matched your search

+4 -2
View File
@@ -575,11 +575,12 @@ const kits = {
} },
{ install(battle, unit) { // 影哨: reveal + −30 % move speed in range; a sentry keeps it after she leaves (max 1)
const mods = { moveMul: Math.max(0, 1 + num(t1.move_speed, -0.3)) };
// priority 20: before 不屈's redeploy (death priority 10), whose deployment starts S3 and its recall
battle.on('death', (c) => {
if (c.unit !== unit || c.reason === 'expired') return;
unit.mem.sentry = new Set(unit.baseRangeKeys || unit.rangeKeys || []);
battle.fx('sentry', { x: unit.x, y: unit.y, id: unit.id });
}, { owner: unit });
}, { owner: unit, priority: 20 });
battle.every(AURA, () => {
const set = new Set();
if (unit.alive && unit.deployed) for (const k of unit.rangeKeys || []) set.add(k);
@@ -608,7 +609,8 @@ const kits = {
}, { owner: unit });
}, { owner: unit });
// where the talent's 影哨 stays (every leave but an expiry), for the recall of the next deployment
battle.on('death', (c) => { if (c.unit === unit && c.reason !== 'expired') unit.mem.inesSentryAt = { x: unit.x, y: unit.y }; }, { owner: unit, priority: 5 });
// (priority 20: recorded before 不屈's redeploy at death priority 10 starts the next deployment's S3 and its recall)
battle.on('death', (c) => { if (c.unit === unit && c.reason !== 'expired') unit.mem.inesSentryAt = { x: unit.x, y: unit.y }; }, { owner: unit, priority: 20 });
// 技能期间每对一个敌人造成伤害就获得1点部署费用
battle.on('damaged', (c) => {
if (c.source !== unit || c.target.side !== 'enemy' || !(c.amount > 0) || c.type === 'element' || !unit.skill?.active || !(unit.skill.timeLeft > 0)) return;