\ProvidesPackage{character}

\RequirePackage{sheets}
\renewcommand\sheetname{Character Sheet}
\renewcommand\docharnamehere{} % Don't stick char name in top corner.

% get extraction magic
\RequirePackage{charextracts}

% a not-particularly-magic part of extraction; feel free to change this
%
\newdef\note[1]{\space\space\emph{#1}}
\newdef\pageof[1]{(a page of) #1}


% \saystats can be called in the charsheet to list all the stats;
% it takes advantage of some magic in game.cls that gets invoked
% when custom.sty calls \usestats:  \stat@count is a counter stats
% look at, \stat@total@count is the number of stats you have,
% \get@array{stat-long, stat-short}{n} is set up to give the long/short
% names of the nth stat, and \get@stat gets the value of the \stat@count'th
% stat for character \me.
%
% Feel free to play with the presentation style, but test 
% that what you've done works.
%
\newdef\saystats{%
  \stat@count=0\relax
  \begin{tightlist}
    \loop \ifnum\stat@count<\stat@total@count
      \item \get@array{stat-long}{\the\stat@count}
            (\get@array{stat-short}{\the\stat@count}):
            \get@stat
      \advance\stat@count by 1\relax
    \repeat
  \end{tightlist}
}


% Define the things that get extracted charsheets to make char packets;
% see [various html docs].
%
% The base Template extractables should serve as good examples.
%
% To add a tex-type extractable, use
%% \tex@extract{field name}{packages}
% where ``field name'' is what goes in ``\begin{extractable}{field name}''
% and ``packages'' is whatever gets the styles you need, typically 
% things like ``\usepackage{foo}'' or ``\usepackage[red,blue]{foo,bar}.''
%
% To add a list-type extractable, use
%% \list@extract{field name}
% where ``field name'' is the same as above.
% Since list-type's are latex'ed by themselves, you don't give packages here.
%
% In either case, you should then define any core macro(s) used by that
% extractable to DTRT in charsheets (usually tex-types will have these;
% list-types will usually just build on \listsheet).
% If you have a centralized list of macros for the extractable, \input it.

\tex@extract{Abilities}{\usepackage{abilities}}
\newdef\ability[3]{#1}
\input Lists/abilities.tex

\list@extract{Bluesheets}
\input Lists/bluesheets.tex

% comment out or remove this section if not using Cinematic Combat
\tex@extract{Combat Cards}{\usepackage{combatcards}}
\newdef\combatcard[6]{#3}
\input Lists/combatcards.tex

\list@extract{Greensheets}
\input Lists/greensheets.tex

% un-comment this section if you want Ingestible extractables
%\tex@extract{Ingestibles}{\usepackage{ingestible}}
%\newdef\ingestpacket[3]{#1}
%\newdef\ingestfold[3]{#1}
%\input Lists/ingestibles.tex

\tex@extract{Items}{\usepackage{items}}
\newdef\specialitem[4]{#1}
\input Lists/items.tex

\tex@extract{Memory Packets}{\usepackage{memory}}
\newdef\mempacket[2]{#1}
\newdef\memfold[2]{#1}

\tex@extract{Money}{\usepackage{money}}
\newdef\cash[1]{\$#1}  % change the prefix if you're not using dollars

\list@extract{Whitesheets}
\input Lists/whitesheets.tex


\input Lists/suites.tex
