feat(web): derive and register the watchpost artwork

This commit is contained in:
Bastian Wagner
2026-08-23 12:02:20 +02:00
parent b3ca4687dc
commit 06450a0d36
24 changed files with 199 additions and 1 deletions

View File

@@ -1,4 +1,9 @@
import { monsterCutoutPath, monsterIconPath, runtimeMonsterArtworkPath } from './monster-artwork';
import {
combatMonsterSpriteScale,
monsterCutoutPath,
monsterIconPath,
runtimeMonsterArtworkPath,
} from './monster-artwork';
describe('runtimeMonsterArtworkPath', () => {
it('returns the optimized JPEG derivative for a known monster artwork path', () => {
@@ -42,3 +47,32 @@ describe('monsterIconPath', () => {
expect(monsterIconPath('dawnwolf')).toBeUndefined();
});
});
describe('watchpost monsters', () => {
const keys = ['raider-scout', 'raider-veteran', 'burned-hound', 'raider-captain'];
it('has a cutout for every watchpost monster', () => {
for (const key of keys) {
expect(monsterCutoutPath(key)).toBeDefined();
}
});
it('has an icon for every watchpost monster', () => {
for (const key of keys) {
expect(monsterIconPath(key)).toBeDefined();
}
});
it('has a runtime derivative for every watchpost artwork', () => {
for (const key of keys) {
expect(runtimeMonsterArtworkPath(`/images/monsters/${key}.png`)).toBeDefined();
}
});
it('scales the captain larger than the hound', () => {
// A hulking elite and a low-slung dog must not share a silhouette height.
expect(combatMonsterSpriteScale('raider-captain')).toBeGreaterThan(
combatMonsterSpriteScale('burned-hound'),
);
});
});