<% if (typeof card !== 'undefined') { var release_map = { 's01c': 'Clash of the Gods', 's01n': 'Nemesis', 's01p': 'Promos (Set 01)', 's01r': 'Cthulhu Rises', }; %>
Card image for <%=card.name%>
Name
<%= card.name %>
Number
<%= card.num.toUpperCase() %>
Release
<%- release_map[card.num.toLowerCase().substr(0,3)] %>
<% if (card.culture !== '') { %>
Pantheon
<%= card.culture %>
<% } %> <% if (card.race.indexOf(' ') !== -1) { %>
Races
<%= card.race %>
<% } else if (card.race !== '') { %>
Race
<%= card.race %>
<% } %> <% if (card.type.indexOf(' ') !== -1) { %>
Types
<%= card.type %>
<% } else if (card.type !== '') { %>
Type
<%= card.type %>
<% } %> <% if (card.element.indexOf(' ') !== -1) { %>
Elements
<% card.element.split(/\s+/).forEach(function(el) { %> <%= el %> <% }); %>
<% } else if (card.element !== '') { %>
Element
<%= card.element %>
<% } %> <% if (card.attack !== '') { %>
Attack
<%= card.attack %>
<% } %> <% if (card.defense !== '') { %>
Defense
<%= card.defense %>
<% } %> <% if (card.power !== '') { %>
Power
<%= card.power %>
<% } %>
Image
<%= card.credit %>
<% if (card.ability_name !== '') { %>
Ability
<%- card.ability_name %>
<%- card.ability_text .replace(/EMPOWER/g, 'Empower') .replace(/{CHAOS}/g, 'Chaos') .replace(/{LAW}/g, 'Law') .replace(/{AIR}/g, 'Air') .replace(/{EARTH}/g, 'Earth') .replace(/{FIRE}/g, 'Fire') .replace(/{WATER}/g, 'Water') .replace(/{OLD_ONES}/g, 'Water') %>
<% } else if (card.ability_text !== ''){ %>
Ability
<%- card.ability_text.replace('EMPOWER', 'Empower') %>
<% } %> <% if (card.flavor !== '') { %>
Flavor
<%- card.flavor %>
<% } %>
Copyright
© <%= card.copyright_year %> <%= card.copyright_owner %>
<% } %>