Larger changes, setting up card templates
* Action card template now works, alongside Stance template * Modified data structures slightly to allow for a more concise notation
This commit is contained in:
@@ -54,7 +54,9 @@
|
||||
"en": "Cancel the effects of another player's Action."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Instant": true
|
||||
"Instant": {
|
||||
"en": "At any point while a player is playing an Action."
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
"en": ""
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points. If played against a Betrayal, -1 point."
|
||||
"en": ""
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 3,
|
||||
"Copies": 20
|
||||
},
|
||||
{
|
||||
@@ -17,6 +19,7 @@
|
||||
"en": "If played against a Bargain, +2 points."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 2,
|
||||
"Copies": 20
|
||||
},
|
||||
{
|
||||
@@ -24,9 +27,11 @@
|
||||
"en": "Symbiosis"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points, and an additional +2 points to both players. If played against a Betrayal, -1 point."
|
||||
"en": "If played against a Bargain both players gain an additional 2 points."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 3,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -34,9 +39,10 @@
|
||||
"en": "Excommunication"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +4 points. This card must be played face-up."
|
||||
"en": "This card must be played face-up."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 4,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -44,9 +50,11 @@
|
||||
"en": "Quid Pro Quo"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points. If played against a Betrayal, -1 point. At any time once played, this card can be flipped face-up to negate a player's Action."
|
||||
"en": "At any time once played, this card can be flipped face-up to negate a player's Action."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 3,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -54,9 +62,10 @@
|
||||
"en": "Assassination"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +1 point, and the Bargaining player loses 3 points."
|
||||
"en": "If played against a Bargain, the Bargaining player loses 2 additional points."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 1,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -64,9 +73,11 @@
|
||||
"en": "A Fair Deal"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +4 points. If played against a Betrayal, -1 point. This card must be played face-up."
|
||||
"en": "This card must be played face-up."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 4,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -74,9 +85,10 @@
|
||||
"en": "Coup d'Etat"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +2 points. If played against the player with the most points, they lose 2 points."
|
||||
"en": "If played against the player with the most points in the last round, they lose 2 additional points."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 2,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -84,9 +96,11 @@
|
||||
"en": "Contractual Obligations"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +1 points. If played against a Betrayal, +1 point, and the Betrayer loses 3 points."
|
||||
"en": "If played against a Betrayal, the Betrayer loses 3 points."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": 1,
|
||||
"AgainstBargain": 1,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -94,9 +108,11 @@
|
||||
"en": "A True Name, Spoken Softly"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain or a Betrayal, +1 point."
|
||||
"en": ""
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBetrayal": 1,
|
||||
"AgainstBargain": 1,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -104,9 +120,11 @@
|
||||
"en": "Peacekeeping"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points. If played against a Betrayal, -1 point, and you may take all Action and Final cards of the other player."
|
||||
"en": "If played against a Betrayal, you may take all Action and Final cards of the other player."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 3,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -114,9 +132,10 @@
|
||||
"en": "“Peacekeeping”"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +2 points and take all the Action cards of the other player."
|
||||
"en": "If played against a Bargain, take all the Action cards of the other player."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 2,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -124,9 +143,11 @@
|
||||
"en": "Cameraderie"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +4 points. If played against a Betrayal, -2 points."
|
||||
"en": ""
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -2,
|
||||
"AgainstBargain": 4,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -134,9 +155,10 @@
|
||||
"en": "Bitter Taste"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +2 points. The other player must also redraw all their Bargain cards at the beginning of the next round."
|
||||
"en": "The other player must also redraw all their Bargain cards at the beginning of the next round."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"AgainstBargain": 2,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
@@ -144,9 +166,11 @@
|
||||
"en": "Love-Tackle"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points. If played against a Betrayal, -1 point. If a player reveals this card during the game, it is flipped face-up, and they must give you all their Action cards."
|
||||
"en": "If a player reveals this card during the game, it is flipped face-up, and they must give you all their Action cards."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"AgainstBetrayal": -1,
|
||||
"AgainstBargain": 3,
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
|
||||
2
cards/template/.gitignore
vendored
Normal file
2
cards/template/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
cards.aux
|
||||
cards.log
|
||||
BIN
cards/template/cards.pdf
Normal file
BIN
cards/template/cards.pdf
Normal file
Binary file not shown.
129
cards/template/cards.tex
Normal file
129
cards/template/cards.tex
Normal file
@@ -0,0 +1,129 @@
|
||||
\documentclass{scrartcl}
|
||||
|
||||
% Compiled with assistance from a wonderful guide by Brett Witty: https://www.brettwitty.net/how-to-design-cards-1.html; https://www.brettwitty.net/how-to-design-cards-2.html; https://www.brettwitty.net/how-to-design-cards-3.html
|
||||
|
||||
\usepackage{pdflscape}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{positioning}
|
||||
|
||||
\usepackage{pifont}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{etoolbox}
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
\usepackage{multicol}
|
||||
\usepackage[margin=8mm]{geometry}
|
||||
|
||||
\usepackage{nopageno}
|
||||
\usepackage{graphicx, txfonts}
|
||||
\usepackage{anyfontsize}
|
||||
\usepackage{ifthen}
|
||||
|
||||
\RequirePackage[active,tightpage]{preview}
|
||||
\PreviewEnvironment{tikzpicture}
|
||||
\setlength{\PreviewBorder}{0.125in}
|
||||
|
||||
% All cards
|
||||
\newcommand{\cardmargin}{2mm}
|
||||
\newcommand{\cardcorners}{4mm}
|
||||
\newcommand{\cardwidth}{63mm}
|
||||
\newcommand{\cardheight}{88mm}
|
||||
\newcommand{\cardnameheight}{10mm}
|
||||
\newcommand{\carddescriptionheight}{30mm}
|
||||
\newcommand{\carddescriptionmargin}{4mm}
|
||||
|
||||
\newcommand{\card}[1]{\textbf{#1}}
|
||||
\newcommand{\act}{\textbf{Action}}
|
||||
\newcommand{\stn}{\textbf{Stance}}
|
||||
\newcommand{\fin}{\textbf{Final}}
|
||||
\newcommand{\mis}{\textbf{Mission}}
|
||||
\newcommand{\brg}{\bargainheartoutline}
|
||||
\newcommand{\btr}{\betrayalheart}
|
||||
|
||||
% Actions
|
||||
\newcommand{\action}[4]{ % Name, Description, Instant?, Persistent?
|
||||
\begin{tikzpicture}
|
||||
|
||||
\draw[rounded corners = \cardcorners] (0,0) rectangle (\cardwidth - \cardmargin, \cardheight - \cardmargin);
|
||||
|
||||
\node (name) at (0.5 * \cardwidth - 0.5 * \cardmargin, \carddescriptionheight + \cardnameheight) [text width = \cardwidth - 2 * \cardmargin, minimum height = \cardnameheight, align = center] {\LARGE #1};
|
||||
|
||||
\node (description) at (0.5 * \cardwidth - 0.5 * \cardmargin, 0.5 * \carddescriptionheight + \carddescriptionmargin) [draw = gray, fill = lightgray, thick, text width = \cardwidth - 3 * \carddescriptionmargin, minimum height = \carddescriptionheight, align = center] {
|
||||
\ifstrempty{#3}{}{
|
||||
% Instant, add the instant icon
|
||||
\small \textbf{Instant} \textit{#3}.
|
||||
|
||||
}\ifstrempty{#4}{}{
|
||||
% Persistent, add the instant icon
|
||||
\small \textbf{Persistent}.
|
||||
|
||||
}
|
||||
\small #2.
|
||||
};
|
||||
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
||||
% Stances
|
||||
\newcommand{\stancetypeheight}{10mm}
|
||||
|
||||
\newcommand{\bargainheart}{\ensuremath\varheartsuit}
|
||||
\newcommand{\bargainheartoutline}{\ensuremath\heartsuit}
|
||||
\newcommand{\betrayalheart}{\rotatebox[origin=c]{180}{\ensuremath\varheartsuit}}
|
||||
|
||||
\newcommand{\heart}[1]{
|
||||
\ifthenelse{\equal{#1}{BARGAIN}}
|
||||
{\bargainheartoutline}
|
||||
{\betrayalheart}
|
||||
}
|
||||
|
||||
\newcommand{\stance}[5]{ % Name, Description, Type, AgainstBargain, AgainstBetrayal
|
||||
\begin{tikzpicture}
|
||||
|
||||
\draw[rounded corners = \cardcorners] (0,0) rectangle (\cardwidth - \cardmargin, \cardheight - \cardmargin);
|
||||
|
||||
\node (type) at (0.12 * \cardwidth, 0.88 * \cardheight) [align = center] {\fontsize{65}{80px} \heart{#3}};
|
||||
|
||||
\node (basevsbargain) at (0.75 * \cardwidth, 0.88 * \cardheight + 1.1mm) [rounded corners = \cardcorners, align = center] {\textcolor{white}{\fontsize{50px}{60px} \bargainheart{}}};
|
||||
\node (basevsbargainoutline) at (0.75 * \cardwidth, 0.88 * \cardheight + 1.1mm) [rounded corners = \cardcorners, align = center] {\fontsize{50px}{60px} \bargainheartoutline{}};
|
||||
\node (basevsbetrayal) at (0.86 * \cardwidth, 0.88 * \cardheight - 1.1mm) [rounded corners = \cardcorners, align = center] {\fontsize{50px}{60px} \betrayalheart{}};
|
||||
|
||||
\node (basevsbargaintext) at (0.75 * \cardwidth + 0.5mm, 0.88 * \cardheight + 1.5mm) [rounded corners = \cardcorners, align = center] {#4};
|
||||
\node (basevsbetrayaltext) at (0.86 * \cardwidth + 0.5mm, 0.88 * \cardheight - 1mm) [rounded corners = \cardcorners, align = center] {\textcolor{white}{#5}};
|
||||
|
||||
\ifstrempty{#2}
|
||||
{
|
||||
\node (name) at (0.5 * \cardwidth - 0.5 * \cardmargin, 0.5 * \cardnameheight) [text width = \cardwidth - 2 * \cardmargin, minimum height = \cardnameheight, align = center] {\LARGE #1};
|
||||
}
|
||||
{
|
||||
\node (name) at (0.5 * \cardwidth - 0.5 * \cardmargin, \carddescriptionheight + \cardnameheight) [text width = \cardwidth - 2 * \cardmargin, minimum height = \cardnameheight, align = center] {\LARGE #1};
|
||||
\node (description) at (0.5 * \cardwidth - 0.5 * \cardmargin, 0.5 * \carddescriptionheight + \carddescriptionmargin) [draw = gray, fill = lightgray, thick, text width = \cardwidth - 3 * \carddescriptionmargin, minimum height = \carddescriptionheight, align = center] {\small #2.};
|
||||
}
|
||||
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
||||
%TODO Finals
|
||||
|
||||
%TODO Missions
|
||||
|
||||
%TODO images
|
||||
|
||||
\begin{document}
|
||||
|
||||
\thispagestyle{empty}
|
||||
|
||||
% TODO autogenerate the below
|
||||
% Actions
|
||||
\action{DUPLICITY}{You may swap two of your played \stn{} cards}{}{}
|
||||
|
||||
% Stances
|
||||
\stance{BARGAIN}{}{BARGAIN}{3}{-1}
|
||||
\stance{BETRAYAL}{}{BETRAYAL}{2}{0}
|
||||
\stance{LOVE-TACKLE}{If a player reveals this card during the game, it is flipped face-up, and they must give you all their \act{} cards}{BARGAIN}{3}{-1}
|
||||
\stance{“PEACEKEEPING”}{If played against a \brg{}, take all the Action cards of the other player.}{BETRAYAL}{2}{0}
|
||||
\stance{BITTER TASTE}{The other player must also redraw all their \brg{} cards at the beginning of the next round}{BETRAYAL}{2}{0}
|
||||
|
||||
|
||||
\end{document}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
|
||||
}
|
||||
10
main.go
10
main.go
@@ -13,7 +13,7 @@ type Card struct {
|
||||
|
||||
type Action struct {
|
||||
Card
|
||||
Instant bool
|
||||
Instant map[string]string
|
||||
Persistent bool
|
||||
}
|
||||
|
||||
@@ -25,10 +25,8 @@ type Mission struct {
|
||||
type Stance struct {
|
||||
Card
|
||||
Type string
|
||||
BetrayBetray int
|
||||
BargainBargain int
|
||||
BetrayBargain int
|
||||
BargainBetray int
|
||||
AgainstBetrayal int
|
||||
AgainstBargain int
|
||||
}
|
||||
|
||||
type Final struct {
|
||||
@@ -45,8 +43,6 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
|
||||
s, _ := os.Open("cards/stances.json")
|
||||
defer s.Close()
|
||||
dec = json.NewDecoder(s)
|
||||
|
||||
Reference in New Issue
Block a user