\ProvidesPackage{items}

\RequirePackage{extractable}
\RequirePackage[mirror]{cards}

\newcommand\@transfer{Freely Transferable}
\newcommand\card@type{Item Card}

\newdimen\item@width
\newdimen\item@height


% We'll put the item in an \fbox to get \fboxsep margins, but
% we'll leave the visible frame to cards.sty, so this one is zero-width.
% Inside that we'll put a \vbox for vertically stacking things.

\fboxsep=.25in
\fboxrule=0pt
\item@width=3.0in    % total width  = this + twice \fboxsep
\item@height=1.75in  % total height = this + twice \fboxsep

% Center all text
\centering

% Some items have a little note on the side, ``Unstashable'' or ``Bulky.''
% We'll be putting that note in a box later to measure it.
\newbox\note@box
\newdimen\note@dim

% This will be called by the \fooitem commands defined in Lists/items.tex.
% Takes item name, item number, description, special note.
\newdef\specialitem[4]{\makecard{%
  % the note will go on the side, rotated and framed
  \def\item@note{#4}%
  \setbox\note@box=\hbox{\fboxsep=2pt \fboxrule=0pt % invisible margin frame
    \fbox{\fboxrule=.5pt \rotatebox{90}{\fbox{\item@note}}}%
  }%
  \note@dim=\item@height
  \advance\note@dim by \ht\note@box
  \advance\note@dim by \dp\note@box
  \advance\note@dim by -\fboxsep
  \fbox{%
    \vbox to \item@height{\hsize=\item@width
      \card@type \hfill \@transfer
      \ifx\item@note\empty \else       % note, if it's not empty, goes here
      \rlap{\smash{\lower.5\note@dim\box\note@box}}%
      \fi
      \break \vfil
      {\large #1} \break \vfil   % item name
      {\large #2} \break \vfil   % item num
      {\small #3} \break \vfil   % item desc
      \gamename \hfill \gamedate
    }%
  }%
}}


% now suck up the defs of standard item macros and of standard items
\input Lists/items.tex
