diff --git a/src/lib/utils/proficiency.ts b/src/lib/utils/proficiency.ts index e0a508bb..529f6579 100644 --- a/src/lib/utils/proficiency.ts +++ b/src/lib/utils/proficiency.ts @@ -32,3 +32,9 @@ export function getProficiencyOptions() { label })) } + +export function getProficiencyImage(proficiency: number): string { + const label = PROFICIENCY_LABELS[proficiency] + if (!label || label === 'None') return '' + return `/images/proficiencies/${label.toLowerCase()}.png` +} diff --git a/src/lib/utils/rarity.ts b/src/lib/utils/rarity.ts index cfb45f2d..e72fa4c7 100644 --- a/src/lib/utils/rarity.ts +++ b/src/lib/utils/rarity.ts @@ -26,4 +26,10 @@ export function getRarityClass(rarity: number): string { default: return '' } +} + +export function getRarityImage(rarity: number): string { + const label = RARITY_LABELS[rarity] + if (!label) return '' + return `/images/rarity/${label.toLowerCase()}.png` } \ No newline at end of file