From 1e8b5665c183d22739c2c7429f3c8fd9c1badb34 Mon Sep 17 00:00:00 2001 From: drewsworthh <168869844+drewsworthh@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:23:48 -0600 Subject: [PATCH] Fiddle change (#1772) when fiddled, can see who speaks but not the content of message --------- Co-authored-by: Golbolco --- Games/core/Player.js | 5 +++++ Games/types/Mafia/effects/Fiddled.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Games/core/Player.js b/Games/core/Player.js index 03211d451..85e4d5b78 100644 --- a/Games/core/Player.js +++ b/Games/core/Player.js @@ -682,6 +682,11 @@ module.exports = class Player { for (let effect of this.effects) { effect.hear(message); if (message.cancel) return; + if(message.fiddled){ + message = originalMessage; + message.content = message.sender.name + " says something, but you cannot hear them!"; + message.modified = true; + break; } } if (!message.modified) message = originalMessage; diff --git a/Games/types/Mafia/effects/Fiddled.js b/Games/types/Mafia/effects/Fiddled.js index 9b0086721..4ce3973c5 100644 --- a/Games/types/Mafia/effects/Fiddled.js +++ b/Games/types/Mafia/effects/Fiddled.js @@ -8,7 +8,7 @@ module.exports = class Fiddled extends Effect { hear(message) { if (!message.isServer && message.sender != this.player) { - message.cancel = true; + message.fiddled = true; } }