| 1 |
% \iffalse |
| 2 |
% <*chit> |
| 3 |
% -------------------------------------------------------------------- |
| 4 |
% \fi |
| 5 |
% \subsubsection{Battle markers} |
| 6 |
% |
| 7 |
% Takes 1 arguments - the identifier. |
| 8 |
% |
| 9 |
% Define \spec{every battle marker} to change the style. |
| 10 |
% |
| 11 |
% \begin{macrocode} |
| 12 |
\tikzset{% |
| 13 |
battle marker/.pic={ |
| 14 |
\node[shape=circle, |
| 15 |
font=\sffamily\bfseries, |
| 16 |
inner sep=0pt, |
| 17 |
minimum size=5mm, |
| 18 |
draw=black, |
| 19 |
fill=yellow!85!black, |
| 20 |
every battle marker/.try] at (-.3,.3) {% |
| 21 |
\ifnum#1>0\relax #1\fi% |
| 22 |
}; |
| 23 |
}, |
| 24 |
battle marker/.style={ |
| 25 |
chit={full={battle marker=#1},frame={draw=none}}}, |
| 26 |
} |
| 27 |
% \end{macrocode} |
| 28 |
% |
| 29 |
% Takes two arguments - the odds and the fill colour. The latter is |
| 30 |
% useful to differentiate the severity of an attack. |
| 31 |
% |
| 32 |
% Define \spec{every odds marker} to change the style. |
| 33 |
% |
| 34 |
% \begin{macrocode} |
| 35 |
\tikzset{% |
| 36 |
pics/odds marker/.style args={#1,#2}{ |
| 37 |
code={ |
| 38 |
\node[shape=circle, |
| 39 |
font=\sffamily\bfseries\large, |
| 40 |
inner sep=0pt, |
| 41 |
minimum size=8mm, |
| 42 |
draw=black, |
| 43 |
fill=#2, |
| 44 |
every odds marker/.try] at (.16,-.16) {#1}; |
| 45 |
} |
| 46 |
}, |
| 47 |
odds marker/.style args={#1,#2}{ |
| 48 |
chit={full={odds marker={#1,#2}},frame={draw=none}}}, |
| 49 |
} |
| 50 |
% \end{macrocode} |
| 51 |
% |
| 52 |
% Takes two arguments - the result and the fill colour. The latter is |
| 53 |
% useful to differentiate the severity of an attack. |
| 54 |
% |
| 55 |
% Define \spec{every result marker} to change the style. |
| 56 |
% |
| 57 |
% \begin{macrocode} |
| 58 |
\tikzset{ |
| 59 |
pics/result marker/.style args={#1,#2}{ |
| 60 |
code={ |
| 61 |
\chit@dbg{3}{Results marker #1 (#2)} |
| 62 |
\node[shape=circle, |
| 63 |
font=\sffamily\bfseries\large, |
| 64 |
inner sep=0pt, |
| 65 |
minimum size=8mm, |
| 66 |
draw=black, |
| 67 |
fill=#2, |
| 68 |
every result marker/.try] at (0,0) {#1};}}, |
| 69 |
result marker/.style args={#1,#2}{ |
| 70 |
chit={full={result marker={#1,#2}},frame={draw=none}}} |
| 71 |
} |
| 72 |
% \end{macrocode} |
| 73 |
% |
| 74 |
% \iffalse |
| 75 |
% </chit> |
| 76 |
% -------------------------------------------------------------------- |
| 77 |
% \fi |