Cards Against Humanity?


#1

Hi guys is there a way to add Cards Against Humanity to phantombot?
I know Ankhbot has the ability to do it via 2 pastebin files however i was wondering
if phantombot would be able to do it as well.


#2

It’s not so much needing to add it as a game, Phantombot will only perform the (readfilerand) command once per command response. ie:

Caster: !addcomm !cah Prompt: (readfilerand cahwhite.txt) Response: (readfilerand cahblack.txt)

will be accepted, but when run (the cahwhite.txt and cahblack.txt files do exist):

Viewer: !cah
Bot: Prompt: An overwhelming variety of cheeses. Response: (readfilerand cahblack.txt)


#3

I think it’d be better if you placed this in a script instead of trying to do this in a single custom command.

That way it allows for more flexibility, and on top of it, it allows for a lot more customization.

It’d take a lot of work, but using a custom script you could base it around the actual rules of CAH.

For instance: Set a timer for the game. When first triggered, it starts the game, and the bot prints out a random black card. Users will then type !draw and they’ll place a random white card for the black card. People could vote on which drawn card fits best. That person “wins” the round and gets some form of points.

It could get a lot more complex than that (like giving users their own hands and etc), but that’s just a start.


#4

There’s a JSON version of CAH which you might be able to work with, but it’d probably still take some work to get up and going.

https://www.npmjs.com/package/cah-cards