Hit tiles: positions round half to even (PRTS 作战机制); enemies held just inside the field edge
This commit is contained in:
1 parent
bc50cac01f
commit
119a04888a
13 files changed
+113
-24
No files matched your search
@@ -50,7 +50,9 @@ test('#2 麦哲伦 S1: an enemy on a standing drone\'s range (air units too) cas
|
||||
const { h, u, ps } = field(MG, 0, [[DRONE_F, 12, 9]]);
|
||||
assert.equal(u.skill.rule, 'DEFAULT');
|
||||
assert.ok(ps[0].alive && ps[0].rangeKeySet.has(12 * COLS + 10) && outOfHerRange(u, 12, 10), 'the setup');
|
||||
h.spawn('enemy_dummy', { pos: [11, 13] }); // outside every area
|
||||
// on the field (rows 9–12, cols 0–10) and outside every area: (11, 13) would be held at the field's edge, on (11, 10) —
|
||||
// the drone's area
|
||||
h.spawn('enemy_dummy', { pos: [11, 6] });
|
||||
assert.ok(!casts(h, u), 'nobody in her range or a drone\'s: no cast');
|
||||
h.spawn('enemy_dummy', { pos: [12, 10] });
|
||||
assert.ok(h.runUntil(() => u.skill.activations === 1, 1), 'an enemy on the drone\'s range casts S1');
|
||||
|
||||
@@ -1119,8 +1119,9 @@ test('异客: the S3 storm is range x-1 — the 13-tile diamond — around the t
|
||||
};
|
||||
// in the diamond (|Δrow| + |Δcol| ≤ 2 by tile): (2, 0) / (0, −2) / (1.95, 0.4) lay outside the old 1.5 circle
|
||||
for (const off of [[0, 0], [2, 0], [0, -2], [-2, 0], [1.45, 1.45], [1.95, 0.4]]) assert.equal(strikes(off), 8, `(${off}) struck by all 8 strikes`);
|
||||
// outside it: tile (+2, +1), and tile (+3, 0) — (1.55, 1.05) was inside the old circle around the target's position
|
||||
for (const off of [[2, 1], [1.55, 1.05], [0, 2.6]]) assert.equal(strikes(off), 0, `(${off}) never struck`);
|
||||
// outside it: tile (+2, +1), and tile (+3, 0) — (1.55, 1.05) was inside the old circle around the target's position;
|
||||
// three tiles off along the columns, as the field has no row 13 (a probe there is held on row 12, inside the diamond)
|
||||
for (const off of [[2, 1], [1.55, 1.05], [2.6, 0]]) assert.equal(strikes(off), 0, `(${off}) never struck`);
|
||||
});
|
||||
|
||||
test('蕾缪安: 通缉 needs a continuous 8 s stay in a 拉特兰 range (leaving restarts the count)', () => {
|
||||
|
||||
@@ -330,7 +330,7 @@ test('S2 连星 (AUTO, SP_FULL): a triggered piece hits every enemy on its conne
|
||||
assert.deepEqual([sk.spCost, sk.bb['attack@atk_scale'], sk.bb['attack@move_speed'], sk.bb['attack@duration']], elite ? [16, 4.8, -0.4, 6] : [17, 4.2, -0.35, 6], `T${tier}`);
|
||||
const { h, u } = field({ tier, elite, skill: 1, stones: [[10, 6], [10, 7]] });
|
||||
const onLine = h.spawn('enemy_fly', { pos: [10, 9] }); // 3 tiles right of (10,6)…(10,7)+2: on the horizontal line
|
||||
const beyond = h.spawn('enemy_dummy', { pos: [10, 11] }); // 4 tiles past (10,7)
|
||||
const beyond = h.spawn('enemy_dummy', { pos: [10, 2] }); // 4 tiles before (10,6) (the field ends at column 10: no tile 4 past (10,7))
|
||||
const vertical = h.spawn('enemy_dummy', { pos: [12, 7] }); // its battle-start 跟子 (11,7) is 上 of it: the vertical line is on
|
||||
const off = h.spawn('enemy_dummy', { pos: [9, 4] }); // on neither line
|
||||
const trig = h.spawn('enemy_runner', { pos: [10, 7] });
|
||||
|
||||
Reference in new issue
Block a user