feat(web): derive and register the watchpost artwork
This commit is contained in:
@@ -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'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user