Use real assets.
This commit is contained in:
+172
-61
@@ -1,66 +1,177 @@
|
||||
const PET_EMOJI: Record<string, string> = {
|
||||
// Tier 1
|
||||
Ant: '🐜', Cricket: '🦗', Duck: '🦆', Otter: '🦦', Mosquito: '🦟', Fish: '🐟',
|
||||
// Tier 2
|
||||
Worm: '🪱', Flamingo: '🦩', Peacock: '🦚', Swan: '🦢', Rat: '🐀', Spider: '🕷️',
|
||||
// Tier 3
|
||||
Dog: '🐶', Dolphin: '🐬', Giraffe: '🦒', Camel: '🐫', Sheep: '🐑', Dodo: '🦤', Badger: '🦡',
|
||||
// Tier 4
|
||||
Squirrel: '🐿️', Turtle: '🐢', Rooster: '🐓', Bison: '🦬', Blowfish: '🐡', Skunk: '🦨', Hippo: '🦛',
|
||||
// Tier 5
|
||||
Monkey: '🐒', Rhino: '🦏', Crocodile: '🐊', Scorpion: '🦂', Seal: '🦭', Shark: '🦈', Turkey: '🦃',
|
||||
// Tier 6
|
||||
Gorilla: '🦍', Fly: '🪰', Leopard: '🐆', Mammoth: '🦣', Cat: '🐱', Snake: '🐍', Wolverine: '🐺',
|
||||
// Golden pack — Tier 1
|
||||
Groundhog: '🦫', 'Pied Tamarin': '🐒', Chipmunk: '🐿️', 'Cone Snail': '🐚', Bulldog: '🐕', Opossum: '🐀',
|
||||
// Golden pack — Tier 2
|
||||
'Black-Necked Stilt': '🦤', Lizard: '🦎', 'Hercules Beetle': '🪲', Stoat: '🦡', 'Desert Rain Frog': '🐸', 'Honduran White Bat': '🦇',
|
||||
// Golden pack — Tier 3
|
||||
'Guinea Fowl': '🐔', 'Surgeon Fish': '🐠', Osprey: '🦅', Anteater: '🐜', Bear: '🐻', 'Royal Flycatcher': '🐦', Flea: '🦟',
|
||||
// Golden pack — Tier 4
|
||||
'Saiga Antelope': '🦌', Vaquita: '🐬', 'Poison Dart Frog': '🐸', 'Manta Ray': '🐟', Slug: '🐌', Cockatoo: '🦜', Manatee: '🦭',
|
||||
// Golden pack — Tier 5
|
||||
Nyala: '🦌', 'Nurse Shark': '🦈', 'Giant Isopod': '🦞', 'Blue-Ringed Octopus': '🐙', Raccoon: '🦝', 'Fire Ant': '🐜', Macaque: '🐒',
|
||||
// Golden pack — Tier 6
|
||||
'Highland Cow': '🐄', Wildebeest: '🐃', 'Grizzly Bear': '🐻', Catfish: '🐟', Komodo: '🦎', 'Bird of Paradise': '🦚', 'German Shepherd': '🐕🦺',
|
||||
// Unicorn pack — Tier 1
|
||||
Alchemedes: '🧪', 'Cuddle Toad': '🐸', Pengobble: '🐧', Barghest: '🐺', Basilisk: '🐍', Baku: '🦤',
|
||||
// Unicorn pack — Tier 2
|
||||
Thunderbird: '🦅', Gargoyle: '🗿', 'Frost Wolf': '🐺', Mothman: '🦋', Nightcrawler: '🐛', Bigfoot: '🦍',
|
||||
// Unicorn pack — Tier 3
|
||||
'Fur-Bearing Trout': '🐟', Calygreyhound: '🐕', Tatzelwurm: '🐲', 'Skeleton Dog': '💀', Mandrake: '🌱', 'Lucky Cat': '🐱', Slime: '🟢',
|
||||
// Unicorn pack — Tier 4
|
||||
Roc: '🦅', Chimera: '🐐', Kraken: '🦑', Unicorn: '🦄', Abomination: '🧟', Rootlin: '🌿', Fairy: '🧚',
|
||||
// Unicorn pack — Tier 5
|
||||
Kitsune: '🦊', Pixiu: '🦁', 'Red Dragon': '🐉', Amalgamation: '🧬', 'Vampire Bat': '🧛', Werewolf: '🐺', 'Loveland Frogman': '🐸',
|
||||
// Unicorn pack — Tier 6
|
||||
Sleipnir: '🐎', 'Sea Serpent': '🦕', Bakunawa: '🐍', Manticore: '🦂', 'Team Spirit': '🎏', Behemoth: '🐘', Quetzalcoatl: '🪶',
|
||||
// Unicorn pack tokens & foods
|
||||
Mana: '🔮',
|
||||
Spooked: '👻',
|
||||
Exposed: '🎯',
|
||||
'Fairy Dust': '✨',
|
||||
'Water of Youth': '⏳',
|
||||
'Health Potion': '❤️🩹',
|
||||
'Big Mana Potion': '🍶',
|
||||
Cornucopia: '🧺',
|
||||
// Summons & foods
|
||||
Bee: '🐝',
|
||||
Apple: '🍎',
|
||||
Honey: '🍯',
|
||||
Garlic: '🧄',
|
||||
Pineapple: '🍍',
|
||||
Chili: '🌶️',
|
||||
Melon: '🍈',
|
||||
// Golden pack tokens & perk foods
|
||||
'Golden Retriever': '🦮',
|
||||
Trumpet: '🎺',
|
||||
Avocado: '🥑',
|
||||
Potato: '🥔',
|
||||
Durian: '🥭',
|
||||
Tomato: '🍅',
|
||||
// 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<string, string> = {
|
||||
"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<string>('./assets/pets/*.png', {
|
||||
eager: true,
|
||||
import: 'default',
|
||||
query: '?url',
|
||||
})
|
||||
|
||||
const URL_BY_NAME: Record<string, string> = {}
|
||||
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<string, string> = {
|
||||
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] ?? '🐾'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user