Шаблон:Trait infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
<includeonly>{{#set:Has context=Trait}}<!-- | <includeonly>{{#set:Has context=Trait}}<!-- | ||
-->{{infobox status|{{{status|}}}|{{{status notes|}}}|date={{{status date|}}}}}<!-- | -->{{infobox status|{{{status|}}}|{{{status notes|}}}|date={{{status date|}}}}}<!-- | ||
− | -->{{infobox requires|{{{requires| | + | -->{{infobox requires|{{{requires|}}} }}<!-- |
-->{{#if: | -->{{#if: | ||
{{#vardefine:traitline| {{ifexists|{{{line}}} (specialization)|{{{line}}} (specialization)|{{{line|Profession}}}}} }} | {{#vardefine:traitline| {{ifexists|{{{line}}} (specialization)|{{{line}}} (specialization)|{{{line|Profession}}}}} }} | ||
{{#vardefine:profession| {{lc:{{#show:{{#var:traitline}}|?Is for profession|link=none|default=Any}}}} }} | {{#vardefine:profession| {{lc:{{#show:{{#var:traitline}}|?Is for profession|link=none|default=Any}}}} }} | ||
+ | {{#vardefine:profession_number| {{#switch: {{lc:{{#var:profession}}}} | ||
+ | | guardian = 1 | ||
+ | | revenant = 2 | ||
+ | | warrior = 3 | ||
+ | | engineer = 4 | ||
+ | | ranger = 5 | ||
+ | | thief = 6 | ||
+ | | elementalist = 7 | ||
+ | | mesmer = 8 | ||
+ | | necromancer = 9 | ||
+ | }}}} | ||
+ | {{#ifeq:{{#show: {{#var:traitline}}|?Has specialization type|default=}}|Elite| | ||
+ | {{#vardefine:specialization|{{#var:traitline}}}} | ||
+ | {{#vardefine:specialization_number|{{#switch: {{lc:{{#var:traitline}}}} | ||
+ | | dragonhunter | ||
+ | | herald | ||
+ | | berserker | ||
+ | | scrapper | ||
+ | | druid | ||
+ | | daredevil | ||
+ | | tempest | ||
+ | | chronomancer | ||
+ | | reaper = 1 | ||
+ | | firebrand | ||
+ | | renegade | ||
+ | | spellbreaker | ||
+ | | holosmith | ||
+ | | soulbeast | ||
+ | | deadeye | ||
+ | | weaver | ||
+ | | mirage | ||
+ | | scourge = 2 | ||
+ | }}}}|{{#vardefine:specialization_number|0}}<!-- set core to 0 to ensure proper sorting -->}} | ||
+ | {{#set:Is in trait line={{#var:traitline}}|Is for profession={{ucfirst:{{#var:profession}}}}|Has profession sort order={{#var:profession_number}}|Is for specialization={{#var:specialization}}|Has specialization sort order={{#var:specialization_number}}}} | ||
}}<!-- | }}<!-- | ||
-->{{#if:{{{split|}}}|{{Game mode version|{{{split}}}}}<!-- | -->{{#if:{{{split|}}}|{{Game mode version|{{{split}}}}}<!-- | ||
Строка 21: | Строка 55: | ||
|type={{{type|}}} | |type={{{type|}}} | ||
|line={{{line|}}} | |line={{{line|}}} | ||
− | |status={{{status|}}}}}}}<!-- | + | |status={{{status|}}}}} |
+ | | {{#set:Is for game mode=Default}} }}<!-- | ||
--><div class="infobox trait {{#var:profession}}"> | --><div class="infobox trait {{#var:profession}}"> | ||
Строка 27: | Строка 62: | ||
<p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | <p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | ||
<div class="statistics"> | <div class="statistics"> | ||
− | {{#if:{{{recharge|}}}{{{recharge-pve|}}} | | + | {{#if: {{{recharge|}}}{{{recharge-pve|}}} |
− | + | | {{#set:Has recharge time={{{recharge-pve|{{#replace:{{{recharge}}}|.|,}}}}}}} | |
− | + | {{#if: {{{recharge-wvw|}}}{{{recharge-pvp|}}} | |
− | + | | {{infobox statistic split|stat=recharge|{{{recharge|}}}|pve={{{recharge-pve|}}}|wvw={{{recharge-wvw|}}}|pvp={{{recharge-pvp|}}}}} | |
+ | | {{recharge|{{{recharge}}}}} | ||
+ | }} | ||
}} | }} | ||
</div> | </div> | ||
<div class="wrapper"> | <div class="wrapper"> | ||
; [[Specialization|Специализация]] | ; [[Specialization|Специализация]] | ||
− | : {{profession|{{#var:profession}}}} [[{{#var:traitline}}|{{rus lang|specialization|{{{line|Профессия}}}}}]] | + | : {{profession|{{#var:profession}}}} [[{{#var:traitline}}|{{rus lang|specialization|{{{line|Профессия}}}}}]] <small>([[List of {{#var:profession}} traits|список черт]])</small> |
; Уровень | ; Уровень | ||
: {{#if:{{{tier|}}}|[[Has trait tier::{{ucfirst:{{{tier}}}}}|{{#switch:{{lc:{{{tier}}}}}|proficiency=Владение|adept=Адепт|master=Мастер|grandmaster=Грандмастер}}]]{{#set:Has trait tier number={{#switch:{{lc:{{{tier}}}}}|proficiency=0|adept=1|master=2|grandmaster=3}}}} | ''Не указан'' }} | : {{#if:{{{tier|}}}|[[Has trait tier::{{ucfirst:{{{tier}}}}}|{{#switch:{{lc:{{{tier}}}}}|proficiency=Владение|adept=Адепт|master=Мастер|grandmaster=Грандмастер}}]]{{#set:Has trait tier number={{#switch:{{lc:{{{tier}}}}}|proficiency=0|adept=1|master=2|grandmaster=3}}}} | ''Не указан'' }} | ||
Строка 46: | Строка 83: | ||
}}{{#if: {{{id|}}} | {{#switch: {{{status|}}} | unimplemented | unimplemented | temporary | historical = | #default = | }}{{#if: {{{id|}}} | {{#switch: {{{status|}}} | unimplemented | unimplemented | temporary | historical = | #default = | ||
; Внеш. ссылки | ; Внеш. ссылки | ||
− | : [https://api.guildwars2.com/v2/traits?ids={{{id}}} API] | + | :[https://api.guildwars2.com/v2/traits?ids={{{id}}}&lang=en API] <!-- "&lang=" is being left in on purpose to make it easier to search for interwiki names of items by switching "en" to "es/fr/de" --> |
}} }} | }} }} | ||
</div> | </div> | ||
Строка 131: | Строка 168: | ||
; status notes : Optional. Allows provision of additional reason for the given status. | ; status notes : Optional. Allows provision of additional reason for the given status. | ||
; status date : Optional. Sets the date of the update that marked this skill as historical (in YYYY-MM-DD format). | ; status date : Optional. Sets the date of the update that marked this skill as historical (in YYYY-MM-DD format). | ||
− | ; | + | ; requires : Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{tl|infobox requires}} for options. |
== Example == | == Example == |
Версия 15:16, 29 февраля 2020
Description
{{Trait infobox | name = | icon = | split = | line = | tier = | type = | recharge = | description = | facts = | id = }}
Parameters
- name
- Optional. Trait name. Defaults to the page name.
- icon
- Optional. Icon filename. Defaults to
File:<page name>.png
. - split
- Optional. Game modes that this skill applies to. See {{Game mode version}}. Calls {{Trait infobox/subobject}} for each game mode beside PvE to create subobjects.
- line
- Required. The trait line that the trait is under.
- tier
- Required. The tier (Proficiency elite spec only, Adept, Master, Grandmaster) of the trait; displays Unspecified if omitted.
- type
- Required. The trait type (Minor or Major); displays Unspecified if omitted.
- position
- Required. The vertical position of the trait within the main trait selection panel. (0 for Minor traits, 1 for the top Major trait, 2 for the middle Major trait, and 3 for the bottom Major trait).
- recharge
- Optional. The trait's recharge time, if any.
- To set this parameter for a specific game mode: use the -wvw and -pvp parameters to set it. If the split is PvE | WvW + PvP, set only one of these parameters for the wvw+pvp version.
- description
- Required. The in-game description.
- facts
- Optional. The trait facts displayed in-game below the description. Each fact should be presented as an individual instance of the {{skill fact}} template.
- id
- Optional. The game id required to produce the chat link to the trait ingame.
- categorize
- Optional. "y" or "n" to turn on/off categorization. Default is on for main namespace articles and off for others. If using "status", don't set this parameter.
- status
- Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "future", "unimplemented", "current" (default).
- status notes
- Optional. Allows provision of additional reason for the given status.
- status date
- Optional. Sets the date of the update that marked this skill as historical (in YYYY-MM-DD format).
- requires
- Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{infobox requires}} for options.
Example
{{Trait infobox | name = Retribution | line = Radiance | tier = Master | type = Major | position = 3 | description = Gain increased damage while under the effects of [[retaliation]]. | facts = {{skill fact|damage increase|10}} | id = 565 }}
Retribution
- Специализация
- Сияние (список черт)
- Уровень
- Мастер
- Тип
- Старшая
- Изучение
- 5 очков героя
- Игр. ссылка
- API
- 565
“Gain increased damage while under the effects of retaliation.
- Увеличение урона: 10%
— Внутриигровое описание