feat(combat): use the cut-out enemy art and scale sprites per monster
Swap the enemy body art for the background-free versions and trim every sprite to its opaque bounds so the fighters share one ground baseline instead of floating in a padded box. Sprite height is now a share of the battlefield rather than a fixed clamp, set per monster key, so a low-slung rat and a standing bandit keep believable proportions against the player at any stage size.
|
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 243 KiB |
BIN
apps/web/public/images/combat/sprites/warrior-hit-sheet-384.png
Normal file
|
After Width: | Height: | Size: 369 KiB |
@@ -17,10 +17,23 @@ const COMBAT_MONSTER_ICON: Readonly<Record<string, string>> = {
|
||||
'road-bandit': '/images/combat/icons/road-bandit-128.png',
|
||||
};
|
||||
|
||||
// Share of the battlefield height each monster sprite occupies, so a hulking
|
||||
// bandit and a low-slung rat keep believable proportions against the player.
|
||||
const COMBAT_MONSTER_SCALE: Readonly<Record<string, number>> = {
|
||||
'ash-rat': 0.46,
|
||||
'road-bandit': 0.82,
|
||||
};
|
||||
|
||||
const DEFAULT_MONSTER_SCALE = 0.6;
|
||||
|
||||
export function combatMonsterSpritePath(monsterKey: string): string | undefined {
|
||||
return COMBAT_MONSTER_SPRITE[monsterKey];
|
||||
}
|
||||
|
||||
export function combatMonsterSpriteScale(monsterKey: string): number {
|
||||
return COMBAT_MONSTER_SCALE[monsterKey] ?? DEFAULT_MONSTER_SCALE;
|
||||
}
|
||||
|
||||
export function combatMonsterIconPath(monsterKey: string): string | undefined {
|
||||
return COMBAT_MONSTER_ICON[monsterKey];
|
||||
}
|
||||
|
||||