From aa5874985e61b368c211e18f96140d5d1b88d354 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sat, 3 Oct 2020 17:16:48 -0700 Subject: [PATCH] Personal attention fix --- src/endWeek/saLongTermEffects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js index f8032c726e3..38038389b35 100644 --- a/src/endWeek/saLongTermEffects.js +++ b/src/endWeek/saLongTermEffects.js @@ -1518,13 +1518,13 @@ App.SlaveAssignment.longTermEffects = (function() { * */ function mentalTension(slave) { - let givingAttention = Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID); + let attention = Array.isArray(V.personalAttention) && V.personalAttention.find((s) => s.ID === slave.ID); if (slave.behavioralFlaw === "none") { if (slave.trust < -20 && slave.devotion <= 50) { if (random(1, 100) > 100 + slave.trust) { effect = random(1, 4); r.push(`Being so afraid so constantly drives ${him} to find solace in`); - if (givingAttention && ["build her devotion", "look after her", "soften her behavioral flaw", "soften her sexual flaw", "teach her"].includes(V.personalAttention[givingAttention].trainingRegimen)) { + if (attention && ["build her devotion", "look after her", "soften her behavioral flaw", "soften her sexual flaw", "teach her"].includes(attention.trainingRegimen)) { r.push(`your attention. Relying on you for <span class="devotion inc">emotional support</span> strengthens ${his} <span class="trust inc">bond</span> with ${getWrittenTitle(slave)}.`); slave.devotion++; slave.trust++; -- GitLab