// PET_ASSET maps a card/token/food name to the basename of its illustration in // ./assets/pets. Most are exact matches; a handful are renamed or approximate // (see report.md at the repo root for the full audit). Names absent here fall // back to the emoji in PET_EMOJI, then to 🐾. const PET_ASSET: Record = { "Ant": "Ant", "Cricket": "Cricket", "Duck": "Duck", "Otter": "Otter", "Mosquito": "Mosquito", "Fish": "Fish", "Worm": "Worm", "Flamingo": "Flamingo", "Peacock": "Peacock", "Swan": "Swan", "Rat": "Rat", "Spider": "Spider", "Dog": "Dog", "Dolphin": "Dolphin", "Giraffe": "Giraffe", "Camel": "Camel", "Sheep": "Sheep", "Dodo": "Dodo", "Badger": "Badger", "Squirrel": "Squirrel", "Turtle": "Turtle", "Rooster": "Rooster", "Bison": "Bison", "Blowfish": "Blowfish", "Skunk": "Skunk", "Hippo": "Hippo", "Monkey": "Monkey", "Rhino": "Rhino", "Crocodile": "Crocodile", "Scorpion": "Scorpion", "Seal": "Seal", "Shark": "Shark", "Turkey": "Turkey", "Gorilla": "Gorilla", "Fly": "Fly", "Leopard": "Leopard", "Mammoth": "Mammoth", "Cat": "Cat", "Snake": "Snake", "Wolverine": "Wolverine", "Groundhog": "Groundhog", "Pied Tamarin": "PiedTamarin", "Chipmunk": "Chipmunk", "Cone Snail": "ConeSnail", "Bulldog": "Bulldog", "Opossum": "Opossum", "Black-Necked Stilt": "BlackNeckedStilt", "Lizard": "Lizard", "Hercules Beetle": "HerculesBeetle", "Stoat": "Stoat", "Desert Rain Frog": "DesertRainFrog", "Honduran White Bat": "HonduranWhiteBat", "Guinea Fowl": "FowlBird", "Surgeon Fish": "SurgeonFish", "Osprey": "Osprey", "Anteater": "Anteater", "Bear": "Bear", "Royal Flycatcher": "RoyalFlycatcher", "Flea": "Flea", "Saiga Antelope": "SaigaAntelope", "Vaquita": "Vaquita", "Poison Dart Frog": "PoisonDartFrog", "Manta Ray": "MantaRay", "Slug": "Slug", "Cockatoo": "Cockatoo", "Manatee": "Manatee", "Nyala": "Nyala", "Nurse Shark": "NurseShark", "Giant Isopod": "GiantIsopod", "Blue-Ringed Octopus": "BlueRingedOctopus", "Raccoon": "Racoon", "Fire Ant": "FireAnt", "Macaque": "Macaque", "Highland Cow": "HighlandCow", "Wildebeest": "Wildebeest", "Grizzly Bear": "GrizzlyBear", "Catfish": "Catfish", "Komodo": "Komodo", "Bird of Paradise": "ParadiseBird", "German Shepherd": "GermanShepard", "Alchemedes": "AlchemistBug", "Cuddle Toad": "CuddleToad", "Pengobble": "Pengobble", "Barghest": "Barghest", "Basilisk": "Basilisk", "Baku": "Baku", "Thunderbird": "Thunderbird", "Gargoyle": "Gargoyle", "Frost Wolf": "FrostWolf", "Mothman": "Mothman", "Nightcrawler": "NightCrawler", "Bigfoot": "Bigfoot", "Fur-Bearing Trout": "FurBearingTrout", "Calygreyhound": "Calygreyhound", "Tatzelwurm": "Tatzelwurm", "Skeleton Dog": "SkeletonDog", "Mandrake": "Mandrake", "Lucky Cat": "LuckyCat", "Slime": "Slime", "Roc": "Roc", "Chimera": "Chimera", "Kraken": "Kraken", "Unicorn": "Unicorn", "Abomination": "Shoggoth", "Rootlin": "Rootler", "Fairy": "Fairy", "Kitsune": "Kitsune", "Pixiu": "Pixiu", "Red Dragon": "RedDragon", "Amalgamation": "Amalgam", "Vampire Bat": "VampireBat", "Werewolf": "Werewolf", "Loveland Frogman": "LovelandFrogman", "Sleipnir": "Sleipnir", "Sea Serpent": "SeaSerpent", "Bakunawa": "Bakunawa", "Manticore": "Manticore", "Team Spirit": "TeamSpirit", "Behemoth": "Behemoth", "Quetzalcoatl": "Quetzalcoatl", "Mana": "CrystalBall", "Spooked": "Scared", "Exposed": "Weak", "Fairy Dust": "FairyDust", "Water of Youth": "YouthWater", "Health Potion": "HealthPotion", "Big Mana Potion": "ManaPotion", "Cornucopia": "Cornucopia", "Bee": "Bee", "Apple": "Apple", "Honey": "Honey", "Garlic": "Garlic", "Pineapple": "Pineapple", "Chili": "Chili", "Melon": "Melon", "Golden Retriever": "GoldenRetriever", "Avocado": "Avocado", "Potato": "Potato", "Durian": "Durian", "Tomato": "Tomato", } // Vite bundles every PNG under ./assets/pets and hands back its final URL. const ASSET_URLS = import.meta.glob('./assets/pets/*.png', { eager: true, import: 'default', query: '?url', }) const URL_BY_NAME: Record = {} for (const [name, base] of Object.entries(PET_ASSET)) { const url = ASSET_URLS[`./assets/pets/${base}.png`] if (url) URL_BY_NAME[name] = url } // Emoji fallback for names without an illustration (e.g. Trumpet, a battle // resource with no asset in the pack). const PET_EMOJI: Record = { Trumpet: '🎺', } // artUrlFor returns the illustration URL for a card/token/food name, or null // when only an emoji (or the 🐾 default) is available. export function artUrlFor(name: string): string | null { return URL_BY_NAME[name] ?? null } // artFor returns the emoji glyph for a name — used as a fallback when no // illustration exists. export function artFor(name: string): string { return PET_EMOJI[name] ?? '🐾' }