From 7cf3bdf36e8faa01d4b2544b4027d151be65ee9d Mon Sep 17 00:00:00 2001 From: "C. Yang" Date: Sat, 6 Jan 2024 21:51:25 -0500 Subject: [PATCH] update chats logic --- src/chats.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chats.js b/src/chats.js index f0bab66..c83fbfc 100644 --- a/src/chats.js +++ b/src/chats.js @@ -6,7 +6,10 @@ let pleasantChat = { positive: ['smile', 'happy', 'heart', 'A-happy:had a nice chat with FISH2.', 'B-happy:had a nice chat with FISH1.'], negative: ['angry', 'surprised', 'grumpy', 'A-unhappy:tried to have a nice chat, but FISH2 was in a bad mood.'], isPositive: function (fish1, fish2) { - return Math.random() < 0.8; + if (!fish2.goodMood) { + return Math.random() < 0.3; + } + return true; }, }; let prankChat = {