diff --git a/Makefile b/Makefile index 41b5b2e..789de5e 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,9 @@ $(SENTINEL): cards.sql -rm $(GENERATED_DIR)/first.list -rm $(GENERATED_DIR)/second.list -rm $(GENERATED_DIR)/third.list + touch $(GENERATED_DIR)/first.list + touch $(GENERATED_DIR)/second.list + touch $(GENERATED_DIR)/third.list for card in legs/first/*.tex; do echo $${card%tex}pdf >> $(GENERATED_DIR)/first.list; done for card in legs/second/*.tex; do echo $${card%tex}pdf >> $(GENERATED_DIR)/second.list; done for card in legs/third/*.tex; do echo $${card%tex}pdf >> $(GENERATED_DIR)/third.list; done @@ -45,15 +48,15 @@ $(SENTINEL): cards.sql echo -n 'outputs/$(*F).pdf:' > $@ tr '\n' ' ' < $< >> $@ echo -e '\n\tpdfunite $$+ $$@' >> $@ - cat $< | sort | uniq -c | sed -e 's@ *\([[:digit:]]\+\) \(.\+/\)*\(.\+\).pdf@export: outputs/$*/\3[\1].png@' >> $@ - cat $< | sort | uniq -c | sed -e 's@ *\([[:digit:]]\+\) \(.\+/\)*\(.\+\).pdf@outputs/$*/\3[\1].png: \2\3[\1].png; cp \2\3[\1].png outputs/$*/\3[\1].png@' >> $@ + cat $< | sed '/^$$/d' | sort | uniq -c | sed -e 's@ *\([[:digit:]]\+\) \(.\+/\)*\(.\+\).pdf@export: outputs/$*/\3[\1].png@' >> $@ + cat $< | sed '/^$$/d' | sort | uniq -c | sed -e 's@ *\([[:digit:]]\+\) \(.\+/\)*\(.\+\).pdf@outputs/$*/\3[\1].png: \2\3[\1].png; cp \2\3[\1].png outputs/$*/\3[\1].png@' >> $@ mkdir -p outputs/$(*D) echo 'decks: outputs/$(*F).pdf' >> $@ -Makefile.deps: $(DECK_DEPENDENCIES) $(SENTINEL) +Makefile.deps: $(SENTINEL) $(DECK_DEPENDENCIES) cat $^ > $@ --include Makefile.deps +include Makefile.deps outputs/iditaboard[face].png: iditaboard.pdf $(PDFTOPPM) -scale-to-x 4875 -scale-to-y 3075 -png $< > $@ diff --git a/cards.sql b/cards.sql index ce82ea4..0e65545 100644 --- a/cards.sql +++ b/cards.sql @@ -302,7 +302,7 @@ SELECT Cards.Flavour AS 'Flavour', Cards.Image AS 'Image', Types.Name AS 'Type', - group_concat(replace(Effects.Command,'#',Card_Effects.Amount), ' ') AS 'Effect(s)', + group_concat(replace(Effects.Command,'#',Card_Effects.Amount), '\\') AS 'Effect(s)', Decks.Name AS 'In Deck', Deck_Cards.Amount AS 'Count', Rarities.Name AS 'Rarity' diff --git a/ideas b/ideas index b20e9b9..207f5d7 100644 --- a/ideas +++ b/ideas @@ -2,7 +2,8 @@ First: Daydraw+3(HH), free dogs(SH), free personal(HS), free sleds(SS), no hypo(SS), no starve(HH) -Second: Speed+3(HHH), EnergyC-1, Health-1 +Second: Speed+3(HHH), EnergyC-1, Health-1, Daydraw+1, free food, free +attachments Third: Daydraw-3(HHHH),no food(HSSH), no personal(SHHS), Speed-3(HSSH), EnergyC+1, HealthC+1 diff --git a/iditacard.cls b/iditacard.cls index 330d2f4..95d7504 100644 --- a/iditacard.cls +++ b/iditacard.cls @@ -138,6 +138,10 @@ \newcommand{\doubledistance}{Double the final distance} \newcommand{\damagetext}{Destroy this card \vskip 0.5em When you discard this card, end your turn immediately} +\newcommand{\healthcosts}[1]{\begin{tikzpicture}[x=1in,y=1in]\node [centered, minimum width=0.5in, inner sep=0pt] at (0,0) {\includegraphics[width=0.5in]{icons/deck.png}}; \node [centered, inner sep=0pt] at (0,0) {#1}; \end{tikzpicture}} +\newcommand{\energycosts}[1]{\begin{tikzpicture}[x=1in,y=1in]\node [centered, minimum width=0.5in, inner sep=0pt] at (0,0) {\includegraphics[width=0.5in]{icons/hand.png}}; \node [centered, inner sep=0pt] at (0,0) {#1}; \end{tikzpicture}} +\newcommand{\riskcosts}[1]{\begin{tikzpicture}[x=1in,y=1in]\node [centered, minimum width=0.5in, inner sep=0pt] at (0,0) {\includegraphics[width=0.5in]{icons/risk.png}}; \node [centered, inner sep=0pt] at (0,0) {\textcolor{white}{#1}}; \end{tikzpicture}} + % Draws a small #1-type card with #2 written on it \newcommand{\cardtypetext}[2]{% \begin{tikzpicture}[x=1cm,y=1cm] @@ -147,10 +151,23 @@ \newcommand{\freecardtype}[1]{\cardtypetext{#1}{Free}} -\newcommand{\notallowed}{% +\newcommand{\notallowed}[1]{% \begin{tikzpicture}[x=1cm,y=1cm] - \draw [line width=1mm, red] (-0.173,-0.173) -- (0.173,0.173); - \draw [line width=1mm, red] (0,0) circle (3mm); + \node (0,0) {#1}; + \draw [line width=0.7mm, black] (-0.37,-0.37) -- (0.37,0.37); + \draw [line width=0.5mm, red] (-0.37,-0.37) -- (0.37,0.37); + \draw [line width=0.7mm, black] (0,0) circle (5mm); + \draw [line width=0.5mm, red] (0,0) circle (5mm); + \end{tikzpicture} +} + +\newcommand{\allowednot}[1]{% + \begin{tikzpicture}[x=1cm,y=1cm] + \node (0,0) {#1}; + \draw [line width=0.7mm, black] (-0.37,0.37) -- (0.37,-0.37); + \draw [line width=0.5mm, red] (-0.37,0.37) -- (0.37,-0.37); + \draw [line width=0.7mm, black] (0,0) circle (5mm); + \draw [line width=0.5mm, red] (0,0) circle (5mm); \end{tikzpicture} } @@ -240,8 +257,8 @@ } \newcommand{\legeffect}[1]{% - \node [rectangle, anchor=center, minimum width=1.5cm, text centered, text width=1.5cm, inner sep=0mm] at (3.175, 5.0) {\fontsize{16}{16}\bebas Effect}; - \node [rectangle, anchor=center, minimum width=1.0cm, minimum height=1.0cm, text centered, text width=1.0cm, inner sep=0mm] at (3.175, 3.85) {#1}; + \node [rectangle, anchor=center, text centered, inner sep=0mm] at (3.175, 5.0) {\fontsize{16}{16}\bebas Effect}; + \node [rectangle, anchor=center, text centered, inner sep=0mm] at (3.175, 3.85) {#1}; } \newenvironment{board} diff --git a/images/husky.png b/images/husky.png index 881635e..0da5b3a 100644 Binary files a/images/husky.png and b/images/husky.png differ diff --git a/images/lunch.png b/images/lunch.png index c291f82..b484d1b 100644 Binary files a/images/lunch.png and b/images/lunch.png differ diff --git a/legs/first/farm.tex b/legs/first/farm.tex index fdcf7b8..b776671 100644 --- a/legs/first/farm.tex +++ b/legs/first/farm.tex @@ -8,7 +8,7 @@ \onlegspace{3}{\includegraphics[width=1cm]{icons/hypo.png}} \onlegspace{5}{\includegraphics[width=1cm]{icons/damage.png}} \onlegspace{7}{\includegraphics[width=1cm]{icons/hypo.png}} - \legeffect{TODO\\ NO STARVE} + \legeffect{\allowednot{\includegraphics[width=1cm]{icons/starve.png}}} \end{leg} \end{document} diff --git a/legs/first/volcano.tex b/legs/first/volcano.tex index d4bd943..b24c505 100644 --- a/legs/first/volcano.tex +++ b/legs/first/volcano.tex @@ -8,7 +8,7 @@ \onlegspace{3}{\includegraphics[width=1cm]{icons/starve.png}} \onlegspace{5}{\includegraphics[width=1cm]{icons/damage.png}} \onlegspace{7}{\includegraphics[width=1cm]{icons/starve.png}} - \legeffect{TODO\\ NO HYPO} + \legeffect{\allowednot{\includegraphics[width=1cm]{icons/hypo.png}}} \end{leg} \end{document} diff --git a/legs/second/downhill.tex b/legs/second/downhill.tex index 83789dd..9ba244a 100644 --- a/legs/second/downhill.tex +++ b/legs/second/downhill.tex @@ -1,6 +1,6 @@ \documentclass{iditacard} -\leglevel{firstleg} +\leglevel{secondleg} \begin{document} \begin{leg} diff --git a/legs/second/junkyard.tex b/legs/second/junkyard.tex new file mode 100644 index 0000000..cbdc14a --- /dev/null +++ b/legs/second/junkyard.tex @@ -0,0 +1,17 @@ +\documentclass{iditacard} + +\leglevel{secondleg} + +\begin{document} +\begin{leg} + \legname{Junkyard} + \onlegspace{2}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{5}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/hypo.png}} + \legeffect{\healthcosts{-1}} +\end{leg} +\end{document} + + diff --git a/legs/second/park.tex b/legs/second/park.tex new file mode 100644 index 0000000..e3f0080 --- /dev/null +++ b/legs/second/park.tex @@ -0,0 +1,16 @@ +\documentclass{iditacard} + +\leglevel{secondleg} + +\begin{document} +\begin{leg} + \legname{Junkyard} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{5}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\freecardtype{attachment}} +\end{leg} +\end{document} + diff --git a/legs/second/solar_farm.tex b/legs/second/solar_farm.tex new file mode 100644 index 0000000..d6c5ea8 --- /dev/null +++ b/legs/second/solar_farm.tex @@ -0,0 +1,16 @@ +\documentclass{iditacard} + +\leglevel{secondleg} + +\begin{document} +\begin{leg} + \legname{Solar Farm} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{5}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\energycosts{-1}} +\end{leg} +\end{document} + diff --git a/legs/second/town.tex b/legs/second/town.tex new file mode 100644 index 0000000..77df679 --- /dev/null +++ b/legs/second/town.tex @@ -0,0 +1,16 @@ +\documentclass{iditacard} + +\leglevel{secondleg} + +\begin{document} +\begin{leg} + \legname{Town} + \onlegspace{2}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{5}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/hypo.png}} + \legeffect{\freecardtype{food}} +\end{leg} +\end{document} + diff --git a/legs/second/village.tex b/legs/second/village.tex new file mode 100644 index 0000000..c923e35 --- /dev/null +++ b/legs/second/village.tex @@ -0,0 +1,16 @@ +\documentclass{iditacard} + +\leglevel{secondleg} + +\begin{document} +\begin{leg} + \legname{Village} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{5}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/damage.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\healthcosts{-1}} +\end{leg} +\end{document} + diff --git a/legs/third/cliff.tex b/legs/third/cliff.tex new file mode 100644 index 0000000..203b6af --- /dev/null +++ b/legs/third/cliff.tex @@ -0,0 +1,14 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{Cliff} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\allowednot{\cardtypetext{personal}{}}} +\end{leg} +\end{document} diff --git a/legs/third/exposed.tex b/legs/third/exposed.tex new file mode 100644 index 0000000..5fc8975 --- /dev/null +++ b/legs/third/exposed.tex @@ -0,0 +1,14 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{Exposed} + \onlegspace{2}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/hypo.png}} + \legeffect{\daydraw{-3}} +\end{leg} +\end{document} diff --git a/legs/third/mountainside.tex b/legs/third/mountainside.tex new file mode 100644 index 0000000..27d94f3 --- /dev/null +++ b/legs/third/mountainside.tex @@ -0,0 +1,15 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{Mountainside} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\healthcosts{}} +\end{leg} +\end{document} + diff --git a/legs/third/river.tex b/legs/third/river.tex new file mode 100644 index 0000000..b8fb5af --- /dev/null +++ b/legs/third/river.tex @@ -0,0 +1,14 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{River} + \onlegspace{2}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/starve.png}} + \legeffect{\energycosts{-1}} +\end{leg} +\end{document} diff --git a/legs/third/swamp.tex b/legs/third/swamp.tex new file mode 100644 index 0000000..98ec385 --- /dev/null +++ b/legs/third/swamp.tex @@ -0,0 +1,14 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{Swamp} + \onlegspace{2}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/hypo.png}} + \legeffect{\speed{-3}} +\end{leg} +\end{document} diff --git a/legs/third/wasteland.tex b/legs/third/wasteland.tex new file mode 100644 index 0000000..ca510b0 --- /dev/null +++ b/legs/third/wasteland.tex @@ -0,0 +1,14 @@ +\documentclass{iditacard} + +\leglevel{thirdleg} + +\begin{document} +\begin{leg} + \legname{Wasteland} + \onlegspace{2}{\includegraphics[width=1cm]{icons/hypo.png}} + \onlegspace{4}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{6}{\includegraphics[width=1cm]{icons/starve.png}} + \onlegspace{8}{\includegraphics[width=1cm]{icons/hypo.png}} + \legeffect{\allowednot{\cardtypetext{food}{}}} +\end{leg} +\end{document} diff --git a/outputs/attack/.gitkeep b/outputs/attack/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/cardrun/.gitkeep b/outputs/cardrun/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/damage/.gitkeep b/outputs/damage/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/improvement/.gitkeep b/outputs/improvement/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/instructions.toc b/outputs/instructions.toc deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/instructions/.gitkeep b/outputs/instructions/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/legendary/.gitkeep b/outputs/legendary/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/printrun/.gitkeep b/outputs/printrun/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/speed/.gitkeep b/outputs/speed/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/starter/.gitkeep b/outputs/starter/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/starter1/.gitkeep b/outputs/starter1/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/starter2/.gitkeep b/outputs/starter2/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/starter3/.gitkeep b/outputs/starter3/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/starter4/.gitkeep b/outputs/starter4/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/outputs/survivor/.gitkeep b/outputs/survivor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/generate_cards.sh b/scripts/generate_cards.sh index e5ae72f..7993942 100755 --- a/scripts/generate_cards.sh +++ b/scripts/generate_cards.sh @@ -23,9 +23,9 @@ while IFS="|" read -r name energy health risk flavour image typename effects dec \\art{$image} EOF - [ "$energy" -gt 0 ] || echo " \\energy{$energy}" >>"$fname" - [ "$health" -gt 0 ] || echo " \\health{$health}" >>"$fname" - [ "$risk" -gt 0 ] || echo " \\risk{$risk}" >>"$fname" + [ "$energy" -gt 0 ] && echo " \\energy{$energy}" >>"$fname" + [ "$health" -gt 0 ] && echo " \\health{$health}" >>"$fname" + [ "$risk" -gt 0 ] && echo " \\risk{$risk}" >>"$fname" cat <>"$fname" \\name{$name}