summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/chit/battle.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wargame/source/chit/battle.dtx')
-rw-r--r--macros/latex/contrib/wargame/source/chit/battle.dtx77
1 files changed, 77 insertions, 0 deletions
diff --git a/macros/latex/contrib/wargame/source/chit/battle.dtx b/macros/latex/contrib/wargame/source/chit/battle.dtx
new file mode 100644
index 0000000000..5057d620a5
--- /dev/null
+++ b/macros/latex/contrib/wargame/source/chit/battle.dtx
@@ -0,0 +1,77 @@
+% \iffalse
+% <*chit>
+% --------------------------------------------------------------------
+% \fi
+% \subsubsection{Battle markers}
+%
+% Takes 1 arguments - the identifier.
+%
+% Define \spec{every battle marker} to change the style.
+%
+% \begin{macrocode}
+\tikzset{%
+ battle marker/.pic={
+ \node[shape=circle,
+ font=\sffamily\bfseries,
+ inner sep=0pt,
+ minimum size=5mm,
+ draw=black,
+ fill=yellow!85!black,
+ every battle marker/.try] at (-.3,.3) {%
+ \ifnum#1>0\relax #1\fi%
+ };
+ },
+ battle marker/.style={
+ chit={full={battle marker=#1},frame={draw=none}}},
+}
+% \end{macrocode}
+%
+% Takes two arguments - the odds and the fill colour. The latter is
+% useful to differentiate the severity of an attack.
+%
+% Define \spec{every odds marker} to change the style.
+%
+% \begin{macrocode}
+\tikzset{%
+ pics/odds marker/.style args={#1,#2}{
+ code={
+ \node[shape=circle,
+ font=\sffamily\bfseries\large,
+ inner sep=0pt,
+ minimum size=8mm,
+ draw=black,
+ fill=#2,
+ every odds marker/.try] at (.2,-.2) {#1};
+ }
+ },
+ odds marker/.style args={#1,#2}{
+ chit={full={odds marker={#1,#2}},frame={draw=none}}},
+}
+% \end{macrocode}
+%
+% Takes two arguments - the result and the fill colour. The latter is
+% useful to differentiate the severity of an attack.
+%
+% Define \spec{every result marker} to change the style.
+%
+% \begin{macrocode}
+\tikzset{
+ pics/result marker/.style args={#1,#2}{
+ code={
+ \message{^^JResults marker #1 (#2)}
+ \node[shape=circle,
+ font=\sffamily\bfseries\large,
+ inner sep=0pt,
+ minimum size=8mm,
+ draw=black,
+ fill=#2,
+ every result marker/.try] at (0,0) {#1};}},
+ result marker/.style args={#1,#2}{
+ chit={full={result marker={#1,#2}},frame={draw=none}}}
+}
+% \end{macrocode}
+%
+% \iffalse
+% </chit>
+% --------------------------------------------------------------------
+% \fi