From f14b3a062f12773919e2526d59f134f72983e598 Mon Sep 17 00:00:00 2001 From: sganggs Date: Thu, 8 Oct 2026 19:56:44 +0800 Subject: [PATCH] =?UTF-8?q?feedback7=20R22-FIELDS:=20=E8=80=80=E9=AA=91?= =?UTF-8?q?=E5=A3=AB=E4=B8=B4=E5=85=89's=20=E5=8D=A1=E8=A5=BF=E7=B1=B3?= =?UTF-8?q?=E5=B0=94=20redeploy=20reduction=20(garrison=20144)=20has=20no?= =?UTF-8?q?=205=20%=20floor=20=E2=80=94=20the=20multiplier=20clamps=20at?= =?UTF-8?q?=200=20like=20every=20other=20redeploy=20multiplier,=20so=20a?= =?UTF-8?q?=20knock-out=20timer=20can=20reach=200=20s=20(GitHub=20#370);?= =?UTF-8?q?=20golden:=20unchanged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub #370 (FrogThai): 「耀骑士临光特性赋予身前干员减再部署有上限,最多减至5秒」. Cause: content/garrisons/battle.js applyReader, act1autochess_gar_eff_respawnTimeByBond, wrote redeployMul = max(0.05, 1 + respawn_time × steps), so the timer stopped at 5 % of the base time — from 192 卡西米尔 layers for 144_a (raw 0.04) and from 96 for 144_b. Measured on a 100 s base (notes repro-370.mjs): 144_a 192 / 300 layers → 5.00 s / 5.00 s, 144_b 96 / 192 / 300 → 5.00 s each. Official: data/garrisons.json garrison_144_a bb { divide_num 3, respawn_time −0.015 } 「每叠加3层,本干员再部署时间-1.5%」, 144_b −0.03 「-3%」 — no minimum key; PRTS 耀骑士临光 has no 卫戍 note on a minimum. Now max(0, …) as items/battle.js, bands, the 协防 bond and svrash; deploy.js already clamps the timer at 0: 144_a 192 / 300 layers → 4.00 s / 0 s, 144_b 96 / 192 / 300 → 4.00 s / 0 s / 0 s. A 0 s timer brings the operator back on the next tick, no error (notes probe-370-redeploy.mjs). The ASPD part (garrison 159 / 160) is untouched. Patch from the Grok triage (scratch-i1b/370.patch), the test extended with 96 layers and the 0 s return. Tests: test/content/garrisons_battle.test.js 26/26 — the new #370 test (144_a / 144_b at 9, 96, 192, 300 layers: the multiplier, the knock-out timer, the 0 s return) fails on the parent. --- server/sim/content/garrisons/battle.js | 5 ++++- test/content/garrisons_battle.test.js | 27 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/server/sim/content/garrisons/battle.js b/server/sim/content/garrisons/battle.js index 122205b8..214f7029 100644 --- a/server/sim/content/garrisons/battle.js +++ b/server/sim/content/garrisons/battle.js @@ -400,7 +400,10 @@ function applyReader(battle, it) { else battle.removeBuff(u, key); break; case 'act1autochess_gar_eff_respawnTimeByBond': - if (k > 0) S.passiveBuff(battle, u, key, { redeployMul: Math.max(0.05, 1 + S.num(it.bb.respawn_time, 0) * k) }); + // 耀骑士临光's 144: −1.5 % / −3 % per 3 卡西米尔 layers with no minimum in the blackboard (divide_num, respawn_time + // only) — clamped at 0 like every other redeploy multiplier, so a knock-out timer can reach 0 s (GitHub #370; + // until 0.2.1 a 0.05 floor kept it at 5 % of the base time from 192 layers, 96 for the elite) + if (k > 0) S.passiveBuff(battle, u, key, { redeployMul: Math.max(0, 1 + S.num(it.bb.respawn_time, 0) * k) }); else battle.removeBuff(u, key); break; case 'act2autochess_gar_eff_attrByBond_add_onstart': { diff --git a/test/content/garrisons_battle.test.js b/test/content/garrisons_battle.test.js index a4f5f83c..fbb8ec49 100644 --- a/test/content/garrisons_battle.test.js +++ b/test/content/garrisons_battle.test.js @@ -465,6 +465,33 @@ test('ADD_BOND 耀骑士临光 145 / 160 (real chess): self + front get 144 (red } }); +test('respawnTimeByBond 144 has no 5% floor (#370): redeployMul is max(0, 1 + respawn_time * steps)', () => { + for (const [gid, rt] of [['garrison_144_a', -0.015], ['garrison_144_b', -0.03]]) { + assert.equal(GR(gid).bb.respawn_time, rt); + assert.deepEqual(Object.keys(GR(gid).bb).sort(), ['divide_num', 'respawn_time']); + // 96 / 192 layers: the old 0.05 floor bound the elite / the normal form (raw 0.04); 300: below zero + for (const layers of [9, 96, 192, 300]) { + const k = Math.floor(layers / 3); + const want = Math.max(0, 1 + rt * k); + const h = battle({ + units: [{ id: 'op', g: [gid], row: 10, col: 4, o: { stats: { respawnTime: 100 } } }], + bonds: { kazimierzShip: B(layers) }, + }); + const u = h.unit('op'); + approx(u.findBuff(`gar:${gid}`).mods.redeployMul, want, `${gid} @ ${layers}`); + h.b.dealDamage(null, u, { amount: 1e9, type: 'true' }); + assert.equal(u.alive, false); + approx(u.respawnAt - u.deathAt, 100 * want, `${gid} timer @ ${layers}`); + if (want === 0) { + h.step(2); + assert.ok(u.alive && u.deployed, `${gid} @ ${layers}: a 0 s timer brings it straight back`); + assert.equal(h.b.errorCount, 0); + } + } + cover(gid); + } +}); + // --------------------------------------------------------------------------------------------------------------------- // 魔王