feedback1f WV: engine and docs tests follow the knocked-out tile rule
- engine-requests: a unit knocked out on its landing tile comes back there; a retreated one still comes back home. - robustness: the busy-tile spawnToken check uses the tile the guard stands on after its redeploy (where it was knocked out). - docs-consistency: SIM.md's b.snap `down` entry carries row, col; the DESIGN check accepts the shape before and after the integrator's §8.2 update.
This commit is contained in:
1 parent
8de9002d1a
commit
54e131645a
3 files changed
+13
-7
No files matched your search
@@ -369,7 +369,7 @@ test('skill end: onEnd runs with the skill mods and range still applied, then th
|
||||
// ---------------------------------------------------------------------------------------------------------------
|
||||
// 9) redeploy { free, tile, keepSp }
|
||||
|
||||
test('redeploy: { tile } lands on another tile (home unchanged, later redeploys at home); { keepSp } restores SP before deploy fires', () => {
|
||||
test('redeploy: { tile } lands on another tile (home unchanged; knocked out there, it comes back there); { keepSp } restores SP before deploy fires', () => {
|
||||
let atDeploy = null;
|
||||
const h = makeBattle({
|
||||
defs: { chess: { t_gd: guard({ skill: { spCost: 10, initSp: 2 } }), t_x: guard({ id: 't_x' }) } },
|
||||
@@ -391,7 +391,8 @@ test('redeploy: { tile } lands on another tile (home unchanged, later redeploys
|
||||
assert.equal(h.b.unitAt(12, 8), u);
|
||||
approx(atDeploy, sp, 1e-9, 'SP restored before the deploy hook');
|
||||
approx(u.hp, u.s.maxHp);
|
||||
// plain redeploy: initSp; knocked out later → the auto-redeploy goes home
|
||||
// plain redeploy: initSp; knocked out there later → the auto-redeploy comes back on that tile (PRTS 卫戍协议/帮助
|
||||
// "…原地留下一个“倒地干员”…满足再部署条件时…自动部署至该位置"; player report F5 after 0.1.0); a retreat → home
|
||||
h.b.retreat(u);
|
||||
h.b.redeploy(u, { tile: [12, 8] });
|
||||
approx(u.skill.sp, 2, 1e-9, 'without keepSp: initial SP');
|
||||
@@ -399,7 +400,10 @@ test('redeploy: { tile } lands on another tile (home unchanged, later redeploys
|
||||
p.dp = 50;
|
||||
h.b.dealDamage(null, u, { amount: 1e9, type: 'true' });
|
||||
assert.ok(h.runUntil(() => u.alive, u.base.respawnTime + 1));
|
||||
assert.deepEqual([u.tileR, u.tileC], [10, 4], 'auto-redeploy on the home tile');
|
||||
assert.deepEqual([u.tileR, u.tileC], [12, 8], 'auto-redeploy on the tile it lay on');
|
||||
h.b.retreat(u);
|
||||
assert.equal(h.b.redeploy(u), true);
|
||||
assert.deepEqual([u.tileR, u.tileC], [10, 4], 'a retreated unit comes back on its home tile');
|
||||
// paid redeploy on a tile
|
||||
h.b.retreat(u);
|
||||
const dp = p.dp;
|
||||
|
||||
Reference in new issue
Block a user