diff --git a/package.json b/package.json index 983abcb..32e4495 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cards-against-humanity", - "version": "2.1.1", + "version": "2.1.2", "description": "Cards Against Humanity, but for Discord!", "main": "CAH.js", "scripts": { diff --git a/structures/Player.js b/structures/Player.js index d9a4403..74ab907 100644 --- a/structures/Player.js +++ b/structures/Player.js @@ -73,7 +73,10 @@ module.exports = class Player { return this.turn(channel, czar, black, deck, chosenCards); // eslint-disable-line consistent-return } if (choices.size < black.pick) { - for (let i = 0; i < black.pick; i++) chosen.push(hand[Math.floor(Math.random() * hand.length)]); + for (let i = 0; i < black.pick; i++) { + const valid = hand.filter(card => !chosen.includes(card)); + chosen.push(valid[Math.floor(Math.random() * valid.length)]); + } this.strikes++; } if (chosen.includes('')) {