%- include('../../functions') -%>
<%
var
card_url = "http://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[%22CARD-NAME%22]",
detail_url = "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=",
image_url = "/images/magic/commanders/",
deck = page.deck || {},
info = deck.info || {},
cards = deck.cards || [],
lands = deck.lands || [],
changes = deck.changes || [],
starting_lands = info.starting_lands || [],
commander = info.commander && info.commander_id ?
"
" + info.commander +
" (Commander)" :
"",
commander_img = info.commander && info.commander_img ?
"":
""
;
-%>
Below is my <%= info.name %> deck for Magic: the Gathering
(<%= info.format %> format).
It was last updated on <%= info.date_upd %>.
Each card listed below is linked to its entry on The Gatherer
(the official MtG card database) and should open in a new window or tab in
your browser.
Decklist
<%- commander_img %>
<%- commander %>
<% cards.forEach(function(card) { %>
- <%= card %>
<% }) %>
<% lands.forEach(function(land) { %>
- <%= land.type %> (x<%=land.count%>)
<% }) %>
<% if (starting_lands && starting_lands.length > 0) { %>
Starting Lands
In order to speed our games along, my gaming group allows everyone to start with 3 basic lands.
The lands listed below are included in the counts above.
<% starting_lands.forEach(function(land) { %>
<% if (typeof land === 'string') { %>
- <%= land %>
<% } else {%>
-
<%= land.type %> (x<%=land.count%>)
<% } %>
<% }) %>
<% } %>
<% if (changes && changes.length > 0) { %>
Changes from Previous Versions
<% changes.forEach(function(change) { %>
-
Implemented <%= change.date_upd %>:
<% if (change.adds) { %>
<% change.adds.forEach(function(add) { %>
- <%= add %> (added)
<% }) %>
<% } %>
<% if (change.dels) { %>
<% change.dels.forEach(function(del) { %>
- <%= del %> (removed)
<% }) %>
<% } %>
<% }) %>
<% } %>
<%- content %>