Difference between revisions of "Template:Game"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
</div><!-- | </div><!-- | ||
+ | Variables transformations | ||
+ | -->{{#vardefine:team1|{{#ifeq:{{{team1|}}}||TBD|{{#ifeq:{{{team1|}}}| |TBD|{{#explode:{{#explode:{{Team/{{{team1|}}}}}|link=|1}}|]]|0}} }}}}}}<!-- | ||
+ | -->{{#vardefine:team2|{{#ifeq:{{{team2|}}}||TBD|{{#ifeq:{{{team2|}}}| |TBD|{{#explode:{{#explode:{{Team/{{{team2|}}}}}|link=|1}}|]]|0}} }}}}}}<!-- | ||
+ | -->{{#vardefine:map_name|{{#if:{{{map|}}}}}}}<!-- | ||
Storage of score in variables (later in SMW) | Storage of score in variables (later in SMW) | ||
− | -->{{#switch:{{{win|}}} | + | --> |
+ | {{#switch:{{{win|}}} | ||
|1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }} | |1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }} | ||
|2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }} | |2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }} | ||
− | | }} | + | | }} |
− | + | {{#subobject:{{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:map_name|TBD}} | |
− | {{ | + | |has match ={{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:match_number|TBD}} |
− | </noinclude> | + | |Has map ={{#var:map_name|TBD}} |
+ | }}{{#vardefine:games1|0}}{{#vardefine:games2|0}}{{#vardefine:finished|false}}</includeonly><noinclude>{{documentation}}[[Category:Source Liquipedia]]</noinclude> | ||
+ | </includeonly> |