From ca3f2796086d8a90781f22ccf6762325f46e5ea1 Mon Sep 17 00:00:00 2001 From: SawJester Date: Thu, 12 Dec 2024 01:29:17 -0500 Subject: [PATCH] Joker fixes and Cop report change reverted for real this time (#1781) Joker can win if Dawn is occurring. Added a Special Interaction between Joker and Assassin to make Joker more like it's Split Decision version. --- Games/types/Mafia/information/BinaryAlignmentInfo.js | 6 +++--- Games/types/Mafia/roles/cards/WinIfNightKilled.js | 9 +++++++-- data/roles.js | 10 ++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Games/types/Mafia/information/BinaryAlignmentInfo.js b/Games/types/Mafia/information/BinaryAlignmentInfo.js index 7581ebd8b..dd813f0eb 100644 --- a/Games/types/Mafia/information/BinaryAlignmentInfo.js +++ b/Games/types/Mafia/information/BinaryAlignmentInfo.js @@ -43,10 +43,10 @@ module.exports = class BinaryAlignmentInfo extends Information{ getInfoFormated(){ super.getInfoRaw(); - if(this.randomTarget == true){ + return `You Learn that your ${this.target.name} is ${this.mainInfo}` - } - return `You Learn that your Target is ${this.mainInfo}` + + //return `You Learn that your Target is ${this.mainInfo}` } isTrue() { diff --git a/Games/types/Mafia/roles/cards/WinIfNightKilled.js b/Games/types/Mafia/roles/cards/WinIfNightKilled.js index b6263a4b3..a9d9ebcf1 100644 --- a/Games/types/Mafia/roles/cards/WinIfNightKilled.js +++ b/Games/types/Mafia/roles/cards/WinIfNightKilled.js @@ -9,9 +9,14 @@ module.exports = class WinIfNightKilled extends Card { priority: PRIORITY_WIN_IF_CONDEMNED, againOnFinished: true, check: function (counts, winners) { + const assassinInGame = this.game.players.filter( + (p) => p.role.name === "Assassin" + ); if (this.data.nightKilled && !winners.groups[this.name]) { winners.addPlayer(this.player, this.name); - return true; + if(assassinInGame.length <= 0){ + return true; + } } }, }; @@ -20,7 +25,7 @@ module.exports = class WinIfNightKilled extends Card { if ( player == this.player && deathType == "basic" && - this.game.getStateName() == "Night" + (this.game.getStateName() == "Night" || this.game.getStateName() == "Dawn") ) this.data.nightKilled = true; }, diff --git a/data/roles.js b/data/roles.js index 0ad38838c..62acbff93 100644 --- a/data/roles.js +++ b/data/roles.js @@ -130,6 +130,11 @@ const roleData = { "If the target was attacked, the Bodyguard will kill one attacker and die.", "If the target was the Celebrity, the Bodyguard will kill all attackers and die.", ], + SpecialInteractions: { + Celebrity: [ + "If a Bodyguard is Protecting a Celebrity, the Bodyguard will kill all attackers and die.", + ], + }, }, Doctor: { alignment: "Village", @@ -2992,6 +2997,11 @@ const roleData = { "Wins if killed at Night.", "No one else wins if the Joker wins.", ], + SpecialInteractions: { + Assassin: [ + "If an Assassin is Present, Joker winning does not prevent other players from Winning.", + ], + }, }, Admirer: { alignment: "Independent",