From 9089c78aecdf65b006f905d0bc9e1a776ea279e0 Mon Sep 17 00:00:00 2001 From: Louis Burke Date: Wed, 24 Nov 2021 19:52:32 -0500 Subject: [PATCH] Uncommited changes of unknown quality --- Makefile | 2 +- README.md | 9 + cards.db | Bin 0 -> 32768 bytes cards.yaml | 833 ++++++++++++++++++++++++++++++++++++++ ideas | 5 + iditacard.cls | 4 + instructions.tex | 48 +-- make.py | 120 ++++++ scripts/cards.jq | 31 ++ scripts/decklist.sh | 4 +- scripts/generate_cards.jq | 9 + scripts/lscardswhere.sh | 4 + 12 files changed, 1041 insertions(+), 28 deletions(-) create mode 100644 README.md create mode 100644 cards.db create mode 100644 cards.yaml create mode 100755 make.py create mode 100644 scripts/cards.jq create mode 100755 scripts/generate_cards.jq create mode 100755 scripts/lscardswhere.sh diff --git a/Makefile b/Makefile index 83994ff..c7a0da3 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ instructions.pdf: instructions.tex instructions-anatomy.pdf mini: decks pdfunite outputs/*.pdf tmp.pdf - pdfnup --nup 3x3 tmp.pdf --no-landscape --delta '0.5cm 0.5cm' --scale 0.9 -o outputs/mini_printrun.pdf + pdfjam --nup 3x3 tmp.pdf --no-landscape --delta '0.5cm 0.5cm' --scale 0.9 -o outputs/mini_printrun.pdf rm tmp.pdf force-make: diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fa4ed2 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Iditacards! + +This is the "source code" for the Iditacards card game. + +This README file is intended to explain the organization and methodology of the +project. + +If you just want to create all necessary assets, a simple `make all` should do +the trick. diff --git a/cards.db b/cards.db new file mode 100644 index 0000000000000000000000000000000000000000..d041329a8af149b70d94906916dbf41f9feda4fd GIT binary patch literal 32768 zcmeHQZERfGS)TiSXFT`bY!ch?I$j^w>vg>GPG;=&X1&{N)*lncNt|SDr|EXRHPkfl{e_ z2vMH*oU!AyTa{l`Mej(N^PKm*=j%D|dCxi5cTU!xyX40ns{~=gjoE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QH{gdqP zXMZF6;p_*q@5{b3dn?;O^OH})K*B)6K*B)6K*B)6K*B)6K*GQe1Ow?!4aXFz=Z>tT z-zwnS0bdj_0^ATV1bjijn}BZ-a2xP>0e!$X3s?iZE?^b#O#)T`uLSB35^z$-$!3wT+;9l#X<+klq@i~%nS*aEyDU;wx*U=#4XfDOPU z0qcP01iT^3W|3gJ_e92A1WHRshc$CSpocVbUZ5e(oD=A{Wpk|&G=t0eVMxX)B zJR{IC&3vOk{hIl-Kz*9|lt8_jIV;dn&3qCF$3$B;PjjRIJ;9M|%f^hBMk+*)3pGnN zr-d5Olu)x|qrlYw@(|&$nKe#vpk$342Xa<_3_9s_)|}+I)E?P9$&mu|C`WRSY)tTy z08a3Hcos0u0Z#spa3E*&F7#Ip`sd&P*DwAsHnQdRa7G@R1~8}s3=B8s3>}xt0;ykRPaY*iS2e`bs;=-5$A2E;TZ1_LztFWF+5i9m literal 0 HcmV?d00001 diff --git a/cards.yaml b/cards.yaml new file mode 100644 index 0000000..8561a10 --- /dev/null +++ b/cards.yaml @@ -0,0 +1,833 @@ +# The cards +cards: + - &a_hat + name: 'A Hat' + costs: + energy: 2 + health: 2 + effects: + - '\daydraw{+1}' + image: hat + type: attachment + flavour: 'I bet its a valve hat.' + + - &dog_chow + name: 'Dog Chow' + costs: + energy: 3 + health: 3 + effects: + - '\speed{+1}' + image: dog_chow + type: attachment + flavour: 'A hungry dog is a slow dog.' + + - &good_dog + name: 'Good Dog' + costs: + energy: 3 + health: 3 + effects: + - '\daydraw{+1}' + image: good_dog + type: dog + flavour: 'Good boy.' + + - &husky + name: 'Husky' + costs: + energy: 2 + health: 2 + risk: 2 + effects: + - '\daydraw{+1}' + - '\speed{+1}' + image: husky + type: dog + flavour: 'Standard mushing fare.' + + - &wheel_dog + name: 'Wheel Dog' + costs: + energy: 3 + health: 3 + effects: + - '\speed{+1}' + - '\discardonkill' + - '\inplayatstart' + image: wheel_dog + type: dog + flavour: 'The dog right in front of the sled. Strong and steady.' + + - &breakfast + name: 'Breakfast' + costs: + health: 3 + effects: + - '\draw{3}' + image: breakfast + type: food + flavour: 'The most important meal of the day.' + + - &lunch + name: 'Lunch' + costs: + energy: 3 + effects: + - '\draw{3}' + image: lunch + type: food + flavour: 'What about second breakfast?' + + - &dinner + name: 'Dinner' + costs: + energy: 2 + health: 2 + effects: + - '\draw{7}' + image: dinner + type: food + flavour: 'I hope you like salted fish.' + + - &move + name: 'Move' + effects: + - '\move{1}' + image: move + type: movement + flavour: 'Just another day.' + + - &mush + name: 'Mush' + costs: + energy: 2 + health: 2 + risk: 1 + effects: + - '\move{10}' + image: mush + type: movement + flavour: "Comes from the french word ``Marche''." + + - &first_aid + name: First Aid + costs: + energy: 2 + health: 2 + effects: + - '\see{3}' + - '\destroy{1}' + image: first_aid + type: personal + flavour: 'Reduces swelling.' + + - &grandma_soup + name: Grandma Soup + costs: + energy: 1 + health: 2 + risk: 1 + effects: + - '\see{10}' + - '\destroy{2}' + image: grandma_soup + type: personal + flavour: 'Cures what ails you.' + + - &repair_sled + name: Repair Sled + costs: + energy: 1 + health: 3 + effects: + - '\supply{1}' + - '\take{2}' + image: repair_sled + type: sled + flavour: "It doesn't need to be pretty. It just has to work." + + - &upgrade_sled + name: Upgrade Sled + costs: + energy: 2 + health: 2 + effects: + - '\supply{3}' + - '\take{1}' + image: upgrade_sled + type: sled + flavour: 'You have to keep your ride in top shape.' + + - &buffer_panel + name: Buffer Panel + costs: + energy: 2 + health: 2 + effects: + - '\immortal' + - '\safepass' + image: buffer_panel + type: attachment + flavour: 'Did the primary buffer panel just fall of my gorram ship for no apparent reason?' + + - &nuclear_reactor + name: Nuclear Reactor + costs: + energy: 2 + health: 2 + effects: + - '\speed{+5}' + - '\passdie' + image: nuclear_reactor + type: attachment + flavour: 'What could go wrong?' + + - &engineer_dog + name: Engineer Dog + costs: + energy: 3 + health: 5 + risk: 1 + effects: + - '\speed{$\times 2$}' + - '\nohold' + image: engineer_dog + type: dog + flavour: 'Nails and Gears.' + + - &moose + name: Moose + costs: + energy: 5 + risk: 3 + effects: + - '\speed{+5}' + - '\immortal' + image: moose + type: dog + flavour: 'Majestic creatures. Hard to tame.' + + - &waffle + name: Waffle + effects: + - '\draw{2}' + image: waffles + type: food + flavour: 'Waffles are \textbf{delicious}.' + + - &whale_meat + name: Whale Meat + costs: + energy: 1 + health: 1 + effects: + - '\draw{5}' + - '\nohypothermia' + image: whale_meat + type: food + flavour: "It's like rubber." + + - &hitch_a_ride + name: Hitch a Ride + costs: + energy: 1 + effects: + - '\move{6}' + - '\damage{1}' + image: hitch_a_ride + type: movement + flavour: 'Probably not in the spirit of the race.' + + - &tactical_play + name: Tactical Play + costs: + energy: 1 + risk: 1 + effects: + - '\move{0}' + - '\doubledistance' + image: tactical_play + type: movement + flavour: 'Make the most of it.' + + - &meditate + name: Meditate + costs: + energy: 1 + health: 1 + effects: + - '\see{all}' + - '\destroy{0}' + image: meditate + type: personal + flavour: 'It \textit{is} just sitting.' + + - &diamorphine + name: Diamorphine + costs: + energy: 1 + health: 1 + risk: 1 + effects: + - '\see{all}' + - '\destroy{all}' + image: diamorphine + type: personal + flavour: 'Highly addicting.' + + - &desperate_times + name: Desperate Times + costs: + energy: all + effects: + - '\supply{10}' + - '\take{5}' + image: desparate_times + type: sled + flavour: 'Desperate measures hotline, how may I help you?' + + - &lead_sled + name: Lead Sled + costs: + energy: 1 + health: 1 + risk: 1 + effects: + - '\supply{10}' + - '\take{10}' + image: lead_sled + type: sled + flavour: "At least it's not a zeppelin." + + - &damaged + name: Damaged + costs: + energy: 1 + health: 1 + effects: + - '\damagetext' + image: damaged + type: damage + flavour: 'You have been hurt.' + + - &dog_shoes + name: Dog Shoes + costs: + energy: 2 + health: 3 + effects: + - '\speed{+2}' + image: dog_shoes + type: attachment + flavour: 'Dogs look cute in shoes.' + + - &squirrel + name: Squirrel + costs: + energy: 2 + health: 2 + risk: 1 + effects: + - '\speed{+3}' + image: squirrel + type: attachment + flavour: 'Dogs \emph{hate} squirrels.' + + - &tiara + name: Tiara + costs: + energy: 2 + health: 2 + risk: 1 + effects: + - '\daydraw{+1}' + - '\speed{+1}' + image: tiara + type: attachment + flavour: 'Makes the dog feel special.' + + - &bear + name: Bear + costs: + energy: 2 + health: 2 + risk: 2 + effects: + - '\speed{+5}' + image: bear + type: dog + flavour: 'In hindsight, not the best idea.' + + - &big_dog + name: Big Dog + costs: + energy: 2 + health: 2 + effects: + - '\speed{+3}' + image: big_dog + type: dog + flavour: "He's not red though." + + - &greyhound + name: Greyhound + costs: + risk: 2 + effects: + - '\speed{+3}' + - '\nohold' + image: greyhound + type: dog + flavour: 'What happens when you mix the colours on a husky? You get a grey hound.' + + - &malamute + name: Malamute + costs: + energy: 2 + health: 2 + risk: 1 + effects: + - '\daydraw{+2}' + image: malamute + type: dog + flavour: 'A common sled hauling breed.' + + - &problem_dog + name: Problem Dog + costs: + energy: 1 + health: 1 + risk: 1 + effects: + - '\daydraw{-1}' + - '\speed{+3}' + image: problem_dog + type: dog + flavour: "I swear, if you weren't so fast." + + - &bison + name: Bison + costs: + energy: 2 + risk: 1 + effects: + - '\draw{5}' + image: bison + type: food + flavour: "It's very lean." + + - &poutine + name: Poutine + costs: + health: 2 + effects: + - '\draw{1}' + - '\nohypothermia' + image: poutine + type: food + flavour: 'The great Canadian carb!' + + - &venison + name: Venison + costs: + health: 2 + effects: + - '\draw{3}' + image: venison + type: food + flavour: 'Better than breakfast.' + + - &steak + name: Steak + effects: + - '\draw{1}' + image: steak + type: food + flavour: "Well aren't you fancy." + + - &jerky + name: Jerky + costs: + energy: 1 + health: 1 + effects: + - '\draw{3}' + image: jerky + type: food + flavour: 'Watch your sodium!' + + - &midnight_sun + name: Midnight Sun + costs: + energy: 1 + health: 1 + risk: 1 + effects: + - '\move{10}' + image: midnight_sun + type: movement + flavour: 'Strange things are done in the midnight sun.' + + - &push + name: Push + costs: + energy: 1 + effects: + - '\move{5}' + image: push + type: movement + flavour: 'Not a full mush, but still putting in some effort.' + + - &slow_and_steady + name: Slow and Steady + effects: + - '\draw{1}' + - '\move{0}' + image: slow_and_steady + type: movement + flavour: 'Maybe a bit too slow.' + + - &band_aid + name: Band Aid + effects: + - '\see{1}' + - '\destroy{1}' + image: band_aid + type: personal + flavour: 'Not much.' + + - &bandage + name: Bandage + costs: + energy: 1 + effects: + - '\see{5}' + - '\destroy{1}' + image: bandage + type: personal + flavour: 'Make sure you wrap it tight.' + + - &brandy + name: Brandy + costs: + risk: 1 + effects: + - '\see{5}' + - '\destroy{1}' + image: brandy + type: personal + flavour: 'Brought by a St.\ Bernard' + + - &caffeine + name: Caffeine + costs: + health: 2 + effects: + - '\draw{1}' + - '\see{2}' + - '\destroy{1}' + image: caffeine + type: personal + flavour: 'The greatest addiction ever.' + + - &improvise + name: Improvise + effects: + - '\take{1}' + image: improvise + type: sled + flavour: 'MacGyver of the north.' + + - &makeshift_sled + name: Makeshift Sled + costs: + energy: 1 + health: 1 + effects: + - '\supply{2}' + - '\take{6}' + image: makeshift_sled + type: sled + flavour: "Rickety, but it'll hold." + + - &salvage + name: Salvage + costs: + energy: 1 + health: 1 + effects: + - '\supply{3}' + - '\take{2}' + image: salvage + type: sled + flavour: 'Take the good with the bad.' + + - &antique_sled + name: Antique Sled + costs: + health: 5 + effects: + - '\supply{2}' + - '\take{8}' + image: antique_sled + type: sled + flavour: 'Withstood the test of the time.' + + - &rush + name: Rush + costs: + health: 3 + risk: 1 + effects: + - '\move{8}' + image: rush + type: movement + flavour: 'Hurry up!' + + - &supply_run + name: Supply Run + effects: + - '\move{3}' + image: supply_run + type: movement + flavour: 'Not as easy as dropping by the grocery store.' + +# The decks that the cards are in +# TODO: Add rarity? +decks: + - name: Starter1 + cards: + - *a_hat + - *breakfast + - *breakfast + - *dinner + - *dog_chow + - *first_aid + - *first_aid + - *good_dog + - *grandma_soup + - *husky + - *lunch + - *lunch + - *move + - *move + - *move + - *move + - *mush + - *repair_sled + - *repair_sled + - *upgrade_sled + - *upgrade_sled + - *wheel_dog + + - name: Starter2 + cards: + - *a_hat + - *breakfast + - *breakfast + - *dinner + - *dog_chow + - *first_aid + - *first_aid + - *good_dog + - *grandma_soup + - *husky + - *lunch + - *lunch + - *move + - *move + - *move + - *move + - *mush + - *repair_sled + - *repair_sled + - *upgrade_sled + - *upgrade_sled + - *wheel_dog + + - name: Starter3 + cards: + - *a_hat + - *breakfast + - *breakfast + - *dinner + - *dog_chow + - *first_aid + - *first_aid + - *good_dog + - *grandma_soup + - *husky + - *lunch + - *lunch + - *move + - *move + - *move + - *move + - *mush + - *repair_sled + - *repair_sled + - *upgrade_sled + - *upgrade_sled + - *wheel_dog + + - name: Starter4 + cards: + - *a_hat + - *breakfast + - *breakfast + - *dinner + - *dog_chow + - *first_aid + - *first_aid + - *good_dog + - *grandma_soup + - *husky + - *lunch + - *lunch + - *move + - *move + - *move + - *move + - *mush + - *repair_sled + - *repair_sled + - *upgrade_sled + - *upgrade_sled + - *wheel_dog + + - name: Damage + cards: + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + - *damaged + + - name: Legendary + cards: + - *buffer_panel + - *desperate_times + - *diamorphine + - *engineer_dog + - *hitch_a_ride + - *lead_sled + - *meditate + - *moose + - *nuclear_reactor + - *tactical_play + - *waffle + - *whale_meat + + - name: Race + cards: + - *bear + - *bear + - *big_dog + - *big_dog + - *dog_shoes + - *dog_shoes + - *greyhound + - *greyhound + - *improvise + - *improvise + - *midnight_sun + - *midnight_sun + - *problem_dog + - *problem_dog + - *push + - *push + - *rush + - *rush + - *slow_and_steady + - *slow_and_steady + - *squirrel + - *squirrel + - *supply_run + - *supply_run + - *tiara + - *tiara + + - name: Survival + cards: + - *antique_sled + - *antique_sled + - *band_aid + - *band_aid + - *bandage + - *bandage + - *bison + - *bison + - *brandy + - *brandy + - *caffeine + - *caffeine + - *jerky + - *jerky + - *makeshift_sled + - *makeshift_sled + - *malamute + - *malamute + - *poutine + - *poutine + - *salvage + - *salvage + - *steak + - *steak + - *venison + - *venison + +Legs: + - &farm + name: Farm + effects: + - '\allowednot{\includegraphics[width=1cm]{icons/starve.png}}' + spaces: + 3: hypo + 5: damage + 7: hypo + + - &fishing_hole + name: Fishing Hole + effects: + - '\daydraw{3}' + spaces: + 3: damage + 5: hypo + 7: damage + + - &hospital + name: Hospital + effects: + - '\freecardtype{personal}' + spaces: + 3: starve + 5: hypo + 7: starve + + - &new_moon + name: New Moon + effects: + - '\freecardtype{dog}' + spaces: + 3: hypo + 5: starve + 7: hypo + + +Legdecks: + - name: First + legs: + - *farm + - *fishing_hole + - *hospital + - *new_moon + + + +# TODO: add legs diff --git a/ideas b/ideas index 207f5d7..16c47b2 100644 --- a/ideas +++ b/ideas @@ -1,3 +1,8 @@ +Add "blank" cards for people to put their own dogs on! +Use a more legible/accessible database format. Perhaps a custom format with easy +tooling or a csv-like format. + + 6 of each type of stretch: First: Daydraw+3(HH), free dogs(SH), free personal(HS), free sleds(SS), no hypo(SS), no starve(HH) diff --git a/iditacard.cls b/iditacard.cls index f832114..5d99404 100644 --- a/iditacard.cls +++ b/iditacard.cls @@ -256,6 +256,10 @@ \node [rectangle, anchor=center, minimum width=1.5cm, minimum height=1.5cm, text centered, text width=1.5cm, inner sep=0mm] at (\legcoordx{#1},\legcoordy{#1}) {#2}; } +\newcommand{\legspaceicon}[1]{% + \includegraphics[width=1cm]{icons/#1.png} +} + \newcommand{\legeffect}[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}; diff --git a/instructions.tex b/instructions.tex index b535553..ef51447 100644 --- a/instructions.tex +++ b/instructions.tex @@ -9,6 +9,9 @@ \usepackage{fancybox} \usepackage{wrapfig} \usepackage{subfig} +\usepackage{fontspec} + +\newfontfamily\bebas{Bebas Neue Regular} \titleformat{name=\section}[display]{}{\thetitle.}{0.8em}{\Heading\Large} %\titlespacing{\section}{0pt}{0pt plus 4pt minus 4pt}{0pt plus 4pt minus 4pt} @@ -93,11 +96,11 @@ bottom right corner: \begin{itemize} \setlength\itemsep{-1em} - \item 4 Starter Decks - \input "|echo SELECT 'SUM(Amount)' FROM Deck_Cards JOIN Decks ON Decks.id = Deck_Cards.Deck WHERE Decks.Name = \'starter1\' | sqlite3 -init cards.sql" cards each (\includegraphics[width=1em]{images/deck/starter1.png} \includegraphics[width=1em]{images/deck/starter2.png} \includegraphics[width=1em]{images/deck/starter3.png} \includegraphics[width=1em]{images/deck/starter4.png}) - \item 1 Legendary Deck - \input "|echo SELECT 'SUM(Amount)' FROM Deck_Cards JOIN Decks ON Decks.id = Deck_Cards.Deck WHERE Decks.Name = \'legendary\' | sqlite3 -init cards.sql" cards (\includegraphics[width=1em]{images/deck/legendary.png}) - \item 1 Survival Deck - \input "|echo SELECT 'SUM(Amount)' FROM Deck_Cards JOIN Decks ON Decks.id = Deck_Cards.Deck WHERE Decks.Name = \'survival\' | sqlite3 -init cards.sql" cards (\includegraphics[width=1em]{images/deck/survival.png} - \item 1 Race Deck - \input "|echo SELECT 'SUM(Amount)' FROM Deck_Cards JOIN Decks ON Decks.id = Deck_Cards.Deck WHERE Decks.Name = \'race\' | sqlite3 -init cards.sql" cards (\includegraphics[width=1em]{images/deck/race.png} - \item 1 Damage Deck - \input "|echo SELECT 'SUM(Amount)' FROM Deck_Cards JOIN Decks ON Decks.id = Deck_Cards.Deck WHERE Decks.Name = \'damage\' | sqlite3 -init cards.sql" cards (\includegraphics[width=1em]{images/deck/damage.png}) + \item 4 Starter Decks - \input "|./scripts/lscardswhere.sh starter1" cards each (\includegraphics[width=1em]{images/deck/starter1.png} \includegraphics[width=1em]{images/deck/starter2.png} \includegraphics[width=1em]{images/deck/starter3.png} \includegraphics[width=1em]{images/deck/starter4.png}) + \item 1 Legendary Deck - \input "|./scripts/lscardswhere.sh legendary" cards (\includegraphics[width=1em]{images/deck/legendary.png}) + \item 1 Survival Deck - \input "|./scripts/lscardswhere.sh survival" cards (\includegraphics[width=1em]{images/deck/survival.png}) + \item 1 Race Deck - \input "|./scripts/lscardswhere.sh race" cards (\includegraphics[width=1em]{images/deck/race.png}) + \item 1 Damage Deck - \input "|./scripts/lscardswhere.sh damage" cards (\includegraphics[width=1em]{images/deck/damage.png}) \end{itemize} Additionally there are 18 leg cards. @@ -107,7 +110,6 @@ The game also contains: \begin{itemize} \setlength\itemsep{-1em} \item This manual - \item The box the game came with \item One weather die with special symbols on it \item One folding board \item 4 player tokens @@ -120,8 +122,8 @@ The game also contains: Every turn each player will move forward one space. The cards they play will increase this, while the places they encounter will work to decrease it. When -the first player reaches the finish line the game ends and they win. The finish -line is the square \emph{after} the last square on the board. +the first player reaches the finish line the game ends. The finish line is the +square \emph{after} the last square on the board. \section{Setup} % How to get the game ready for play. There shouldn’t be anything in here that mentions what components are used for or why they are important--save that for the 'Gameplay' section. Just make sure that in this section everything is laid out clearly--if diagrams are necessary (they almost always are) don’t be afraid to put those in! @@ -146,14 +148,14 @@ weather die goes first. They roll it, then take their turn. % The main gameplay section tells you how the game is broken up (rounds, turns, phases, etc.) and summarizes what players do in each of those stages. This section should explain the flow of the game from start to completion. The game is broken into turns. Each turn you may either play a card, or take -a new day. At the end of your turn you move automatically a distance equal to +a new day. At the end of your turn you automatically move a distance equal to your speed. After you finish moving the player to your left begins their turn. During gameplay you will often discard cards. It is important to note that discarded cards will be returned to your deck frequently. This is in contrast to destroyed cards which are removed from the game permanently. -Many cards effect the size of your initial hand as well. There is no hard upper +Many cards affect the size of your initial hand as well. There is no hard upper limit on hand size, however if there aren't enough cards in your deck to fill your hand, then your hand will consist only of however many cards are available to be drawn. @@ -170,6 +172,9 @@ called 'passing' the space. If you pass another player they move back one space and you take one damage (damage will be explained later). +Passing a \includegraphics[height=1em]{images/icons/damage.png} space also incurs +a damage. + If you pass a cold space (\includegraphics[width=2em]{images/icons/hypo.png}) then you get hypothermia. @@ -207,8 +212,7 @@ it. The second cost to be paid is the ``health'' cost. Health cost is paid by discarding cards from the top of the deck. For example if the health cost of -a card is 3, then you must select 3 cards to discard from your hand to pay for -it. +a card is 3, then you must discard the top 3 cards of your deck to pay for it. \subsubsection{Risk} @@ -296,11 +300,11 @@ If you have either hypothermia or starvation then you do not move automatically at the end of your turn. If you have both hypothermia and starvation then you move backwards a distance equal to your speed, rather than forwards. -Whenever you play a {\color{personal}personal} card you reduce your hypothermia -by one, even if you fail to pay for it. +Whenever you play a {\color{personal}personal} card you remove your hypothermia +even if you fail to pay for it. -Similarly, whenever you play a {\color{food}food} card you reduce your -starvation by one, even if you fail to pay for it. +Similarly, whenever you play a {\color{food}food} card you remove your +starvation, even if you fail to pay for it. \subsection{Legendary Addition} @@ -318,9 +322,6 @@ even though you have enough cards in your deck if they show up. Luckily damage cards can be played as a normal card, and when you do so you destroy the damage card. -Passing a \includegraphics[height=1em]{images/icons/damage.png} space also incurs -a damage. - \section{Card Types} There are 6 unique types of playing cards in the game. This section describes @@ -337,8 +338,10 @@ space for other dogs. Common effects dogs have include: - - \daydraw{X} Draw an extra \emph{X} cards when you take a new day. - - \speed{X} Move an extra \emph{X} spaces whenever you move. +\begin{itemize} + \item \daydraw{X} Draw an extra \emph{X} cards when you take a new day. + \item \speed{X} Move an extra \emph{X} spaces whenever you move. +\end{itemize} \subsection{\color{attachment} Attachments} @@ -347,9 +350,6 @@ one attachment each. If you have no dogs in play then attachments are discarded when played, to no effect. You may discard your own attachments whenever you wish. When the dog an attachment is on dies, that attachment is discarded. -Armour is a particular attachment that can protect a dog even when you are -instructed to sacrifice it. - \subsection{\color{sled} Sled} \label{sec:sled} diff --git a/make.py b/make.py new file mode 100755 index 0000000..3615140 --- /dev/null +++ b/make.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 + +""" +Used as a tool by the Makefile. +Updates only those files whose contents are changed by changes to the given yaml +file. +""" + +import sys +from textwrap import dedent +import yaml + +def read_cards(filename=None): + """ + Reads the given file as yaml into card information data. + """ + if filename is not None: + with open(filename, 'r') as yaml_file: + data = yaml.load(yaml_file, Loader=yaml.FullLoader) + else: + data = yaml.load(sys.stdin, Loader=yaml.FullLoader) + + return data + + +def card_to_tex(card, deck, rarity): + """ + Returns a card's LaTeX as a string. + """ + head = f"""\ + \\documentclass{{iditacard}} + + \\cardtype{{{card['type']}}} + \\rarity{{{rarity}}} + \\deck{{{deck}}} + + \\begin{{document}} + \\begin{{card}} + \\art{{{card['image']}}} + """ + effect_text = "\\quad".join(card['effects'] if 'effects' in card else []) + tail = f"""\ + \\name{{{card['name']}}} + \\text{{{effect_text}}} + \\flava{{{card['flavour']}}} + \\type{{{card['type']}}} + \\end{{card}} + \\end{{document}}\ + """ + + costs = card["costs"] + costr = "" + + if 'energy' in costs and costs['energy'] != 0: + costr += f" \\energy{{{costs['energy']}}}\n" + + if 'health' in costs and costs['health'] != 0: + costr += f" \\health{{{costs['health']}}}\n" + + if 'risk' in costs and costs['risk'] != 0: + costr += f" \\risk{{{costs['risk']}}}\n" + + return dedent(head) + costr + dedent(tail) + + +def leg_to_tex(leg, level): + """ + Returns a leg's LaTeX as a string. + """ + head = f"""\ + \\documentclass{{iditacard}} + + \\leglevel{{{level}}} + + \\begin{{document}} + \\begin{{leg}} + \\legname{{{leg['name']}}} + """ + spaces = "" + for space in range(1, 11): + if str(space) in leg['spaces']: + icon = f"\\legspaceicon{{{leg['spaces'][space]}}}" + spaces += f" \\onlegspace{{{space}}}{{{icon}}}\n" + effect_text = "\\quad".join(leg['effects'] if 'effects' in leg else []) + tail = f"""\ + \\legeffect{{{effect_text}}} + \\end{{leg}} + \\end{{document}}\ + """ + + return dedent(head) + spaces + dedent(tail) + + +def dump_decks_to(decks, directory): + """ + Dumps all tex from decks to the given directory. + For each deck in decks it will generate: + - a directory within the given directory with the same name + - .tex files for each card in the deck in the above directory + - .list file in the given directory with the same name as the deck + - one line in the list file for each pdf that would go into said deck + """ + return 'TODO' + +# TODO: fill out dump_decks_to, create dump_legs_to and call them with the +# appropriate directory in main (using sys.argv) +# +# also write a script to extract all deck names for use in the makefile (to be +# assigned to the DECK_LIST/DECK_DEPENDENCIES variables + +def main(): + """ + Main entry point. + """ + cards = read_cards() + print(card_to_tex(cards['cards'][0], "thedeck", "therarity")) + + +if __name__ == '__main__': + main() diff --git a/scripts/cards.jq b/scripts/cards.jq new file mode 100644 index 0000000..b1496f8 --- /dev/null +++ b/scripts/cards.jq @@ -0,0 +1,31 @@ +# This is a jq module to be included + +# TODO: since jq I/O sucks, try either using pyyaml or writing a writeto script +# that only writes to a file if the new contents are different + +# Pass a specific card and it produces a string with its latex +def card2tex(deck; rarity): + . as $card + | (.costs // {}) as $costs + | (.effects | join("\\quad ")) as $effect + | [ + "\\documentclass{iditacard}", + "", + "\\cardtype{\(.type)}", + "\\rarity{\(rarity)}", + "\\deck{\(deck)}", + "", + "\\begin{document}", + "\\begin{card}", + " \\art{\(.image)}", + ($costs.energy // empty | " \\energy{\(.)}"), + ($costs.health // empty | " \\health{\(.)}"), + ($costs.risk // empty | " \\risk{\(.)}"), + " \\name{\(.name)}", + " \\text{\($effect)}", + " \\flava{\(.flavour)}", + " \\type{\(.type)}", + "\\end{card}", + "\\end{document}" + ] | join("\n") +; diff --git a/scripts/decklist.sh b/scripts/decklist.sh index f01df74..93c9ad7 100755 --- a/scripts/decklist.sh +++ b/scripts/decklist.sh @@ -1,5 +1,3 @@ #!/bin/bash -sqlite3 -init cards.sql <