155 lines
6.7 KiB
TeX
155 lines
6.7 KiB
TeX
\LoadClass{standalone}
|
|
|
|
\ProvidesClass{iditacard}[2017/05/12 Class for Iditacard cards]
|
|
|
|
\RequirePackage{fontspec}
|
|
\RequirePackage{xcolor}
|
|
\RequirePackage{xstring}
|
|
|
|
\RequirePackage[none]{hyphenat}
|
|
|
|
\RequirePackage{tikz}
|
|
\usetikzlibrary{positioning,shapes,shadows,arrows,backgrounds,fit}
|
|
\RequirePackage{pgfplots}
|
|
\RequirePackage{shapepar}
|
|
\RequirePackage{microtype}
|
|
\RequirePackage{mathtools}
|
|
\let\mttext\text
|
|
|
|
\graphicspath{{images/}}
|
|
|
|
\newfontfamily\bebas{Bebas Neue Regular}
|
|
\newfontfamily\alegreya{Alegreya}
|
|
|
|
\definecolor{energy}{HTML}{003FFF}
|
|
\definecolor{health}{HTML}{FF0000}
|
|
\definecolor{risk}{HTML}{000000}
|
|
|
|
% Card Type
|
|
\definecolor{utility}{HTML}{FFFFFF}
|
|
\definecolor{attachment}{HTML}{5FAFCF}
|
|
\definecolor{dog}{HTML}{BF9F7F}
|
|
\definecolor{stretch}{HTML}{9F9F9F}
|
|
\definecolor{personal}{HTML}{AF5FCF}
|
|
\definecolor{movement}{HTML}{7F7FDF}
|
|
\definecolor{damage}{HTML}{FF6F6F}
|
|
\definecolor{sled}{HTML}{7FDF7F}
|
|
\definecolor{food}{HTML}{CFCF4F}
|
|
|
|
% Rarity
|
|
\definecolor{info}{HTML}{FFFFFF}
|
|
\definecolor{starting}{HTML}{777777}
|
|
\definecolor{common}{HTML}{000000}
|
|
\definecolor{rare}{HTML}{000077}
|
|
\definecolor{epic}{HTML}{007700}
|
|
\definecolor{legendary}{HTML}{770077}
|
|
|
|
\newcommand{\cardtype}[1]{\newcommand{\backgroundcolor}{#1}}
|
|
\newcommand{\rarity}[1]{\newcommand{\edgecolor}{#1}}
|
|
\newcommand{\deck}[1]{\newcommand{\whichdeck}{#1}}
|
|
|
|
\newcommand{\energy}[1]{%
|
|
\node [minimum width=0.5in, minimum height=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0,825.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/hand.png}};
|
|
\StrLen{#1}[\arglen]
|
|
\ifnum\arglen>1%
|
|
\node [text=black, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0,825.0/300.0) {\bf\fontsize{14}{14}\bebas #1};%
|
|
\else
|
|
\node [text=black, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0,825.0/300.0) {\bf\fontsize{25}{30}\bebas #1};%
|
|
\fi
|
|
}
|
|
|
|
\newcommand{\health}[1]{%
|
|
\node [minimum width=0.5in, minimum height=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0,700.0/300.0) {\includegraphics[width=0.5in, height=0.5in]{icons/deck.png}};
|
|
\StrLen{#1}[\arglen]
|
|
\ifnum\arglen>1%
|
|
\node [text=black, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0, 700.0/300.0) {\bf\fontsize{14}{14}\bebas #1};%
|
|
\else
|
|
\node [text=black, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0, 700.0/300.0) {\bf\fontsize{25}{30}\bebas #1};%
|
|
\fi
|
|
}
|
|
|
|
\newcommand{\risk}[1]{%
|
|
\node [minimum width=0.5in, minimum height=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0, 538.0/300.0) {\includegraphics[width=0.5in, height=0.5in]{icons/risk.png}};
|
|
\StrLen{#1}[\arglen]
|
|
\ifnum\arglen>1%
|
|
\node [text=white, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0, 538.0/300.0) {\bf\fontsize{14}{14}\bebas #1};%
|
|
\else
|
|
\node [text=white, minimum width=0.5in, minimum height=0.5in, text centered, text width=0.5in, anchor=center, inner sep=0mm] at (125.0/300.0, 538.0/300.0) {\bf\fontsize{25}{30}\bebas #1};%
|
|
\fi
|
|
}
|
|
|
|
\newcommand{\name}[1]{%
|
|
\node [rectangle, anchor=north, minimum width=2.15in, minimum height=2.0/3.0in, text centered, text width=1.833333in, inner sep=0mm] at (375.0/300.0,975.0/300.0) {\bf\fontsize{20}{30}\bebas#1\par};
|
|
}
|
|
|
|
\renewcommand{\text}[1]{%
|
|
\node [rectangle, minimum width=1.833333in, minimum height=200.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north] at (375.0/300.0,450.0/300) {\fontsize{16}{16}\bebas#1\par};
|
|
}
|
|
|
|
\newcommand{\helptext}[1]{%
|
|
\node [rectangle, minimum width=1.833333in, minimum height=200.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north] at (375.0/300.0, 800.0/300.0) {\fontsize{16}{16}\bebas#1\par};
|
|
}
|
|
|
|
\newcommand{\flava}[1]{%
|
|
\node [rectangle, minimum width=1.833333in, minimum height=100.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north] at (375.0/300.0,150.0/300.0) {\fontsize{6}{6}\alegreya"#1"\par};
|
|
}
|
|
|
|
\newcommand{\type}[1]{%
|
|
\node [rectangle, minimum width=1.833333in, minimum height=100.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north] at (375.0/300.0,100.0/300.0) {\fontsize{12}{12}\bebas#1\par};
|
|
}
|
|
|
|
% Aspect ratio of about 3:2
|
|
\newcommand{\art}[1]{%
|
|
\node [rectangle, minimum width=649.8/300.0, minimum height=425.0/300.0, inner sep=0, anchor=north west] at (49.2/300.0, 888.0/300.0) {\noindent\includegraphics*[width=2.1664in, height=1.416667in]{#1}};
|
|
}
|
|
|
|
\newcommand{\useicon}[1]{\raisebox{-0.1em}{\includegraphics[height=1em]{icons/#1.png}}}
|
|
|
|
% Arguments are: Baseline, Text Xcm, Text Ycm, iconfile, amount
|
|
\newcommand{\texticon}[5]{%
|
|
\begin{tikzpicture}[baseline=#1,x=1cm,y=1cm]
|
|
\node[centered, minimum width=0pt, text width=1cm, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=1cm,height=1.6cm]{icons/#4.png}};
|
|
\node[centered, minimum width=0pt, text width=0.6cm, inner sep=0pt, outer sep=0pt] at (#2,#3) {#5};
|
|
\end{tikzpicture}%
|
|
}
|
|
|
|
% Effects (%-- indicates should have icon)
|
|
\newcommand{\daydraw}[1]{\texticon{-0.4cm}{0}{-0.2}{daydraw}{#1}}
|
|
\newcommand{\draw}[1]{\texticon{-0.28cm}{-0.1}{-0.08}{draw}{#1}}
|
|
\newcommand{\supply}[1]{\texticon{-0.4cm}{0}{-0.2}{supply}{#1}}
|
|
\newcommand{\take}[1]{\texticon{-0.4cm}{0}{-0.2}{take}{#1}}
|
|
\newcommand{\see}[1]{\texticon{-0.4cm}{0}{-0.2}{see}{#1}}
|
|
\newcommand{\destroy}[1]{\texticon{-0.4cm}{0}{-0.2}{destroy}{#1}}
|
|
\newcommand{\speed}[1]{\raisebox{-0.1em}{\includegraphics[height=1em]{icons/speed.png}} #1}
|
|
\newcommand{\move}[1]{\raisebox{-0.1em}{\includegraphics[height=1em]{icons/move.png}} #1}
|
|
|
|
\newcommand{\discardonkill}{Discarded when killed}
|
|
\newcommand{\inplayatstart}{Play when the game starts}
|
|
\newcommand{\immortal}{Cannot Die}
|
|
\newcommand{\safepass}{Passing does not incur damage}
|
|
\newcommand{\passdie}{Dies when passing}
|
|
\newcommand{\nohold}{Cannot hold attachments}
|
|
\newcommand{\nostarvation}{Remove your \useicon{starve}}
|
|
\newcommand{\nohypothermia}{Remove your \useicon{hypo}}
|
|
\newcommand{\damage}[1]{Take #1 damage}
|
|
\newcommand{\doubledistance}{Double the final distance}
|
|
\newcommand{\damagetext}{Destroy this card \vskip 0.5em When you discard this card, end your turn immediately}
|
|
|
|
\newenvironment{card}
|
|
{% Begin
|
|
\noindent\begin{tikzpicture}[x=1in,y=1in]
|
|
\fill [\edgecolor] (0,0) rectangle (2.5,3.5);
|
|
\fill[rounded corners=10pt] [\backgroundcolor] (50.0/300.0,50.0/300.0) rectangle (700.0/300.0,1000.0/300.0);
|
|
\node at (645.0/300.0,95.0/300.0) {\includegraphics[width=0.25in, height=0.25in]{deck/\whichdeck.png}};
|
|
}
|
|
{% End
|
|
\end{tikzpicture}}
|
|
|
|
\newenvironment{board}
|
|
{% Begin
|
|
\noindent\begin{tikzpicture}[x=1cm,y=1cm]
|
|
%\fill [white] (0,0) rectangle (41.275,26.035);
|
|
}
|
|
{% End
|
|
\end{tikzpicture}}
|