Шаблон:RarityWithArticle

Матеріал з Вікі D&D українською
Версія від 01:42, 27 серпня 2023, створена 587 (обговорення | внесок) (Створена сторінка: Категорія:Потребує перекладу <includeonly>{{#if:{{{1|}}}| {{#switch:{{{1}}} | common = a common | uncommon = an uncommon | rare = a rare | very rare = a very rare | legendary = a legendary | story = a quest-related | an (unknown rarity) }} |a common}}</includeonly><noinclude> This is useful for auto-generating text with a template, in which you'd like to refer to an item's rarity in the flow of a sentence, like so: {{code|<no...)
(різн.) ← Попередня версія | Поточна версія (різн.) | Новіша версія → (різн.)
Перейти до навігації Перейти до пошуку


This is useful for auto-generating text with a template, in which you'd like to refer to an item's rarity in the flow of a sentence, like so:

The {{{name}}} is {{RarityWithArticle|{{{rarity}}}}} item.

Suppose the 'name' is "Worgfang" and the 'rarity' is "uncommon". Then the result would be:

The Worgfang is

an uncommon item.

For an empty rarity value, it will say "a common":

The Dagger is

a common item.

For an invalid / unrecognized rarity value, it will say "an (unknown rarity)":

The Weird Sword is

an (unknown rarity) item.