\documentclass[a4paper,10pt,landscape]{article}
\usepackage[empty,cm]{fullpage}
\usepackage[latin1]{inputenc}
\usepackage[italian,english]{babel}
\usepackage[OT1]{fontenc}
\usepackage{pgfkeys}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\usetikzlibrary{shapes.multipart}

%%%% fullpage
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\footskip}{0pt}
\setlength{\textwidth}{\paperwidth}
\setlength{\oddsidemargin}{-2.68cm}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textheight}{1.1\paperheight}
\setlength{\topmargin}{0pt}
\addtolength{\topmargin}{-2.68cm}
\addtolength{\oddsidemargin}{0.45cm} % per centrare le etichette
\addtolength{\evensidemargin}{0.45cm} % per centrare le etichette
%%%%
\setlength{\parindent}{0pt}

%%%%
\newlength{\etichettawidth}
\setlength{\etichettawidth}{4.8cm}
\newlength{\etichettaheight}
\setlength{\etichettaheight}{7cm}

\newcounter{lvl}

%\fontseries{c}\fontshape{sc}

\tikzstyle{carta}=[rectangle,minimum width=4.8cm,minimum height=7cm,inner sep=0pt,outer sep=0,use as bounding box]

\tikzstyle{prep label}=[rectangle,draw,ultra thin,minimum height=0.05\etichettaheight,text=yellow!10!black,outer sep=0pt,
                        inner xsep=0.1em,inner ysep=0.293em,font={\it\tiny},align=left,text width=0.32\etichettawidth]

\tikzstyle{spells}=[rectangle,anchor=center,minimum width=1.5cm,minimum height=5mm,font={\footnotesize},text=#1]

\tikzstyle{ranges}=[anchor=south,rectangle split,rectangle split parts=2,rectangle split part align=center,%
                    /pgf/number format/int detect,font={\sffamily\footnotesize},text=red!70!blue!90!yellow,]

\newcommand{\preptext}[1]{%
  \node [anchor=north west,prep label] (prep) at  #1
      {\ Prep:};

  \node [anchor=north,prep label] at (prep.south)
      {\ Used:};
}

\newcommand{\prepcard}{%
  %
  \node[carta] (card) {};
  %
  \foreach \x in {0,1,2}
    \foreach \y in {0,...,8}
    {
      \preptext{($(card.north west)+0.3333*(\x*\etichettawidth,0)+0.1*(0,-\y*\etichettaheight)+0.05*(0,-\etichettaheight)$)}
    }
  %
  \draw[white,thick] (card.north west) rectangle (card.south east);
  %
}

\newcommand{\printRoman}[1]{
  \ifnum \value{lvl} = 0
    \textsc{#1}
  \else
    \Roman{lvl}
  \fi
}

\newcommand{\closerange}[1]{
  \pgfmathparse{25+5*floor(#1/2)}
  \pgfmathprintnumber{\pgfmathresult}
}
%
\newcommand{\mediumrange}[1]{
  \pgfmathparse{100+(10*#1)}
  \pgfmathprintnumber{\pgfmathresult}
}
\newcommand{\longrange}[1]{
  \pgfmathparse{400+(40*#1)}
  \pgfmathprintnumber{\pgfmathresult}
}

\newcommand{\mydepth}{\rule[-0.2em]{0pt}{1mm}}

\newcommand{\spellatlvl}[6]{%
  \setcounter{lvl}{#1}
  \path #2
        node[spells=red!#5!black] {\printRoman{#6}}
        ++(1.5cm,0)
        node[spells=green!75!black!#5!black] {#3}
        ++(1.5cm,0)
        node[spells=blue!#5!black] {\pgfmathprintnumber{#4}};
}

\newcommand{\spellscard}[4]{% takes rel ability bonus, castel lvl, a list of 10 spells_per_day, and name of 0 lvl spells
\begin{scope}
  %
  \node[carta] (card) {};
  % titles
  \path (card.north west) ++(0.9cm,-0.5cm)
        node[spells=blue!80!green!75!black,font={\scshape\footnotesize}] (lvltl) {Level}
        ++(1.5cm,0) 
        node[spells=blue!80!green!75!black,font={\scshape\footnotesize}]         {Per day}
        ++(1.5cm,0)
        node[spells=blue!80!green!75!black,font={\scshape\footnotesize}]         {ST DC};
  % spells
  \foreach \n [count=\x from 0,evaluate=\x as \dc using 10+#1+\x,evaluate=\x as \shd using 85-7*\x,/pgf/number format/int detect] in #3
  {
    \spellatlvl{\x}{($(lvltl.center)-(0,4.5mm+\x*5mm)$)}{\n}{\dc}{\shd}{#4}
  }
  % ranges
  \path (card.south -| lvltl.center) ++(0,1.5mm)
        node[ranges] (close)
            {Close:\mydepth\nodepart{two}\closerange{#2} ft.\mydepth}
        ++(1.5cm,0)
        node[ranges] (medium)
            {Medium:\mydepth\nodepart{two}\mediumrange{#2} ft.\mydepth}
        ++(1.5cm,0)
        node[ranges] (long)
            {Long:\mydepth\nodepart{two}\longrange{#2} ft.\mydepth};
  %
  \draw[thin,green!20!black] (close.north) ++(2mm,1pt) -- ++(1.1cm,0) ++(4mm,0) -- ++(1.1cm,0);
  %
  % \draw[red,thin] (card.north west) rectangle (card.south east);
  %
\end{scope}
}

\begin{document}
%
\begin{tikzpicture}
\matrix[ampersand replacement=\&] {
  % Necrist current
  \spellscard{4}{12}{{6,4+1+1,4+1+1,3+1+1,3+1+1,2+0+1,-,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
  % Necrist next
  \spellscard{4}{13}{{6,5+1+1,4+1+1,4+1+1,3+1+1,2+0+1,1+0+1,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
  % Necrist plus
  \spellscard{5}{13}{{6,5+1+1,4+1+1,4+1+1,3+1+1,2+0+1,1+0+1,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
};
%
\end{tikzpicture}
\pagebreak

\begin{tikzpicture}
\matrix[ampersand replacement=\&] {
  % Ariel current
  \spellscard{4}{9}{{6,4+1+1,4+1+1,3+1+1,2+1+1,1+0+1,-,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
  % Ariel next
  \spellscard{4}{10}{{6,4+1+1,4+1+1,3+1+1,3+1+1,2+0+1,-,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
  % Ariel plus
  \spellscard{5}{10}{{6,4+1+1,4+1+1,3+1+1,3+1+1,2+0+1,-,-,-,-}}{Orisons}\&
  %
  \prepcard\&\prepcard\&\prepcard\&\prepcard\&
  \prepcard\\
};
%
\end{tikzpicture}
%
\end{document}
