From 11468cf4931922c81ddea80fbb8cdb44a16809a0 Mon Sep 17 00:00:00 2001 From: tannerkrewson Date: Sun, 24 Jan 2021 10:53:15 -0600 Subject: [PATCH] Second attempt at allbad.cards --- config/games/allbadcards.ts | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 config/games/allbadcards.ts diff --git a/config/games/allbadcards.ts b/config/games/allbadcards.ts new file mode 100644 index 0000000..db28923 --- /dev/null +++ b/config/games/allbadcards.ts @@ -0,0 +1,39 @@ +import { randomBytes } from "crypto"; +import { ServerGame } from "../../types/types"; + +const game: ServerGame = { + id: "allbadcards", + name: "All Bad Cards", + author: "Jake Lauer", + basedOn: { + game: "Cards Against Humanity", + link: "https://cardsagainsthumanity.com/", + }, + description: + "Be rude. Be irreverent. Be hilarious! Select the card from your hand that you think is best described by a card played by the judge!", + displayUrlText: "allbad.cards", + displayUrlHref: "https://allbad.cards/", + donationUrlText: "Support Jake on Patreon!", + donationUrlHref: "https://www.patreon.com/Allbadcards", + category: ["easy"], + players: "4-20+", + familyFriendly: false, + connectToGame: async () => { + const roomId = "rocketcrab-" + randomBytes(8).toString("hex"); + return { + player: { + url: "https://allbad.cards/api/abc/external-create", + customQueryParams: { roomId: "external-room-" + roomId }, + }, + host: { + customQueryParams: { roomId }, + }, + }; + }, + renameParams: { + name: "userName", + ishost: "isHost", + }, +}; + +export default game;