From c4b7db7938432be7e02853df74acd1b5966a62b1 Mon Sep 17 00:00:00 2001 From: ultimafia-bot Date: Fri, 10 Nov 2023 04:04:36 +0000 Subject: [PATCH] run prettier --- .../types/Mafia/roles/cards/SubtractTurkeyOnDeath.js | 5 ++++- .../types/Mafia/roles/cards/WinIfOnlyTurkeyAlive.js | 12 +++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Games/types/Mafia/roles/cards/SubtractTurkeyOnDeath.js b/Games/types/Mafia/roles/cards/SubtractTurkeyOnDeath.js index b4b201af6..9d577ae38 100644 --- a/Games/types/Mafia/roles/cards/SubtractTurkeyOnDeath.js +++ b/Games/types/Mafia/roles/cards/SubtractTurkeyOnDeath.js @@ -20,7 +20,10 @@ module.exports = class SubtractTurkeyOnDeath extends Card { ":turkey: The town thought they caught a Turkey, but instead you lose your lunch..." ); for (let person of this.game.players) { - if (person.alive && person.role.name !== "Turkey" || person.role.name !== "Tofurkey") { + if ( + (person.alive && person.role.name !== "Turkey") || + person.role.name !== "Tofurkey" + ) { this.stealItemByName("Food", "Turkey"); } } diff --git a/Games/types/Mafia/roles/cards/WinIfOnlyTurkeyAlive.js b/Games/types/Mafia/roles/cards/WinIfOnlyTurkeyAlive.js index 7d157c80a..59dc64ef9 100644 --- a/Games/types/Mafia/roles/cards/WinIfOnlyTurkeyAlive.js +++ b/Games/types/Mafia/roles/cards/WinIfOnlyTurkeyAlive.js @@ -11,8 +11,11 @@ module.exports = class WinIfOnlyTurkeyAlive extends Card { check: function (counts, winners, aliveCount) { if ( this.player.alive && - this.game.alivePlayers().filter((p) => p.role.name === "Turkey" || p.role.name === "Tofurkey") - .length === aliveCount + this.game + .alivePlayers() + .filter( + (p) => p.role.name === "Turkey" || p.role.name === "Tofurkey" + ).length === aliveCount ) { winners.addPlayer(this.player, this.name); } @@ -21,7 +24,10 @@ module.exports = class WinIfOnlyTurkeyAlive extends Card { this.listeners = { start: function () { for (let player of this.game.players) { - if (player.role.name === "Turkey" || player.role.name === "Tofurkey" && player !== this.player) { + if ( + player.role.name === "Turkey" || + (player.role.name === "Tofurkey" && player !== this.player) + ) { this.revealToPlayer(player); } }