|
|
Строка 1: |
Строка 1: |
− | <includeonly>{{#if:<!-- Hide new lines --> | + | <includeonly>{{#ifeq: {{lc:{{#show: {{{1}}} | ?Has achievement group }} }} | historical | <span style="color: #808080;"> }}<!-- |
− | {{#vardefine:tier_count|0}} <!-- Set to zero --> | + | -->{{#if: {{{2|}}} | [[{{{2}}}|20px|link={{{1}}}]] {{cname|{{{1}}}}}: | {{cname|{{{1}}}}}: }} [[{{#ifeq: {{{1}}} | {{{4}}} | {{{3}}} | {{{4}}} }}|{{{5}}}]] {{#if: {{{6|}}} | — ''{{{6}}}'' | {{#if: {{{7|}}} | — ''{{{7}}}'' }} }}(<!-- |
− | {{#vardefine:tier_total|0}} <!-- Set to zero --> | + | -->{{ap |
− | {{parse tier|{{{9|}}}}} <!-- Identical to tier_total, except adds total to #var:table_tier_total for the query -->
| + | | {{#if: {{{8|}}} |
− | {{#if: {{{15|}}} |
| + | | {{#expr: {{#arraymap: {{{8|}}} | ~ | @@@ | {{#explode:@@@|;|-1}} | +}} }} |
− | {{#vardefine:mastery_total|{{#expr:{{#var:mastery_total|0}}+1}}}}<!-- Adds to count for masteries if contributes -->
| + | | 0 |
− | {{#if: {{#var:mastery_type}}
| + | }} |
− | | {{#ifeq: {{#var:mastery_type}} | {{{15}}} | <!-- do nothing if SET and EQUAL --> | <!-- if SET and not EQUAL -->{{#vardefine:mastery_type|Default}} }}
| + | }}<!-- |
− | | <!-- if not SET -->{{#vardefine:mastery_type|{{{15}}}}}
| + | -->{{#if: {{{9|}}} | [[File:Mastery point ({{{9}}}).png|16px|link=Mastery point|{{{9}}} mastery point]] }}<!-- |
− | }}
| + | -->{{#ifeq: {{lc:{{{10|}}}}} | repeatable | [[File:Tango repeatable event.png|16px|link=|Repeatable {{#if: {{{11|}}} | (AP is capped at {{{11}}}) }}]] }}<!-- |
− | }}
| + | -->{{#if: {{{12|}}} | [[File:Chest icon.png|16px|link={{{12}}}|{{{12}}} {{#if: {{{13|}}} | {{#ifexpr: {{{13|1}}}>1 | (x{{{13}}}) }} }}]] }}<!-- |
− | }}
| + | -->{{#if: {{{14|}}} | [[File:Title icon.png|16px|link=Title|Title: {{{14}}}]] }})<!-- |
− | {{#arraymap:{{{9|}}}|~|@@@| | + | -->{{#ifeq: {{lc:{{#show: {{{1}}} | ?Has achievement group }} }} | historical | (Historical)</span> }}</includeonly><noinclude> |
− | {{#vardefine:tier_count|{{#expr:{{#var:tier_count}} + 1}}}} <!-- Array size -->
| |
− | {{#vardefine:tier_total|{{#expr:{{#var:tier_total}}{{#if:{{#explode:@@@|;|1}}|+{{#replace:{{#explode:@@@|;|1}}|?|0}} }} }}}} <!-- Array sum -->
| |
− | |}}
| |
− | |- class="line line-top achievement-row" title="{{{16|}}}" data-id="{{{16|}}}"
| |
− | ! style="text-align:left" | {{#ifeq:{{{3|}}}|repeatable|[[File:Tango repeatable event.png|20px|link=Achievement|This achievement is repeatable.]]}} {{#ifeq:{{#explode:{{{12}}}|#}}| {{PAGENAME}} | [[{{{1}}}{{!}}<span style="font-weight:bold">{{{2}}}</span>]] | [[{{{12}}}{{!}}<span style="font-weight:bold">{{{2}}}</span>]] }} <!-- Don't link if on the achievement page -->
| |
− | ! style="text-align: left" | {{#if:{{{10|}}}|[[{{{14}}}|20px|link={{{10}}}]] {{cname|{{{10}}}}}}}
| |
− | ! style="text-align: right; vertical-align: top;" | {{#if: {{{15|}}} | {{mastery point|1|region={{{15}}}}} }} {{ap|{{#var:tier_total}}}}
| |
− | |- | |
− | | rowspan="{{#ifexpr:{{#var:tier_count|}}<7|{{#ifexpr:{{#var:tier_count|0}}<1|1|{{#var:tier_count}}}}|5}}" style="background: white; vertical-align: top; min-width: 530px;" | {{{4|}}}{{#if:{{{11|}}}|
| |
− | <span style="color: #686868; display: block;">''{{{11}}}''</span>
| |
− | }}{{#if: {{{5|}}}|
| |
− | :'''Prerequisite:''' {{{5|}}} | |
− | }}{{#if: {{{13|}}}|
| |
− | :'''Unlock Item:''' {{item icon|{{{13}}}}}
| |
− | }}{{#if:{{{8|}}}|
| |
− | :'''Title:''' [[File:Title icon.png|20px|link=Title]] {{{8}}}
| |
− | }}{{#if:{{{6|}}}|
| |
− | :'''Reward:''' {{#if:{{{7|}}}|{{#ifexpr:{{{7}}} > 1|{{{7}}} }}}}{{item icon|{{{6}}}}}
| |
− | }}<!-- Here tiers starts --> | |
− | {{#ifexpr:{{#var:tier_count}}<7|{{#arraymap:{{{9|}}}|~|@@@|{{!}} style="width: 220px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}} | |
− | {{!}} style="width: 100px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}| \n{{!}}-\n }}|{{#vardefine:tier_counter|1}}{{#arraymap:{{{9|}}}|~|@@@|{{#switch: {{#var:tier_counter}} | |
− | | 5 = {{!}} colspan="2" {{!}} | |
− | {{{!}} {{STDT|mech1}} class="expandable" style="width: 100%;" | |
− | {{!}} colspan="2" {{!}} Show more tiers
| |
− | {{!}}-
| |
− | {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
| |
− | {{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}
| |
− | | {{#var:tier_count}} = {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}} | |
− | {{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}
| |
− | {{!}}}
| |
− | | #default = {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
| |
− | {{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}} }} | \n{{!}}-\n }}
| |
− | }}</includeonly><noinclude> | |
| | | |
− | This is a semantic result template for use in {{tl|achievement list}} and {{tl|achievement}}. This template mimics the design for {{tl|Achievement table row}}, while also displaying the achievement category. The input parameters generated by the semantic query are: | + | This is a semantic result template for use in {{tl|achievement}}. It's designed to be a non-obtrusive alternative to {{tl|achievement box}}, for use in "Related achievements" sections. The input parameters generated by the semantic query are: |
− | #subobject | + | #Has achievement category |
| + | #Has game icon |
| + | #Link to this achievement's entry on category page |
| + | #Has achievement page |
| #Has canonical name | | #Has canonical name |
| + | #Has game description |
| + | #Has flavor text |
| + | #Has achievement tiers |
| + | #Gives mastery track region point |
| #Has achievement type | | #Has achievement type |
− | #Has game description | + | #Has AP cap |
− | #Has prerequisite
| |
| #Gives item | | #Gives item |
| #Gives item quantity | | #Gives item quantity |
| #Gives title | | #Gives title |
− | #Has achievement tiers
| |
− | #Has achievement category
| |
− | #Has flavor text
| |
− | #Has achievement page
| |
− | #Has unlock item
| |
− | #Has game icon
| |
− | #Gives mastery track region point
| |
− | #Has game id
| |
| | | |
| [[Category:Achievement formatting templates]] | | [[Category:Achievement formatting templates]] |
| [[Category:Semantic result templates]] | | [[Category:Semantic result templates]] |
| </noinclude> | | </noinclude> |