feedback7 R22-FIELDS: 耀骑士临光's 卡西米尔 redeploy reduction (garrison 144) has no 5 % floor — the multiplier clamps at 0 like every other redeploy multiplier, so a knock-out timer can reach 0 s (GitHub #370); golden: unchanged
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.
This commit is contained in:
1 parent
f2aec39e93
commit
f14b3a062f
2 files changed
+31
-1
No files matched your search
@@ -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': {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
// 魔王
|
||||
|
||||
|
||||
Reference in new issue
Block a user