Hit tiles: positions round half to even (PRTS 作战机制); enemies held just inside the field edge

This commit is contained in:
Cloudnyco committed 2026-10-11 21:33:44 +08:00
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');