Editing Template:DM Fusion Material2/for row

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.

Latest revision Your text
Line 4: Line 4:
 
   <td>{{ #ask: [[Has subobject::{{{1}}}]] |?Reference name= | mainlabel=- | limit = 1 }}</td>
 
   <td>{{ #ask: [[Has subobject::{{{1}}}]] |?Reference name= | mainlabel=- | limit = 1 }}</td>
  
   <!-- The cards this card can fuse with to produce the aforementioned Fusion Monster
+
   <!-- The cards this card can fuse with to produce the aforementioned Fusion Monster -->
    * Double replace is necessary to convert underscores to be spaces
+
  <td><!--
    * There can be multiple columns with multiple cards in each
+
* Store in an array, so we can count the number of cards to determine how many columns to use.
  -->{{ #ask: [[Fuses with::{{ #replace: {{ #replace: {{{1}}} | _ | * * }} | * }}]]
+
* Double #replace is necessary to replace underscores with spaces.
   | ?Fusion Material.Reference name
+
* Change separator from "," to "*" to avoid problems with cards with commas in their name
   | format    = template
+
-->{{ #arraydefine: $fuses_with_cards
   | template  = DM Fusion Material2/for row/cell
+
| {{ #ask: [[Fuses with::{{ #replace: {{ #replace: {{{1}}} | _ | * * }} | * }}]]
 +
   | ?Fusion Material.Reference name=
 +
  | class    = compact
 +
   | format    = plainlist
 +
   | headers  = hide
 
   | mainlabel = -
 
   | mainlabel = -
 
   | sep      =  
 
   | sep      =  
Line 16: Line 20:
 
*
 
*
 
   }}
 
   }}
 +
| *
 +
}}<!--
 +
-->{{ #arrayunique: $fuses_with_cards }}<!--
 +
 +
-->{{ #vardefine: $column_count
 +
| {{ #ifexpr: {{ #arraysize: $fuses_with_cards }} >= 100
 +
  | 4
 +
  | {{ #ifexpr: {{ #arraysize: $fuses_with_cards }} >= 30
 +
    | 3
 +
      | {{ #ifexpr: {{ #arraysize: $fuses_with_cards }} >= 20
 +
      | 2
 +
      }}
 +
    }}
 +
  }}
 +
}}<!--
 +
 +
-->{{ #if: {{ #var: $column_count }} | <div style="column-width: 13em; column-count: {{ #var: $column_count }};"> }}
 +
* {{ #arrayprint: $fuses_with_cards
 +
| &#32;
 +
*
 +
| $fuses_with_card
 +
| $fuses_with_card
 +
}}
 +
{{ #if: {{ #var: $column_count }} | </div> }}
 +
</td>
 
</tr>
 
</tr>
 
</includeonly>
 
</includeonly>

Please note that all contributions to Yugipedia are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International License (see Yugipedia:Licensing for more details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)
Preview page with this template
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template