Difference between revisions of "Template:DM Fusion Material2/row"

From Yugipedia
Jump to: navigation, search
(removing underscores)
m (correct parameter name)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
 +
 +
-->{{ #vardefine: $fusion_type | {{ #if: {{{type|}}} | {{{type}}} | Fusion Summon }} }}<!--
  
 
-->{{ #arraydefine: $material_1 | {{{material_1|}}} | * }}{{ #arrayunique: $material_1 }}<!--
 
-->{{ #arraydefine: $material_1 | {{{material_1|}}} | * }}{{ #arrayunique: $material_1 }}<!--
 
-->{{ #arraydefine: $material_2 | {{{material_2|}}} | * }}{{ #arrayunique: $material_2 }}<!--
 
-->{{ #arraydefine: $material_2 | {{{material_2|}}} | * }}{{ #arrayunique: $material_2 }}<!--
 +
-->{{ #arraydefine: $material_3 | {{{material_3|}}} | * }}{{ #arrayunique: $material_3 }}<!--
 +
 +
-->{{ #subobject: {{ #var: $fusion_type }} Material {{{number|}}}.1
 +
| Subobject of    = {{PAGENAME}}
 +
| Fusion type    = {{ #var: $fusion_type }}
 +
| Fusion Material = {{ #invoke: String | replace | source = {{{material_1|}}} | pattern = ^* | plain = false }} |+sep=*
 +
| Fuses with      = {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.2{{ #if: {{{material_3|}}}
 +
  |, {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.3
 +
  }}|+sep=,
 +
}}<!--
  
-->{{ #if: {{ #var: $apply_fm_properties }}
+
-->{{ #subobject: {{ #var: $fusion_type }} Material {{{number|}}}.2
| {{ #subobject: fusion material {{{number|}}}.1
+
| Subobject of    = {{PAGENAME}}
  | Fusion Material = {{ #invoke: String | replace | source = {{{material_1|}}} | pattern = ^* | plain = false }} |+sep=*
+
| Fusion type    = {{ #var: $fusion_type }}
  | Fuses with      = {{PAGENAME}}#fusion material {{{number|}}}.2
+
| Fusion Material = {{ #invoke: String | replace | source = {{{material_2|}}} | pattern = ^* | plain = false }} |+sep=*
   }}<!--
+
| Fuses with      = {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.1{{ #if: {{{material_3|}}}
 +
  |, {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.3
 +
   }}|+sep=,
 +
}}<!--
  
-->{{ #subobject: fusion material {{{number|}}}.2
+
-->{{ #if: {{{material_3|}}}
   | Fusion Material = {{ #invoke: String | replace | source = {{{material_2|}}} | pattern = ^* | plain = false }} |+sep=*
+
| {{ #subobject: {{ #var: $fusion_type }} Material {{{number|}}}.3
   | Fuses with = {{PAGENAME}}#fusion material {{{number|}}}.1
+
  | Subobject of    = {{PAGENAME}}
 +
  | Fusion type    = {{ #var: $fusion_type }}
 +
   | Fusion Material = {{ #invoke: String | replace | source = {{{material_3|}}} | pattern = ^* | plain = false }} |+sep=*
 +
   | Fuses with     = {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.1, {{PAGENAME}}#{{ #var: $fusion_type }} Material {{{number|}}}.2|+sep=,
 
   }}
 
   }}
 
}}<!--
 
}}<!--
Line 30: Line 48:
 
}}
 
}}
 
</td>
 
</td>
 +
 +
{{ #vardefine: $column_count
 +
| {{ #ifexpr: {{ #arraysize: $material_2 }} >= 100
 +
  | 4
 +
  | {{ #ifexpr: {{ #arraysize: $material_2 }} >= 30
 +
    | 3
 +
      | {{ #ifexpr: {{ #arraysize: $material_2 }} >= 20
 +
      | 2
 +
      }}
 +
    }}
 +
  }}
 +
}}
  
 
<td><!--
 
<td><!--
-->{{ #if: {{{columns|}}} | <div style="column-width: 13em; column-count: {{{columns|}}}"> }}
+
-->{{ #if: {{ #var: $column_count }} | <div style="column-width: 13em; column-count: {{ #var: $column_count }};"> }}
 
{{ #arrayprint: $material_2
 
{{ #arrayprint: $material_2
 
|  
 
|  
Line 45: Line 75:
 
   }}
 
   }}
 
}}
 
}}
{{ #if: {{{columns|}}} | </div> }}<!--
+
{{ #if: {{ #var: $column_count }} | </div> }}<!--
 
--></td>
 
--></td>
 +
 +
{{ #if: {{{material_3|}}}
 +
| <td>{{ #arrayprint: $material_3
 +
  |
 +
  | $card
 +
  |&#32;
 +
* {{ #ask: [[$card]]
 +
    |?Card number = Number
 +
    |?English name (linked)
 +
    | format      = template
 +
    | template    = DM1 card/card reference
 +
    | named args  = true
 +
    }}
 +
  }}
 +
</td>
 +
}}
 
</tr>
 
</tr>
 
</includeonly>
 
</includeonly>

Latest revision as of 21:46, 25 December 2018