From 98138d0a21684f232f97eedca7d16d6cb796130e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=90=99PiperYxzzy?= Date: Tue, 21 Mar 2023 13:31:22 +0200 Subject: [PATCH] Mostly architectural changes, added TOMFOOLERY --- cards/actions.json | 170 ++++++++++++++++++++++++++++++++++----------- cards/finals.json | 94 ++++++++++++++++++------- cards/sigils.json | 26 ++++--- cards/stances.json | 132 ++++++++++++++++++++++++++--------- main.go | 53 ++++++++++---- 5 files changed, 358 insertions(+), 117 deletions(-) diff --git a/cards/actions.json b/cards/actions.json index e8206ef..9a9229d 100644 --- a/cards/actions.json +++ b/cards/actions.json @@ -6,7 +6,9 @@ "Description": { "en": "All players must immediately play a \\stn{} card." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -15,7 +17,9 @@ "Description": { "en": "All players holding at least one \\btr{} must raise their hands. You may swap any held \\stn{} of yours for a \\btr{} of their choice." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -24,7 +28,9 @@ "Description": { "en": "All players must immediately reveal their \\textbf{Cacophony} cards. If there are 3 or fewer other \\textbf{Cacophony} cards revealed, gain that many \\pnts{}. Otherwise, discard all your \\act{} cards." }, - "Copies": 7 + "Copies": 7, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -34,7 +40,9 @@ "en": "All other players discard 2 \\act{} cards. If \\textbf{Joy} is in play, double this effect." }, "Copies": 2, - "Persistent": true + "Persistent": true, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -44,28 +52,34 @@ "en": "You may play 2 \\act{} cards immediately. If \\textbf{Misery} has been played this round, you may play 3 \\act{} cards immediately instead." }, "Copies": 2, - "Persistent": true + "Persistent": true, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { "en": "IMPLOSION" }, "Description": { - "en": "Cancel the effects of another player's \\act{}." + "en": "Cancel the effects of that \\act{}." }, "Copies": 3, "Instant": { "en": "At any point while a player is playing an \\act{}." - } + }, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { "en": "THAT WHICH is UNSEEN" }, "Description": { - "en": "You may look at the \\act{} draw deck. You may order it or shuffle it in any way you wish before putting it back." + "en": "For the next 30 seconds, you may look at the \\act{} draw deck, and order it or shuffle it in any way you wish before putting it back." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -74,7 +88,9 @@ "Description": { "en": "All players holding at least one \\brg{} must raise their hands. You may swap any held \\stn{} of yours with a \\brg{} of their choice." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -83,7 +99,9 @@ "Description": { "en": "You may swap two of your played \\stn{} cards." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -92,7 +110,9 @@ "Description": { "en": "Choose any player who must reveal their held \\stn{} cards to everyone, then give that player this \\textbf{Burning Truth} card instead of discarding it." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -104,7 +124,9 @@ "Instant": { "en": "If a player tries to take or swap any of your held cards." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -113,7 +135,9 @@ "Description": { "en": "All other players must discard \\act{} cards until they have one fewer than you." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -122,7 +146,9 @@ "Description": { "en": "You may look at the played \\stn{} cards of any one other player." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -132,7 +158,9 @@ "en": "While this card is in effect, no \\act{} cards may be drawn." }, "Persistent": true, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -141,7 +169,9 @@ "Description": { "en": "Remove \\textbf{Famine} from play. Draw as many \\act{} cards as there are players, then give each player one card of your choosing." }, - "Copies": 4 + "Copies": 4, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -150,7 +180,9 @@ "Description": { "en": "Remove all persistent \\act{} cards from play." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -159,7 +191,9 @@ "Description": { "en": "You may turn any of your own played \\stn{} cards face-up." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -168,7 +202,9 @@ "Description": { "en": "No effect. While you hold this card, you may not play any other \\act{} cards." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -177,7 +213,9 @@ "Description": { "en": "If another player has \\textbf{Love}, they may reveal it and discard it, and you both gain 2 \\pnts{}. Only the first player to reveal will gain \\pnts{}. If no player reveals \\textbf{Love}, you lose 2 \\pnts{}." }, - "Copies": 5 + "Copies": 5, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -186,7 +224,9 @@ "Description": { "en": "All players must give you one of their \\act{} cards, of their choosing." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -195,7 +235,9 @@ "Description": { "en": "All players, including yourself, must reveal one of their played \\stn{} cards and then return it to their hand." }, - "Copies": 4 + "Copies": 4, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -207,7 +249,9 @@ "Instant": { "en": "If an \\act{} allows a player to take cards from your hand" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -219,7 +263,9 @@ "Instant": { "en": "When a player plays a \\stn{} against you" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -231,7 +277,9 @@ "Instant": { "en": "When you play an \\act{} that targets another player" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" }, { "Name": { @@ -243,7 +291,9 @@ "Instant": { "en": "When an \\act{} targets you" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" }, { "Name": { @@ -252,7 +302,9 @@ "Description": { "en": "Gain 1 \\pnt{}. All members of the \\textbf{Queer Throatslitting Collective}, except yourself, must reveal themselves." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -261,7 +313,9 @@ "Description": { "en": "Gain 1 \\pnt{}. All members of the \\textbf{League of Inordinate Reprobates}, except yourself, must reveal themselves." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -270,7 +324,9 @@ "Description": { "en": "Gain 1 \\pnt{}. All members of the \\textbf{Church of the Undying Rose}, except yourself, must reveal themselves." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -279,7 +335,9 @@ "Description": { "en": "Gain 1 \\pnt{}. All members of the \\textbf{Vengeful Sacrificium}, except yourself, must reveal themselves." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -288,7 +346,9 @@ "Description": { "en": "Gain 1 \\pnt{}. All members of \\textbf{Ye Brothers Merry}, except yourself, must reveal themselves." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -297,7 +357,9 @@ "Description": { "en": "You may accuse another player of being a member of any group. If you are correct, they must reveal themselves and give you 2 \\pnts{}." }, - "Copies": 2 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -309,7 +371,9 @@ "Instant": { "en": "When a player is forced to reveal a card or their alliance" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" }, { "Name": { @@ -321,7 +385,9 @@ "Instant": { "en": "When a player draws an \\act{}" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -331,7 +397,9 @@ "en": "While this card is in effect, any effect that allows or forces a player to reveal a card is negated." }, "Persistent": true, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -340,7 +408,9 @@ "Description": { "en": "Remove \\textbf{Loadshedding} from play. The players with the most \\act{} cards lose 2 \\pnts{}." }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -349,7 +419,9 @@ "Description": { "en": "Reveal one of your alliances. Other players in this alliance may also reveal themselves. Each of you receives 1 \\pnt{} per revealed player." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -358,7 +430,9 @@ "Description": { "en": "Choose a player, who must reveal their alliance. All other members of this alliance must reveal themselves and lose 1 \\pnt{}." }, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.1" }, { "Name": { @@ -370,6 +444,22 @@ "Instant": { "en": "If this card gets passed to you by another player, you \\textbf{must} play it" }, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" + }, + { + "Name": { + "en": "PETTY CRUELTY" + }, + "Description": { + "en": "Look at their \\act{} cards and take any two." + }, + "Instant": { + "en": "If another player says the word 'love'" + }, + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" } ] \ No newline at end of file diff --git a/cards/finals.json b/cards/finals.json index 08c34d6..a8b77b5 100644 --- a/cards/finals.json +++ b/cards/finals.json @@ -7,7 +7,9 @@ "en": "Cancel the effects of all \\fin{} cards this round." }, "Copies": 1, - "Priority": 0 + "Priority": 0, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -17,7 +19,9 @@ "en": "Swap two played \\stn{} cards between any two players other than yourself." }, "Copies": 1, - "Priority": 1 + "Priority": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -27,7 +31,9 @@ "en": "Your \\stn{} cards cannot be changed by any future \\fin{} effects this round." }, "Copies": 1, - "Priority": 2 + "Priority": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -37,7 +43,9 @@ "en": "If you have played a \\brgbtr{}, you may take all their held \\act{} and \\fin{} cards." }, "Copies": 1, - "Priority": 3 + "Priority": 3, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -47,7 +55,9 @@ "en": "If you have played a \\btrbrg{}, you may change your stance to a \\brg{}, if you are holding one. If you do so, the other player gains 2 extra \\pnts{}." }, "Copies": 1, - "Priority": 4 + "Priority": 4, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -57,7 +67,9 @@ "en": "Gain 3 \\pnts{} for every time you have played a \\btrbtr{} in this round." }, "Copies": 1, - "Priority": 5 + "Priority": 5, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -67,7 +79,9 @@ "en": "Gain 3 \\pnts{} for each of your \\brgbtr{} in this round." }, "Copies": 1, - "Priority": 6 + "Priority": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -77,7 +91,9 @@ "en": "Replace one of your played \\stn{} cards with one of the opposite \\stn{}, if you hold one." }, "Copies": 1, - "Priority": 7 + "Priority": 7, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -87,7 +103,9 @@ "en": "Choose another player. Both of you lose 5 \\pnts{}. If you are already the player with the lowest score before losing these \\pnts{}, only the other player loses 5 \\pnts{}." }, "Copies": 1, - "Priority": 8 + "Priority": 8, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -97,7 +115,9 @@ "en": "If more than half the \\fin{} cards have already been resolved, gain 3 \\pnts{}. Otherwise, lose 1 \\pnt{}." }, "Copies": 1, - "Priority": 9 + "Priority": 9, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -107,7 +127,9 @@ "en": "The player of the next \\fin{} to resolve loses 4 \\pnts{}." }, "Copies": 1, - "Priority": 10 + "Priority": 10, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -117,7 +139,9 @@ "en": "Lose 3 \\pnts{}. You may not lose any further \\pnts{} this round, for any reason." }, "Copies": 1, - "Priority": 11 + "Priority": 11, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -127,7 +151,9 @@ "en": "Pick up 4 played \\stn{} cards, shuffle them, and randomly deal them back to where they were taken from before revealing them." }, "Copies": 1, - "Priority": 12 + "Priority": 12, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -137,7 +163,9 @@ "en": "Take 3 \\pnts{} from one player, and give 3 \\pnts{} to a player other than yourself." }, "Copies": 1, - "Priority": 13 + "Priority": 13, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -147,7 +175,9 @@ "en": "Choose another player. All other players vote for you, or for the other player. If you win a majority of votes, take 3 \\pnts{} from the other player. If you do not, give 3 \\pnts{} to them." }, "Copies": 1, - "Priority": 14 + "Priority": 14, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -157,7 +187,9 @@ "en": "If this is the last \\fin{} to resolve, gain 5 \\pnts{}." }, "Copies": 1, - "Priority": 15 + "Priority": 15, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -167,7 +199,9 @@ "en": "Every player gains 1 \\pnt{} for every \\brg{} they have played. You gain an extra \\pnt{} for each \\brg{} you have played." }, "Copies": 1, - "Priority": 16 + "Priority": 16, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -177,7 +211,9 @@ "en": "You may ignore any \\pnts{} lost due to any one \\btr{}." }, "Copies": 1, - "Priority": 17 + "Priority": 17, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -187,7 +223,9 @@ "en": "Gain 1 \\pnt{} for every \\brgbtr{} in this round." }, "Copies": 1, - "Priority": 18 + "Priority": 18, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -197,7 +235,9 @@ "en": "Gain 3 \\pnts{} and discard all of your \\act{} and \\fin{} cards." }, "Copies": 1, - "Priority": 19 + "Priority": 19, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -207,17 +247,21 @@ "en": "Ask a player you have played a \\btr{} against if they forgive you. If they do, you gain 3 \\pnts{}, and they gain 1 \\pnt{}." }, "Copies": 1, - "Priority": 20 + "Priority": 20, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { - "en": "HAND STUFF, UNDER THE TABLE" + "en": "HAND STUFF, UNDER the TABLE" }, "Description": { "en": "For each \\brgbrg{} you have played, gain 1 \\pnt{}, and you may replace any played \\btr{} with a \\btr{} from your hand." }, "Copies": 1, - "Priority": 21 + "Priority": 21, + "Introduced": "0.1.1", + "Updated": "0.1.1" }, { "Name": { @@ -227,6 +271,8 @@ "en": "Select up to 2 pairs of \\brgbtr{} and swap them. You may only select 1 interaction per player." }, "Copies": 1, - "Priority": 100 + "Priority": 100, + "Introduced": "0.1.0", + "Updated": "0.1.1" } ] \ No newline at end of file diff --git a/cards/sigils.json b/cards/sigils.json index 3b8d046..906a110 100644 --- a/cards/sigils.json +++ b/cards/sigils.json @@ -9,7 +9,9 @@ "Initials": { "en": "QTSC" }, - "Copies": 6 + "Copies": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -21,19 +23,23 @@ "Initials": { "en": "LoIR" }, - "Copies": 6 + "Copies": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { - "en": "CHURCH OF THE UNDYING ROSE" + "en": "CHURCH of the UNDYING ROSE" }, "Description": { - "en": "Love heals all wounds, but we cause some of them." + "en": "Love heals all wounds. We caused some of them." }, "Initials": { "en": "CotUR" }, - "Copies": 6 + "Copies": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -45,18 +51,22 @@ "Initials": { "en": "VS" }, - "Copies": 6 + "Copies": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { "en": "YE BROTHERS JOYOUS" }, "Description": { - "en": "Happiness, or oblivion." + "en": "Happiness or oblivion." }, "Initials": { "en": "YBJ" }, - "Copies": 6 + "Copies": 6, + "Introduced": "0.1.0", + "Updated": "0.1.0" } ] \ No newline at end of file diff --git a/cards/stances.json b/cards/stances.json index c6429d5..317f8e4 100644 --- a/cards/stances.json +++ b/cards/stances.json @@ -9,7 +9,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 35 + "Copies": 35, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -20,7 +22,9 @@ }, "Type": "Betrayal", "AgainstBargain": 2, - "Copies": 35 + "Copies": 35, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -32,7 +36,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -43,7 +49,9 @@ }, "Type": "Betrayal", "AgainstBargain": 4, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -55,7 +63,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -66,7 +76,9 @@ }, "Type": "Betrayal", "AgainstBargain": 1, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -78,7 +90,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 4, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -89,7 +103,9 @@ }, "Type": "Betrayal", "AgainstBargain": 2, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -101,11 +117,13 @@ "Type": "Bargain", "AgainstBetrayal": 1, "AgainstBargain": 1, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { - "en": "A TRUE NAME, SPOKEN SOFTLY" + "en": "a TRUE NAME, SPOKEN SOFTLY" }, "Description": { "en": "" @@ -113,7 +131,9 @@ "Type": "Betrayal", "AgainstBetrayal": 1, "AgainstBargain": 1, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -125,7 +145,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -136,7 +158,9 @@ }, "Type": "Betrayal", "AgainstBargain": 2, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -148,7 +172,9 @@ "Type": "Bargain", "AgainstBetrayal": -2, "AgainstBargain": 4, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -159,7 +185,9 @@ }, "Type": "Betrayal", "AgainstBargain": 2, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -171,7 +199,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -181,7 +211,9 @@ "en": "This card must be played face-up and cannot be moved or interacted with. The player this card is played against must immediately play 2 of their \\stn{} cards." }, "Type": "Betrayal", - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -193,7 +225,9 @@ "Type": "Betrayal", "AgainstBetrayal": 0, "AgainstBargain": 2, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -205,7 +239,9 @@ "Type": "Bargain", "AgainstBetrayal": -3, "AgainstBargain": 3, - "Copies": 3 + "Copies": 3, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -217,19 +253,37 @@ "Type": "Betrayal", "AgainstBetrayal": 0, "AgainstBargain": 0, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { "en": "SONNET" }, "Description": { - "en": "If this is played \\brgbtr{}, you may sing a song to avoid losing \\pnts{}." + "en": "\\btr{}: you may sing a song to avoid losing \\pnts{}." }, "Type": "Bargain", - "AgainstBetrayal": -1, + "AgainstBetrayal": -3, "AgainstBargain": 3, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.1" + }, + { + "Name": { + "en": "TOMFOOLERY" + }, + "Description": { + "en": "\\btr{}: you may tell a joke. If anyone laughs or chuckles, you avoid losing \\pnts{}." + }, + "Type": "Bargain", + "AgainstBetrayal": -3, + "AgainstBargain": 3, + "Copies": 2, + "Introduced": "0.1.1", + "Updated": "0.1.1" }, { "Name": { @@ -241,7 +295,9 @@ "Type": "Betrayal", "AgainstBetrayal": -1, "AgainstBargain": -1, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -253,7 +309,9 @@ "Type": "Bargain", "AgainstBetrayal": 0, "AgainstBargain": 2, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -265,7 +323,9 @@ "Type": "Betrayal", "AgainstBetrayal": 1, "AgainstBargain": 1, - "Copies": 2 + "Copies": 2, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -277,7 +337,9 @@ "Type": "Betrayal", "AgainstBetrayal": 0, "AgainstBargain": 2, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -289,7 +351,9 @@ "Type": "Betrayal", "AgainstBetrayal": 0, "AgainstBargain": 2, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -301,7 +365,9 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -313,7 +379,9 @@ "Type": "Betrayal", "AgainstBetrayal": 1, "AgainstBargain": 3, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" }, { "Name": { @@ -325,6 +393,8 @@ "Type": "Bargain", "AgainstBetrayal": -1, "AgainstBargain": 3, - "Copies": 1 + "Copies": 1, + "Introduced": "0.1.0", + "Updated": "0.1.0" } ] \ No newline at end of file diff --git a/main.go b/main.go index afe46a2..d4bcbaa 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "flag" "fmt" "os" "strings" @@ -11,6 +12,8 @@ type Card struct { Name map[string]string Description map[string]string Copies int + Introduced string + Updated string } type Sigil struct { @@ -42,7 +45,10 @@ type Final struct { } func main() { - lang := os.Args[1] + var lang = flag.String("lang", "en", "Language strings to use in the output") + var version = flag.String("printvers", "", "Specific version to print out") + + flag.Parse() si, _ := os.Open("cards/sigils.json") defer si.Close() @@ -55,17 +61,21 @@ func main() { fmt.Print("\n% SIGILS\n") for _, sig := range sigils { - name, ex := sig.Name[lang] + if *version != "" && sig.Updated != *version { + continue + } + + name, ex := sig.Name[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Name for card %v", lang, sig)) } - desc, ex := sig.Description[lang] + desc, ex := sig.Description[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Description for action card %v", lang, sig)) } - init, ex := sig.Initials[lang] + init, ex := sig.Initials[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Initials for action card %v", lang, sig)) } @@ -86,19 +96,23 @@ func main() { fmt.Print("\n% ACTIONS\n") for _, act := range actions { - name, ex := act.Name[lang] + if *version != "" && act.Updated != *version { + continue + } + + name, ex := act.Name[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Name for card %v", lang, act)) } - desc, ex := act.Description[lang] + desc, ex := act.Description[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Description for action card %v", lang, act)) } var inst string if act.Instant != nil { - inst, ex = act.Instant[lang] + inst, ex = act.Instant[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Instant for action card %v", lang, act)) } @@ -110,7 +124,8 @@ func main() { } for i := 0; i < act.Copies; i++ { - fmt.Printf("\\action{%v}{%v}{%v}{%v}\n", name, desc, inst, pers) + fmt.Printf("\\action{%v}{%v}{%v}{%v}{%v}{%v}\n", name, desc, inst, pers, + act.Introduced, act.Updated) } } @@ -124,12 +139,16 @@ func main() { fmt.Print("\n% STANCES\n") for _, stn := range stances { - name, ex := stn.Name[lang] + if *version != "" && stn.Updated != *version { + continue + } + + name, ex := stn.Name[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Name for stance card %v", lang, stn)) } - desc, ex := stn.Description[lang] + desc, ex := stn.Description[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Description for stance card %v", lang, stn)) } @@ -137,7 +156,8 @@ func main() { stancetype := strings.ToUpper(stn.Type) for i := 0; i < stn.Copies; i++ { - fmt.Printf("\\stance{%v}{%v}{%v}{%v}{%v}\n", name, desc, stancetype, stn.AgainstBargain, stn.AgainstBetrayal) + fmt.Printf("\\stance{%v}{%v}{%v}{%v}{%v}{%v}{%v}\n", name, desc, stancetype, + stn.AgainstBargain, stn.AgainstBetrayal, stn.Introduced, stn.Updated) } } @@ -151,18 +171,23 @@ func main() { fmt.Print("\n% FINALS\n") for _, fin := range finals { - name, ex := fin.Name[lang] + if *version != "" && fin.Updated != *version { + continue + } + + name, ex := fin.Name[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Name for final card %v", lang, fin)) } - desc, ex := fin.Description[lang] + desc, ex := fin.Description[*lang] if !ex { panic(fmt.Sprintf("No '%v' language Description for final card %v", lang, fin)) } for i := 0; i < fin.Copies; i++ { - fmt.Printf("\\final{%v}{%v}{%v}\n", name, desc, fin.Priority) + fmt.Printf("\\final{%v}{%v}{%v}{%v}{%v}\n", name, desc, fin.Priority, + fin.Introduced, fin.Updated) } }