Шаблон:Skill types nav — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | <includeonly>{{#if: | ||
+ | {{#vardefine:professions|guardian, revenant, warrior, engineer, ranger, thief, elementalist, mesmer, necromancer}} | ||
+ | {{#vardefine:page|{{{1|{{PAGENAME}}}}}}} | ||
+ | |||
+ | <!-- Elite specialization definition (in order of release) --> | ||
+ | {{#vardefine:guardian-specs | dragonhunter, firebrand }} | ||
+ | {{#vardefine:revenant-specs | herald, renegade }} | ||
+ | {{#vardefine:warrior-specs | berserker, spellbreaker }} | ||
+ | {{#vardefine:engineer-specs | scrapper, holosmith }} | ||
+ | {{#vardefine:ranger-specs | druid, soulbeast }} | ||
+ | {{#vardefine:thief-specs | daredevil, deadeye }} | ||
+ | {{#vardefine:elementalist-specs | tempest, weaver }} | ||
+ | {{#vardefine:mesmer-specs | chronomancer, mirage }} | ||
+ | {{#vardefine:necromancer-specs | reaper, scourge }} | ||
+ | |||
+ | <!-- | ||
+ | Types are in a list separated by ';'. Each type definition can have up to 3 parts, separated by '/', as follows: | ||
+ | 1/ Page name. | ||
+ | 2/ Whether it's a profession mechanic (y/n). Defaults to n. | ||
+ | 3/ Link text. Defaults to page name. | ||
+ | --> | ||
+ | |||
+ | <!-- Core profession types --> | ||
+ | {{#vardefine:guardian-types | Consecration; Meditation; Shout; Signet; Spirit weapon; Symbol; Virtue/y; Ward }} | ||
+ | {{#vardefine:revenant-types | Energy/y; Legend/y; Legendary Assassin Stance/n/Legendary Assassin; Legendary Centaur Stance/n/Legendary Centaur; Legendary Demon Stance/n/Legendary Demon; Legendary Dwarf Stance/n/Legendary Dwarf}} | ||
+ | {{#vardefine:warrior-types | Adrenaline/y; Banner; Burst/y; Physical; Shout; Signet; Stance }} | ||
+ | {{#vardefine:engineer-types | Elixir; Engineering kit; Gadget; Tool belt/y; Turret }} | ||
+ | {{#vardefine:ranger-types | Beast/y; Pet/y; Shout; Signet; Spirit; Survival; Trap }} | ||
+ | {{#vardefine:thief-types | Deception (skill type)/n/Deception; Dual Wield; Initiative/y; Signet; Steal/y; Stealth Attack; Trap; Trick; Venom }} | ||
+ | {{#vardefine:elementalist-types | Arcane; Attunement/y; Cantrip; Conjure; Glyph; Signet }} | ||
+ | {{#vardefine:mesmer-types | Clone; Glamour; Illusion/y; Manipulation; Mantra; Phantasm; Shatter/y; Signet }} | ||
+ | {{#vardefine:necromancer-types | Corruption; Death Shroud/y; Life force/y; Mark; Minion; Signet; Spectral; Well }} | ||
+ | |||
+ | <!-- Heart of Thorns elite spec types --> | ||
+ | {{#vardefine:dragonhunter-types | Trap }} | ||
+ | {{#vardefine:herald-types | Facet of Nature/y; Legendary Dragon Stance/n/Legendary Dragon }} | ||
+ | {{#vardefine:berserker-types | Berserk/y; Primal burst/y; Rage }} | ||
+ | {{#vardefine:scrapper-types | Function Gyro (trait skill)/y/Function Gyro; Gyro }} | ||
+ | {{#vardefine:druid-types | Celestial Avatar/y; Glyph }} | ||
+ | {{#vardefine:daredevil-types | Physical }} | ||
+ | {{#vardefine:tempest-types | Overload/y; Shout }} | ||
+ | {{#vardefine:chronomancer-types | Continuum Split/y; Well }} | ||
+ | {{#vardefine:reaper-types | Reaper's Shroud/y; Shout }} | ||
+ | |||
+ | <!-- Path of Fire elite spec types --> | ||
+ | {{#vardefine:firebrand-types | Final Charge; Mantra; Tome/y }} | ||
+ | {{#vardefine:renegade-types | Citadel Order/y; Legendary Renegade Stance/n/Legendary Renegade }} | ||
+ | {{#vardefine:spellbreaker-types | Full Counter/y; Meditation }} | ||
+ | {{#vardefine:holosmith-types | Exceed; Heat/y; Photon Forge/y }} | ||
+ | {{#vardefine:soulbeast-types | Beastmode/y; Stance }} | ||
+ | {{#vardefine:deadeye-types | Cantrip; Deadeye's Mark/y; Kneel; Malice (effect)/y/Malice }} | ||
+ | {{#vardefine:weaver-types | Dual Attack/y; Stance }} | ||
+ | {{#vardefine:mirage-types | Ambush/y; Deception (skill type)/n/Deception; Mirage Cloak (effect)/y/Mirage Cloak }} | ||
+ | {{#vardefine:scourge-types | Punishment; Shade/y }} | ||
+ | |||
+ | <!-- Miscellaneous --> | ||
+ | {{#vardefine:slots | [[Skill bar#Weapon skills|Weapon]]{{bullet}}[[Healing skill|Healing]]{{bullet}}[[Utility skill|Utility]]{{bullet}}[[Elite skill|Elite]]{{bullet}}[[List of downed skills|Downed]]{{bullet}}[[List of drowning skills|Drowning]]{{bullet}}[[Special action skill|Special action]] }} | ||
+ | {{#vardefine:activation | [[Ammunition System|Ammunition]]{{bullet}}[[Chain]]{{bullet}}[[Channeled skill|Channel]]{{bullet}}[[Charge skill|Charge]]{{bullet}}[[Sequence skill|Sequence]]{{bullet}}[[Transform]] }} | ||
+ | |||
+ | <!-- Unset all variables holding which professions to open by default --> | ||
+ | {{#arraymap:{{#var:professions}}|,|@@@| {{#arraymap:@@@,{{#var:@@@-specs}}|,|###|{{#vardefine:###-default|}}|\n}} |\n}} | ||
+ | |||
+ | <!-- Set them according to the professions parameter --> | ||
+ | {{#if: {{{professions|}}} | {{#arraymap:{{{professions}}}|,|@@@|{{#vardefine:@@@-default|yes}}|\n}} | | ||
+ | |||
+ | <!-- Otherwise choose the default professions for the given page title --> | ||
+ | {{#arraymap:{{#var:professions}}|,|@@@| | ||
+ | {{#arraymap:@@@,{{#var:@@@-specs}}|,|###| | ||
+ | {{#arraymap:{{#var:###-types}}|;|&&&| | ||
+ | {{#ifeq: {{#explode:&&&|/|0}} | {{#var:page}} | {{#vardefine:@@@-default|yes}}{{#vardefine:###-default|yes}} }} | ||
+ | |\n}} | ||
+ | |\n}} | ||
+ | |\n}} | ||
+ | }} | ||
+ | |||
+ | }}<!--end #if--> | ||
<hr style="margin: 1em 0em; clear: both;" /> | <hr style="margin: 1em 0em; clear: both;" /> | ||
− | <div class="nav mech2" style="width: | + | <div class="nav mech2" style="width:700px"> |
<div class="box"> | <div class="box"> | ||
− | <div class="heading">[[Skill type|Типы умений]]</div> | + | <div class="heading" style="margin-bottom: 0 !important">[[Skill type|Типы умений]] и ''[[profession mechanic|механика профессий]]''</div> |
− | <div class="wrapper" style="text-align: | + | <div class="wrapper"> |
− | {| | + | {| class="collapsible" style="width:100%; margin:0;" |
− | + | |- class="expandable" | |
− | + | ! style="text-align:right; border-top:1px solid {{any-color|medium}}; border-right:0px; font-size:110%;" colspan="2" | <span style="font-size:90%">Все ссылки:</span> | |
+ | |- class="collapse-reverse" | ||
+ | | <!-- spacer --> | ||
+ | {{#arraymap:{{#var:professions}}|,|@@@| | ||
+ | {{#if:{{#var:@@@-default}}| | ||
+ | {{!}}- class="collapse-reverse" | ||
+ | ! style="width: 110px;" {{!}} [[{{ucfirst:@@@}}]] {{@@@}} | ||
+ | {{!}} {{#arraymap:{{#var:@@@-types}}|;|&&&| {{#if: | ||
+ | {{#vardefine:link-page | {{#explode:&&&|/|0}} }} | ||
+ | {{#vardefine:is-mechanic| {{#explode:&&&|/|1}} }} | ||
+ | {{#vardefine:link-label | {{#explode:&&&|/|2}} }} | ||
+ | {{#vardefine:link | [[{{#var:link-page}}|{{#var:link-label|{{#var:link-page}}}}]] }} | ||
+ | }} {{#ifeq: {{#var:is-mechanic|n}} | y | ''{{#var:link}}'' | {{#var:link}} }} | ||
+ | | • }} {{#arraymap:{{#var:@@@-specs}}|,|###| | ||
+ | {{#if:{{#var:###-default}}| • {{#arraymap:{{#var:###-types}}|;|&&&| {{#if: | ||
+ | {{#vardefine:link-page | {{#explode:&&&|/|0}} }} | ||
+ | {{#vardefine:is-mechanic| {{#explode:&&&|/|1}} }} | ||
+ | {{#vardefine:link-label | {{#explode:&&&|/|2}} }} | ||
+ | {{#vardefine:link | [[{{#var:link-page}}|{{#var:link-label|{{#var:link-page}}}}]] }} | ||
+ | }} <span style="display: inline-block;">{{###}} {{#ifeq: {{#var:is-mechanic|n}} | y | ''{{#var:link}}'' | {{#var:link}} }}</span> | ||
+ | | • }}}} | ||
+ | |\n}} | ||
+ | }} | ||
+ | |\n}}{{#ifeq: {{{misc|}}} | y | | ||
+ | {{!}}- class="collapse-reverse" | ||
+ | ! Slot | ||
+ | {{!}} {{#var:slots}} | ||
+ | {{!}}- class="collapse-reverse" | ||
+ | ! Activation | ||
+ | {{!}} {{#var:activation}} | ||
+ | }} | ||
+ | |- class="collapse-reverse" | ||
+ | | <!-- spacer --> | ||
+ | {{#arraymap:{{#var:professions}}|,|@@@| | ||
+ | {{!}}- | ||
+ | ! style="text-align:center; border-top:1px solid {{color|@@@|border}}; background:{{color|@@@|light}}; border-right:0px" colspan="2" {{!}} {{@@@}} [[{{ucfirst:@@@}}]] | ||
+ | {{!}}- | ||
+ | {{!}} <!-- spacer --> | ||
+ | {{#arraymap:@@@,{{#var:@@@-specs}}|,|###| | ||
+ | {{!}}- | ||
+ | ! style="width: 110px; border-right:2px solid {{color|@@@|border}}" {{!}} {{#ifeq: @@@ | ### | Core | [[{{ucfirst:###}}]] {{###}} }} | ||
+ | {{!}} {{#arraymap:{{#var:###-types}}|;|&&&| {{#if: | ||
+ | {{#vardefine:link-page | {{#explode:&&&|/|0}} }} | ||
+ | {{#vardefine:is-mechanic| {{#explode:&&&|/|1}} }} | ||
+ | {{#vardefine:link-label | {{#explode:&&&|/|2}} }} | ||
+ | {{#vardefine:link | [[{{#var:link-page}}|{{#var:link-label|{{#var:link-page}}}}]] }} | ||
+ | }} {{#ifeq: {{#var:is-mechanic|n}} | y | ''{{#var:link}}'' | {{#var:link}} }} | ||
+ | | • }} | ||
+ | |\n}} | ||
+ | {{!}}- | ||
+ | {{!}} <!-- spacer --> | ||
+ | {{!}}- | ||
+ | |\n}} | ||
|- | |- | ||
− | ! | + | ! style="text-align:center; border-top:1px solid {{any-color|border}}; border-right:0px" colspan="2" | Miscellaneous |
− | |||
|- | |- | ||
− | ! | + | | <!-- spacer --> |
− | |||
|- | |- | ||
− | ! | + | ! style="border-right:2px solid {{any-color|border}}" | Slot |
− | + | | {{#var:slots}} | |
|- | |- | ||
− | ! | + | ! style="border-right:2px solid {{any-color|border}}" | Activation |
− | + | | {{#var:activation}} | |
|- | |- | ||
− | ! | + | | <!-- spacer --> |
− | + | |} | |
− | + | </div> | |
− | + | </div> | |
− | + | </div></includeonly><noinclude> | |
− | + | == Description == | |
− | + | <pre style="width: 50%;"> | |
− | | | + | {{Skill types nav}} |
− | + | {{Skill types nav|<page name>}} | |
− | + | {{Skill types nav|professions = <list of professions and elite specs>}} | |
− | + | </pre> | |
− | + | ||
− | + | === Parameters === | |
− | + | ; ''unnamed parameter'' 1 | |
− | + | : Optional. Full page name to display the navigation links for by default. If not set, the current page's name is used instead. | |
− | + | ; professions | |
− | + | : Optional. Comma-separated list of professions and elite specializations to show by default. For each elite specialization in the list, there must also be the core profession there in order to work correctly. Takes precedence over the page title (inferred or given by a paramter). | |
− | + | ; misc | |
− | + | : Optional. If set to <tt>y</tt>, the "Miscellaneous" rows will be shown by default. | |
− | + | ||
− | | | + | === Examples === |
− | + | <pre style="width: 50%;"> | |
− | + | {{Skill types nav|Trap}} | |
− | + | </pre> | |
+ | {{Skill types nav|Trap}} | ||
+ | |||
+ | |||
+ | <pre style="width: 50%;"> | ||
+ | {{Skill types nav|professions=warrior,spellbreaker,mesmer,mirage}} | ||
+ | </pre> | ||
+ | {{Skill types nav|professions=warrior,spellbreaker,mesmer,mirage}} | ||
[[Category:Navigation templates|{{PAGENAME}}]]</noinclude> | [[Category:Navigation templates|{{PAGENAME}}]]</noinclude> |
Версия 05:34, 5 января 2018
Description
{{Skill types nav}} {{Skill types nav|<page name>}} {{Skill types nav|professions = <list of professions and elite specs>}}
Parameters
- unnamed parameter 1
- Optional. Full page name to display the navigation links for by default. If not set, the current page's name is used instead.
- professions
- Optional. Comma-separated list of professions and elite specializations to show by default. For each elite specialization in the list, there must also be the core profession there in order to work correctly. Takes precedence over the page title (inferred or given by a paramter).
- misc
- Optional. If set to y, the "Miscellaneous" rows will be shown by default.
Examples
{{Skill types nav|Trap}}
{{Skill types nav|professions=warrior,spellbreaker,mesmer,mirage}}