Шаблон:Profession mechanic skill table row format — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
(не показано 14 промежуточных версий этого же участника) | |||
Строка 1: | Строка 1: | ||
− | <includeonly>|- class="{{lc:{{{5|}}}}} {{{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}}}}<!-- |
− | | <span style="vertical-align:middle;">{{#switch: {{{ | + | |
− | | chain = [[File:Redirect Arrow.png|25px|link=]] | + | Profession subheader |
− | | toolbelt = [[File:Chain Arrow Toolbelt.png|25px|link=Tool belt|Пояс с инструментами]] | + | |
+ | -->{{#ifeq: {{#var:showProfessionSubheader|false}}|true | ||
+ | | {{#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 -->}} | ||
+ | {{!}}- 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}}]] }} }} | ||
+ | {{!}}- | ||
+ | }} | ||
+ | }}<!-- | ||
+ | |||
+ | 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}} | ||
+ | | n | no | none = | ||
+ | | 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|Вспышка ярости]] | | burst = [[File:Chain Arrow Toolbelt.png|25px|link=Burst|Вспышка ярости]] | ||
− | | primalburst = [[File: | + | | 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|Засада]] | | 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 --> |
− | }}{{borderless|{{#sub:{{{3|}}}|5}}|25|link={{{1}}}}} [[{{{1}}}|{{{2|}}}]]</span> | + | | <!-- automatic -->{{#if: {{#ifeq: {{#var:this_sequence}}|{{#var:last_sequence}}|+|<!-- fallback, same skill sort name -->{{#ifeq:{{#var:this_sort}}|{{#var:last_sort}}|+}}}}<!-- |
− | {{#ifeq: {{#var:showWeapon }}|true|{{!}} {{#if: {{{ | + | -->| {{#ifexpr: {{#if:{{{10|}}}|{{{10|}}}|1}} > 1|[[File:Redirect Arrow.png|25px|link=|Цепочка]]}}}} |
− | {{#ifeq: {{#var:showType }}|true|{{!}} {{#if: {{{ | + | | <!-- manual case -->{{#ifexpr: {{#if:{{{10|}}}|{{{10|}}}|1}} > 1|[[File:Redirect Arrow.png|25px|link=|Цепочка]]}}}} |
− | {{#ifeq: {{#var:showPet }}|true|{{!}} {{#if: {{{ | + | }}{{#vardefine:last_sequence|{{#var:this_sequence}}}}{{#vardefine:last_sort|{{#var:this_sort}}}}<!-- |
− | {{#ifeq: {{#var:showArchetype}}|true|{{!}} {{#if: {{{ | + | -->{{borderless|{{#sub:{{{3|}}}|5}}|25|link={{{1}}}}} [[{{{1}}}|{{{2|}}}]]</span><!-- |
− | | style="text-align:center;" | {{#ifeq:{{{ | + | -->{{#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>}} |
− | | style="text-align:center;" data-sort-value="{{{ | + | {{#ifeq: {{#var:showWeapon }}|true|{{!}} {{#if: {{{16|}}} | [[{{{16|}}}|{{rus lang|weapon|{{{16|}}}}}]] }} | |
− | {{#ifeq: {{#var:showEnergy }}|true|{{!}} style="text-align:center;" data-sort-value="{{{ | + | {{#ifeq: {{#var:showType }}|true|{{!}} {{#if: {{{8|}}} | {{#arraymap:{{{8}}}|,|@@@|[[@@@|{{rus lang|skill type|@@@}}]]|, }} }} | |
− | | style="text-align:center;" data-sort-value="{{{ | + | {{#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|}}} | ||
</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 | ||
− | # Has | + | # Is usable underwater |
+ | # Has chain sequence | ||
+ | # Has skill sort order | ||
# Is ground targeted | # 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