crhallberg / json-against-humanity

Finally, Cards Against Humanity as plain text and JSON.
https://crhallberg.com/cah/
Other
167 stars 37 forks source link

_[SAME CARD AGAIN]_ black cards, pick value error #43

Open ThomasBisset opened 1 year ago

ThomasBisset commented 1 year ago

I'm currently making a script which uses the JSON files and have noticed a bit of a quirk with two specific cards so far:

    {
      "text": "You want _? You can't handle _[SAME CARD AGAIN]_!",
      "pick": 3
    },

And:

    {
      "text": "Let's take it from the top, and remember, you are _. Show me  _(SAME CARD AGAIN)_.",
      "pick": 3
    },

It should be "pick: 1" in both cases.

Both of these cards appear in the CAH Packs on the Google Docs Spreadsheet; I have not yet looked to see if there's any others. I'm guessing your script counts underscores but it also counts the ones surrounding the second blank space. I can't think of a more elegant solution other than adding a special case for each of the cards, unfortunately. I've done this in my own Python script, but JS isn't my jam!