feat(web): derive and register the watchpost artwork
BIN
apps/web/public/images/backgrounds/Aschengrube.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
apps/web/public/images/backgrounds/Wachturm.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
apps/web/public/images/backgrounds/runtime/Aschengrube-960.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
apps/web/public/images/backgrounds/runtime/Wachturm-960.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
apps/web/public/images/combat/icons/burned-hound-128.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
apps/web/public/images/combat/icons/raider-captain-128.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
apps/web/public/images/combat/icons/raider-scout-128.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
apps/web/public/images/combat/icons/raider-veteran-128.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
apps/web/public/images/combat/sprites/burned-hound-760.png
Normal file
|
After Width: | Height: | Size: 369 KiB |
BIN
apps/web/public/images/combat/sprites/raider-captain-620.png
Normal file
|
After Width: | Height: | Size: 473 KiB |
BIN
apps/web/public/images/combat/sprites/raider-scout-620.png
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
apps/web/public/images/combat/sprites/raider-veteran-620.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
apps/web/public/images/monsters/burned-hound.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
apps/web/public/images/monsters/raider-captain.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
apps/web/public/images/monsters/raider-scout.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
apps/web/public/images/monsters/raider-veteran.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
apps/web/public/images/monsters/runtime/burned-hound-560.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
apps/web/public/images/monsters/runtime/raider-captain-560.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
apps/web/public/images/monsters/runtime/raider-scout-560.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
apps/web/public/images/monsters/runtime/raider-veteran-560.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
@@ -14,6 +14,8 @@ import { LocationSidebarComponent } from '../location-sidebar/location-sidebar.c
|
||||
const RUNTIME_ARTWORK: Readonly<Record<string, string>> = {
|
||||
'/images/backgrounds/Suedtor.png': '/images/backgrounds/runtime/Suedtor-960.jpg',
|
||||
'/images/backgrounds/Aschestrasse.png': '/images/backgrounds/runtime/Aschestrasse-960.jpg',
|
||||
'/images/backgrounds/Wachturm.png': '/images/backgrounds/runtime/Wachturm-960.jpg',
|
||||
'/images/backgrounds/Aschengrube.png': '/images/backgrounds/runtime/Aschengrube-960.jpg',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,6 +3,10 @@ const RUNTIME_MONSTER_ARTWORK: Readonly<Record<string, string>> = {
|
||||
'/images/monsters/road-bandit.png': '/images/monsters/runtime/road-bandit-560.jpg',
|
||||
'/images/monsters/wild-road-dog.png': '/images/monsters/runtime/wild-road-dog-560.png',
|
||||
'/images/monsters/charred-looter.png': '/images/monsters/runtime/charred-looter-560.png',
|
||||
'/images/monsters/raider-scout.png': '/images/monsters/runtime/raider-scout-560.jpg',
|
||||
'/images/monsters/raider-veteran.png': '/images/monsters/runtime/raider-veteran-560.jpg',
|
||||
'/images/monsters/burned-hound.png': '/images/monsters/runtime/burned-hound-560.jpg',
|
||||
'/images/monsters/raider-captain.png': '/images/monsters/runtime/raider-captain-560.jpg',
|
||||
};
|
||||
|
||||
export function runtimeMonsterArtworkPath(artworkPath: string): string | undefined {
|
||||
@@ -16,6 +20,10 @@ const MONSTER_CUTOUT: Readonly<Record<string, string>> = {
|
||||
'road-bandit': '/images/combat/sprites/road-bandit-620.png',
|
||||
'wild-road-dog': '/images/combat/sprites/wild-road-dog-760.png',
|
||||
'charred-looter': '/images/combat/sprites/charred-looter-620.png',
|
||||
'raider-scout': '/images/combat/sprites/raider-scout-620.png',
|
||||
'raider-veteran': '/images/combat/sprites/raider-veteran-620.png',
|
||||
'burned-hound': '/images/combat/sprites/burned-hound-760.png',
|
||||
'raider-captain': '/images/combat/sprites/raider-captain-620.png',
|
||||
};
|
||||
|
||||
const MONSTER_ICON: Readonly<Record<string, string>> = {
|
||||
@@ -23,6 +31,10 @@ const MONSTER_ICON: Readonly<Record<string, string>> = {
|
||||
'road-bandit': '/images/combat/icons/road-bandit-128.png',
|
||||
'wild-road-dog': '/images/combat/icons/wild-road-dog-128.png',
|
||||
'charred-looter': '/images/combat/icons/charred-looter-128.png',
|
||||
'raider-scout': '/images/combat/icons/raider-scout-128.png',
|
||||
'raider-veteran': '/images/combat/icons/raider-veteran-128.png',
|
||||
'burned-hound': '/images/combat/icons/burned-hound-128.png',
|
||||
'raider-captain': '/images/combat/icons/raider-captain-128.png',
|
||||
};
|
||||
|
||||
// Share of the battlefield height each monster sprite occupies, so a hulking
|
||||
@@ -32,6 +44,10 @@ const COMBAT_MONSTER_SCALE: Readonly<Record<string, number>> = {
|
||||
'road-bandit': 0.82,
|
||||
'wild-road-dog': 0.58,
|
||||
'charred-looter': 0.86,
|
||||
'raider-scout': 0.78,
|
||||
'raider-veteran': 0.84,
|
||||
'burned-hound': 0.6,
|
||||
'raider-captain': 0.9,
|
||||
};
|
||||
|
||||
const DEFAULT_MONSTER_SCALE = 0.6;
|
||||
|
||||