diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js index f8032c726e3df00bbb1b0d71fd50b5ca1b45bd44..38038389b35c637336b40c35eb4ba4a12e1fd313 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++;