animation

This commit is contained in:
Bastian Wagner
2026-08-19 23:24:36 +02:00
parent 76e8ef4320
commit fd9852bfbf
9 changed files with 220 additions and 92 deletions

View File

@@ -1,4 +1,4 @@
import { runtimeMonsterArtworkPath } from './monster-artwork';
import { monsterCutoutPath, monsterIconPath, runtimeMonsterArtworkPath } from './monster-artwork';
describe('runtimeMonsterArtworkPath', () => {
it('returns the optimized JPEG derivative for a known monster artwork path', () => {
@@ -11,3 +11,25 @@ describe('runtimeMonsterArtworkPath', () => {
expect(runtimeMonsterArtworkPath('/images/enemies/Dawnwolf.png')).toBeUndefined();
});
});
describe('monsterCutoutPath', () => {
it('returns the background-free cut-out for a known monster key', () => {
expect(monsterCutoutPath('ash-rat')).toBe('/images/combat/sprites/ash-rat-760.png');
expect(monsterCutoutPath('road-bandit')).toBe('/images/combat/sprites/road-bandit-620.png');
});
it('returns undefined for a monster without a cut-out', () => {
expect(monsterCutoutPath('dawnwolf')).toBeUndefined();
});
});
describe('monsterIconPath', () => {
it('returns the medallion icon for a known monster key', () => {
expect(monsterIconPath('ash-rat')).toBe('/images/combat/icons/ash-rat-128.png');
expect(monsterIconPath('road-bandit')).toBe('/images/combat/icons/road-bandit-128.png');
});
it('returns undefined for a monster without an icon', () => {
expect(monsterIconPath('dawnwolf')).toBeUndefined();
});
});