feedback1e WP: review round 3 — 烛煌 S3 last bolt keeps the burst bonus, splash fx; prep overlay and wheel show the deployed range
- 烛煌 S3: the burn-burst bonus is gated on the attack's own isSkill (captured when the bolt was fired), not on the live
skill, so the last bullet (it lands after end('ammo')) and bolts in flight when the skill ends early still carry it.
- 烛煌 S3: every landed bolt emits fx 'splash' (r 1.7, burn) at the main target, so the splash shows on screen.
- shared/loadoutRecord.js attackRangeGrid: the range a unit is deployed with — a selected passive range skill
(引星棘刺 S3 3-9) and the 特性's permanent 攻击距离 (信仰搅拌机 SPT-Y +1; not 空弦 ISW-A's 集成战略-only one) —
so the board overlay, the deploy wheel and the card agree with the prep live range. extendedGrid moves there
(re-exported by targeting.js).
- runner.js header: unitStatsEntry carries the ally's live range.
This commit is contained in:
1 parent
5963a40d2d
commit
a657f809f1
11 files changed
+247
-52
No files matched your search
+3
-23
@@ -43,29 +43,9 @@ export function absoluteRangeKeys(grid, r, c, dir, extend = 0) {
|
||||
return keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* A range grid (`[dRow, dCol]`, facing RIGHT) grown by `extend` (rangeExtend, DESIGN §3): every row gains the whole
|
||||
* tiles 1 … ⌊extend⌋ beyond its far (+dCol) end — the relative form of what absoluteRangeKeys builds, deduplicated, junk
|
||||
* entries dropped. Battle._refreshRange keeps it as `unit.liveRangeGrid` (the detail card's live 攻击范围) when an extend
|
||||
* applies (else the grid itself).
|
||||
* @param {Array<[number, number]>|null|undefined} grid
|
||||
* @param {number} [extend]
|
||||
* @returns {Array<[number, number]>}
|
||||
*/
|
||||
export function extendedGrid(grid, extend = 0) {
|
||||
const out = [];
|
||||
const seen = new Set();
|
||||
const add = (dr, dc) => { const k = `${dr},${dc}`; if (!seen.has(k)) { seen.add(k); out.push([dr, dc]); } };
|
||||
if (!Array.isArray(grid)) return out;
|
||||
const cells = grid.filter((p) => Array.isArray(p) && Number.isInteger(p[0]) && Number.isInteger(p[1]));
|
||||
for (const [dr, dc] of cells) add(dr, dc);
|
||||
if (extend > 0 && Number.isFinite(extend)) {
|
||||
const maxByRow = new Map();
|
||||
for (const [dr, dc] of cells) maxByRow.set(dr, Math.max(maxByRow.get(dr) ?? -Infinity, dc));
|
||||
for (const [dr, mx] of maxByRow) for (let k = 1; k <= Math.min(extend, COLS); k++) add(dr, mx + k);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
// extendedGrid(grid, extend): the relative form of absoluteRangeKeys' rangeExtend — one implementation with the card's
|
||||
// record range (shared/loadoutRecord.js attackRangeGrid), re-exported here for the battle (Battle._refreshRange).
|
||||
export { extendedGrid } from '../../shared/loadoutRecord.js';
|
||||
|
||||
/** Tile key of a unit's current position. */
|
||||
export function tileKeyOf(u) {
|
||||
|
||||
Reference in new issue
Block a user