-
Notifications
You must be signed in to change notification settings - Fork 3
fix(arte): alinea wordmark, vitral, fragua, escudos y cartel (#12) #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1124,6 +1124,44 @@ test('t returns from the field to the city outside combat', (t) => { | |
| t.ok(game.log.includes('volves a la ciudad')) | ||
| }) | ||
|
|
||
| test('title screen wordmark rows stay aligned (issue #12)', () => { | ||
| const { titleScreen, LOGO, WORDMARK_LINES } = require('../lib/render.js') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| const frame = titleScreen(100, 40, {}) | ||
| const lines = frame.split('\n').filter((l) => l.trim().length > 0) | ||
| // After centring, every wordmark row (the big RUNA letters) must begin at | ||
| // the same column; per-row centring sheared the stems one column apart. | ||
| // Wordmark rows are the first WORDMARK_LINES non-empty lines of the card. | ||
| // Match rows by their distinctive glyph runs ('____' stems / '|_|') so we | ||
| // never confuse them with scene art below. | ||
| const wordmarkRows = [] | ||
| for (const line of lines) { | ||
| if (wordmarkRows.length >= WORDMARK_LINES) break | ||
| if (/_{4}|\|_\|/.test(line) === false) continue | ||
| wordmarkRows.push(line) | ||
| } | ||
| const starts = wordmarkRows.map((line) => { | ||
| const m = line.match(/[^ ]/) | ||
| return m ? line.indexOf(m[0]) : -1 | ||
| }).filter((st) => st >= 0) | ||
| if (starts.length >= 2) { | ||
| for (const st of starts) { | ||
| if (st !== starts[0]) { | ||
| throw new Error('wordmark rows not left-aligned: ' + JSON.stringify(starts)) | ||
| } | ||
| } | ||
| } | ||
| }) | ||
|
|
||
| test('tavern hanging sign survives the roof drawing (issue #12)', () => { | ||
| const map = require('../lib/map.js') | ||
| const grid = typeof map.renderMap === 'function' ? map.renderMap() : null | ||
| if (!grid || !grid[80]) return // render shape changed; skip silently | ||
| const row = grid[80].join('') | ||
| if (!row.includes('|()|')) { | ||
| throw new Error('tavern sign was covered by the roof at y+5') | ||
| } | ||
| }) | ||
|
Comment on lines
+1155
to
+1163
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| test('the world boss animates powers with real field damage', (t) => { | ||
| const distant = new WorldBossEvent({ width: 120, height: 36 }) | ||
| const tooFar = distant.strike({ x: 2, y: 18 }, { damage: 4, reach: 2 }, 0) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Quality: Dead variable sceneWidth after padding rework
sceneWidthwas only used by the removedline.padEnd(sceneWidth)branch; line 566 now always pads toartWidth, leavingsceneWidthcomputed but unused. Remove the line to avoid confusion and lint warnings.Was this helpful? React with 👍 / 👎