Шаблон:Profession mechanic skill table row format — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) (Новая страница: «<includeonly>|- class="{{lc:{{{5|}}}}} {{{class|}}}" | {{#if: {{{7|}}} | F{{{7|}}} }} | {{#ifeq: {{{userparam|}}} | chain | <span style="display:none">{{#show: {{…») |
Blood (обсуждение | вклад) |
||
(не показано 26 промежуточных версий этого же участника) | |||
Строка 1: | Строка 1: | ||
− | <includeonly>|- class= | + | <includeonly>{{#vardefine:this_profession|{{{5|}}}}}{{#vardefine:this_specialization|{{{6|}}}}}{{#vardefine:this_mechanic_slot|{{{9|}}}}}{{#vardefine:this_sequence|{{{22|}}}}}{{#vardefine:this_sort|{{#explode:{{{23|}}}|(}}}}<!-- |
− | | {{# | + | -->{{#switch: {{#var:header css class{{#var:table id}}}}|<!-- empty, not defined yet-->={{#vardefine:header css class{{#var:table id}}|{{lc:{{{5|}}}}}}}|<!-- same class -->{{lc:{{{5|}}}}}=|<!-- dummy class to distinguish from emtpy -->#default={{#vardefine:header css class{{#var:table id}}|white}}}}<!-- |
− | | {{#ifeq: {{{ | + | |
− | | chain = [[File:Redirect Arrow.png|25px|link=]] | + | Profession subheader |
− | | toolbelt = [[File:Chain Arrow Toolbelt.png|25px|link=Tool belt]] | + | |
− | | burst = [[File:Chain Arrow Toolbelt.png|25px|link=Burst]] | + | -->{{#ifeq: {{#var:showProfessionSubheader|false}}|true |
− | | primalburst = [[File: | + | | {{#ifeq: {{#var:this_profession}}{{#var:this_specialization}}|{{#var:last_profession}}{{#var:last_specialization}}|<!-- same profession+specialization, do nothing --> |
− | | | + | | {{#vardefine:last_profession|{{#var:this_profession}}}}{{#vardefine:last_specialization|{{#var:this_specialization}}}}{{#vardefine:last_mechanic_slot|<!-- new profession section, reset weapon -->}} |
− | | ambush = [[File:Chain Arrow Toolbelt.png|25px|link=Ambush]] | + | {{!}}- class="{{lc:{{{5|}}}}}" |
− | | | + | ! colspan="7" {{!}} {{#tag: {{#var:profession heading|h4}}|{{#ifeq: {{#var:this_specialization}}|| {{ {{#var:this_profession}} }} [[{{#var:this_profession}}]] | {{ {{#var:this_specialization}} }} [[{{#var:this_specialization}}]] }} }} |
− | }}{{borderless|{{#sub:{{{3|}}}|5}}|25|link={{{1}}}}} [[{{{1}}}|{{{2|}}}]]</span> | + | {{!}}- |
− | {{#ifeq:{{#var:showWeapon}}|true| | + | }} |
− | {{ | + | }}<!-- |
− | + | ||
− | {{ | + | Profession mechanic skill row |
− | + | ||
− | {{ | + | -->|- class="{{lc:{{{5|}}}}} {{{class|}}}" |
− | + | | style="text-align:center;" | {{#switch: {{{9|}}}|<!-- if empty or default sort value 0 -->| 0 = <!-- do not display --> | #default = F{{{9|}}}}} | |
− | {{ | + | | <span style="vertical-align:middle;">{{#switch: {{#if: {{{chain|}}}|{{lc:{{{chain|}}}}}|{{#if: {{#pos:{{lc:{{{8|}}}}}|tool belt}}|tool belt|{{lc:{{{8|}}}}}}} }} {{#ifeq: {{#var:showChainIconsOnly}}|true|triggering default}} |
− | | style="text-align: | + | | n | no | none = |
− | {{#ifeq: {{#var: | + | | chain = [[File:Redirect Arrow.png|25px|link=|Цепочка]] |
− | | | + | | toolbelt | tool belt = [[File:Chain Arrow Toolbelt.png|25px|link=Tool belt|Пояс с инструментами]] |
+ | | burst = [[File:Chain Arrow Toolbelt.png|25px|link=Burst|Вспышка ярости]] | ||
+ | | primalburst | primal burst = [[File:Chain Arrow Toolbelt.png|25px|link=Primal Burst|Первобытная ярость]] | ||
+ | | stealth | stealth attack = [[File:Chain Arrow Toolbelt.png|25px|link=Stealth Attack|Атака невидимки]] | ||
+ | | willbender flames = [[File:Chain Arrow Toolbelt.png|25px|link=Willbender Flames|Пламя Волеборца]] | ||
+ | | ambush = [[File:Chain Arrow Toolbelt.png|25px|link=Ambush|Засада]] | ||
+ | | #default = {{#if: {{#var:last_sequence}}{{#var:last_sort}}<!-- checking if empty due to #var caching bug --> | ||
+ | | <!-- automatic -->{{#if: {{#ifeq: {{#var:this_sequence}}|{{#var:last_sequence}}|+|<!-- fallback, same skill sort name -->{{#ifeq:{{#var:this_sort}}|{{#var:last_sort}}|+}}}}<!-- | ||
+ | -->| {{#ifexpr: {{#if:{{{10|}}}|{{{10|}}}|1}} > 1|[[File:Redirect Arrow.png|25px|link=|Цепочка]]}}}} | ||
+ | | <!-- manual case -->{{#ifexpr: {{#if:{{{10|}}}|{{{10|}}}|1}} > 1|[[File:Redirect Arrow.png|25px|link=|Цепочка]]}}}} | ||
+ | }}{{#vardefine:last_sequence|{{#var:this_sequence}}}}{{#vardefine:last_sort|{{#var:this_sort}}}}<!-- | ||
+ | -->{{borderless|{{#sub:{{{3|}}}|5}}|25|link={{{1}}}}} [[{{{1}}}|{{{2|}}}]]</span><!-- | ||
+ | -->{{#ifeq: {{#var:showUnderwater}}|true|<span style="float:right">{{#switch:{{{21|}}}|N|Land only=[[File:Not available underwater.png|20px|link=Underwater mode#Подводные умения|Недоступно под водой]]|Y|Underwater only=[[File:Underwater.png|link=Underwater mode#Подводные умения|Подводное умение]]}}</span>}} | ||
+ | {{#ifeq: {{#var:showWeapon }}|true|{{!}} {{#if: {{{16|}}} | [[{{{16|}}}|{{rus lang|weapon|{{{16|}}}}}]] }} | | ||
+ | {{#ifeq: {{#var:showType }}|true|{{!}} {{#if: {{{8|}}} | {{#arraymap:{{{8}}}|,|@@@|[[@@@|{{rus lang|skill type|@@@}}]]|, }} }} | | ||
+ | {{#ifeq: {{#var:showPet }}|true|{{!}} {{#if: {{{18|}}} | {{#arraymap:{{{18|}}}|,|@@@|[[@@@|{{rus lang|pet|{{trim|{{#replace: @@@|Juvenile }}}}}}]]|, }} | {{#if: {{{19|}}} | ''{{rus lang|pet family|{{{19}}}}}'' }} }} | | ||
+ | {{#ifeq: {{#var:showArchetype}}|true|{{!}} {{#if: {{{20|}}} | {{effect|{{{20|}}}|{{rus lang|pet archetype|{{{20|}}}}}}}}} }} }} }} }} | ||
+ | | style="text-align:center;" | {{#ifeq:{{{24}}}|Y|[[File:Ground_target_aim.png|18px|Прицеливание на землю|link=Targeting#Прицеливание на землю]]}} | ||
+ | | style="text-align:center;" data-sort-value="{{{11|0}}}" | {{fraction|{{{11|}}}}} | ||
+ | {{#ifeq: {{#var:showEnergy }}|true|{{!}} style="text-align:center;" data-sort-value="{{{14|0}}}" {{!}} {{{14|}}}{{#if:{{{14|}}}|{{#if:{{{15|}}}| / }}}}{{{15|}}} {{#ifeq:{{#var:showInitiative}}|true|{{!}}}}}}{{#ifeq:{{#var:showInitiative}}|true|{{!}} style="text-align:center;" data-sort-value="{{{13|0}}}" {{!}} {{{13|}}} }} | ||
+ | | style="text-align:center;" data-sort-value="{{{12|0}}}" | {{fraction|{{{12|}}} }} | ||
| {{{4|}}} | | {{{4|}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
− | Called as a semantic result template by [[Template:Profession mechanic skill table row]]. | + | Called as a semantic result template by [[Template:Profession mechanic skill table row]] and [[Template:Profession mechanic skill table]]. |
=== Input parameter list === | === Input parameter list === | ||
− | # | + | # Skill |
# Has canonical name | # Has canonical name | ||
# Has game icon | # Has game icon | ||
# Has game description | # Has game description | ||
# Is for profession | # Is for profession | ||
+ | # Is for specialization | ||
+ | # Has skill context | ||
# Has skill type | # Has skill type | ||
# Has profession mechanic slot number | # Has profession mechanic slot number | ||
+ | # Has chain sequence position | ||
# Has activation time | # Has activation time | ||
# Has recharge time | # Has recharge time | ||
# Has initiative cost | # Has initiative cost | ||
# Has energy cost | # Has energy cost | ||
+ | # Has upkeep cost | ||
# Is for weapon | # Is for weapon | ||
+ | # Is for attunement | ||
# Is for pet | # Is for pet | ||
# Is for pet family | # Is for pet family | ||
# Has pet archetype | # Has pet archetype | ||
− | + | # Is usable underwater | |
− | + | # Has chain sequence | |
+ | # Has skill sort order | ||
+ | # Is ground targeted | ||
[[Category:Skill formatting templates]] | [[Category:Skill formatting templates]] | ||
[[Category:Semantic result templates]] | [[Category:Semantic result templates]] |
Текущая версия на 06:18, 11 апреля 2022
Called as a semantic result template by Template:Profession mechanic skill table row and Template:Profession mechanic skill table.
Input parameter list[править]
- Skill
- Has canonical name
- Has game icon
- Has game description
- Is for profession
- Is for specialization
- Has skill context
- Has skill type
- Has profession mechanic slot number
- Has chain sequence position
- Has activation time
- Has recharge time
- Has initiative cost
- Has energy cost
- Has upkeep cost
- Is for weapon
- Is for attunement
- Is for pet
- Is for pet family
- Has pet archetype
- Is usable underwater
- Has chain sequence
- Has skill sort order
- Is ground targeted