Шаблон:Recharge table result format — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
(Новая страница: «<includeonly>{{#vardefine:smw_name|{{{1|}}}}}{{#vardefine:smw_recharge|{{#show:{{#var:smw_name}}|?Has recharge time}}}} {{#ifeq: {{#show: {{#var:smw_name}}|?Has s…»)
 
Строка 1: Строка 1:
<includeonly>{{#vardefine:smw_name|{{{1|}}}}}{{#vardefine:smw_recharge|{{#show:{{#var:smw_name}}|?Has recharge time}}}}
+
<includeonly>{{#switch: {{#ifeq: {{{hide count recharge skills|false}}}
{{#ifeq: {{#show: {{#var:smw_name}}|?Has skill type|link=none}} | Dual Attack | |  
+
| true
{{#ifeq: {{#show: {{#var:smw_name}}|?Has skill type|link=none}} | Ambush | |
+
| <!-- if this trait affects only count recharge --> {{#if: {{#ask: [[Is for skill::{{#explode:{{{1|}}}|#}}]][[Has fact::Count Recharge]]|default=|searchlabel=}}|Hide count recharge skills}}
{{!}} {{skill icon|{{#var:smw_name}}}}
+
| <!-- else skill types --> {{{5|}}}
{{!}} style="text-align:right" {{!}} {{recharge| {{#var:smw_recharge}} }}
+
}}
{{!}} style="text-align:right" {{!}} {{recharge| {{#expr: {{#var:smw_recharge}} * (100-{{{userparam|}}})/100}}}}
+
| Hide count recharge skills = <!-- this trait affects only the count recharge of the related skills -->
{{!}}-
+
| Ambush
}}}}
+
| Dual Attack = <!-- skills of this type aren't affected by recharge reduction -->
</includeonly><noinclude>
+
| #default = {{#vardefine:smw_results|+}}{{#vardefine:this_skill|{{#explode:{{{1|}}}|#}}}}{{#vardefine:this_context|{{{2|}}}}}{{#vardefine:this_recharge|{{{3|}}}}}<!--
This semantic result template is used for formatting results from {{tl|Recharge table}} and {{tl|Recharge table intro}}.
+
-->{{#ifeq: {{#var:this_context}}|{{#var:last_context}} | <!-- old context, creating subrow --><nowiki/>
</noinclude>
+
{{#ifeq: {{#var:this_skill}}{{#var:this_recharge}}|{{#var:last_skill}}{{#var:last_recharge}}
 +
|<!-- split skill but same recharge: do NOT display it again;
 +
      adjust game mode suffix: first add the current game mode, second if it contains all three game modes (PvE, PvP, WvW) then remove the suffix (i.e. same recharge everywhere)
 +
-->{{#vardefine:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}|{{#explode: {{#var:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}}|)}}{{#switch: {{{4|}}} | Default = | #default = , {{{4|}}})}} }}<!--
 +
-->{{#if: {{#pos:{{#var:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}}|PvE}}|
 +
      {{#if: {{#pos:{{#var:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}}|PvP}}|
 +
        {{#if: {{#pos:{{#var:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}}|WvW}}|
 +
            <!-- all three game mode, clear the suffix-->{{#vardefine:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}} }} }} }}
 +
|<!-- either new skill or split skill with different recharge -->{{#vardefine:last_recharge|{{#var:this_recharge}}}}
 +
{{!}}- <!-- row count -->{{increment|{{#var:this_context}}{{#var:table_id}}}}
 +
{{!}} {{skill icon|{{{1|}}}}} <span style="color: #808080;">{{#switch: {{{4|}}} | Default = | #default = {{#vardefine:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}|({{{4|}}})}} {{#var_final:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}}} }}</span>
 +
{{!}} style="text-align:right" {{!}} {{{3|}}}
 +
{{!}} style="text-align:center;padding-left:1em;padding-right:1em;" {{!}} &rarr;
 +
{{!}} style="text-align:right" {{!}} {{#if:{{{3|}}}|{{#expr: {{{3|}}} * (100-{{{#userparam|}}})/100}}}}
 +
}}
 +
| <!-- new context, new subheader colspan row -->{{#vardefine:last_context|{{#var:this_context}}}}{{#vardefine:last_recharge|{{#var:this_recharge}}}}<nowiki/>
 +
{{!}}- class="line-top" <!-- row count -->{{increment|{{#var:this_context}}{{#var:table_id}}}}
 +
! rowspan="{{#var_final:{{#var:this_context}}{{#var:table_id}}}}" {{!}} {{#switch: {{#var:this_context}}
 +
| Transform = [[Transform]]
 +
| Healing  = [[Healing skill#{{{profession|}}}|Healing]]
 +
| Utility  = [[Utility skill#{{{profession|}}}|Utility]]
 +
| Elite    = [[Elite skill#{{{profession|}}}|Elite]]
 +
| Trait    = [[List of {{lc:{{{profession|}}}}} traits|Trait]]
 +
| Bundle    = [[Utility skill#{{{profession|}}}|Bundle]]
 +
| Profession mechanic = {{#switch: {{{profession|}}} | Engineer = [[Tool belt]] | #default = [[Profession mechanic|Profession<br>mechanic]]}}  
 +
| #default  = [[{{#var:this_context}}#{{{profession|}}}|{{#var:this_context}}]] <!-- Weapons -->
 +
}}
 +
{{!}} {{skill icon|{{{1|}}}}} <span style="color: #808080;">{{#switch: {{{4|}}} | Default = | #default = {{#vardefine:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}|({{{4|}}})}} {{#var_final:{{#var:this_skill}}{{#var:this_recharge}}{{#var:table_id}}|}} }}</span>
 +
{{!}} style="text-align:right" {{!}} {{{3|}}}
 +
{{!}} style="text-align:center;padding-left:1em;padding-right:1em;" {{!}} &rarr;
 +
{{!}} style="text-align:right" {{!}} {{#if:{{{3|}}}|{{#expr: {{{3|}}} * (100-{{{#userparam|}}})/100}}}}
 +
}}<!-- store this skill for the next row -->{{#vardefine:last_skill|{{#var:this_skill}}}}
 +
}}</includeonly><noinclude>
 +
Result format for {{tl|Recharge table}}.
 +
#Skill
 +
#''Attunement'' AND ''Weapon'' = Is for weapon, ''Bundle'' = Is for bundle, ''Transform'' = Has parent, ''Profession mechanic'' AND ''Slot'' = Has skill context
 +
#Has recharge time
 +
#Is for game mode
 +
#Has skill type
 +
 
 +
[[Category:Skill formatting templates]]
 +
[[Category:Semantic result templates]]</noinclude>

Версия 22:11, 6 августа 2020

Result format for {{Recharge table}}.

  1. Skill
  2. Attunement AND Weapon = Is for weapon, Bundle = Is for bundle, Transform = Has parent, Profession mechanic AND Slot = Has skill context
  3. Has recharge time
  4. Is for game mode
  5. Has skill type