Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Bad Cards #46

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions config/games/allbad.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { randomBytes } from "crypto";
import { ServerGame } from "../../types/types";

const gameTemplate = ({
id,
name,
description,
displayUrlText,
displayUrlHref,
basedOn,
category,
players,
familyFriendly,
guideUrl,
guideId,
}: //pictures,
Partial<ServerGame>): ServerGame => ({
id,
name: name,
author: "Jake Lauer",
basedOn,
description,
displayUrlText,
displayUrlHref,
donationUrlText: "Support Jake on Patreon!",
donationUrlHref: "https://www.patreon.com/Allbadcards",
category,
players,
familyFriendly,
//pictures,
...(guideUrl ? { guideUrl } : {}),
...(guideId ? { guideId } : {}),
connectToGame: async () => {
const roomId = "rocketcrab-" + randomBytes(8).toString("hex");
return {
player: {
url: displayUrlHref + "api/external-create",
customQueryParams: { roomId },
},
};
},
renameParams: {
name: "userName",
ishost: "isHost",
},
});

const games: Array<ServerGame> = [
gameTemplate({
id: "allbadcards",
name: "All Bad Cards",
author: "Jake Lauer",
basedOn: {
game: "Cards Against Humanity",
link: "https://cardsagainsthumanity.com/",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
bggId: 50381,
},

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/",
category: ["easy"],
players: "4-20+",
familyFriendly: false,
}),
gameTemplate({
id: "notallbadcards",
name: "(not) All Bad Cards",
author: "Jake Lauer",
basedOn: {
game: "Apples to Apples",
link:
"https://www.mattelgames.com/games/en-us/family/apples-apples",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
bggId: 74,
},

description:
"PG Family-friendly edition! be hilarious! Select the card from your hand that you think is best described by a card played by the judge!",
displayUrlText: "not.allbad.cards",
displayUrlHref: "https://not.allbad.cards/",
category: ["easy"],
players: "4-20+",
familyFriendly: true,
}),
gameTemplate({
id: "allbadmemes",
name: "All Bad Memes",
author: "Jake Lauer",
basedOn: undefined,
description: "Caption to your heart's content.",
displayUrlText: "memes.allbad.cards",
displayUrlHref: "https://memes.allbad.cards/",
category: ["easy"],
players: "4-20+",
familyFriendly: true,
}),
];

export default games;