diff --git a/src/endWeek/saDevotion.js b/src/endWeek/saDevotion.js index fa414216e28e8b58bf03654ec0a71576fab45bc4..3e2e42f4f9e82825ffa9b146b940e79f844e159f 100644 --- a/src/endWeek/saDevotion.js +++ b/src/endWeek/saDevotion.js @@ -7,6 +7,7 @@ App.SlaveAssignment.devotion = (function() { let he, him, his, hers, himself, girl, He, His; let playerPronouns; let PC; + let gettingPersonalAttention; return saDevotion; @@ -25,6 +26,8 @@ App.SlaveAssignment.devotion = (function() { } = getPronouns(slave)); playerPronouns = getPronouns(PC); + gettingPersonalAttention = Array.isArray(V.personalAttention) && V.personalAttention.some((s) => s.ID === slave.ID); + if (slave.fetish === "mindbroken") { mindbreakDevotion(slave); } else if (slave.fuckdoll !== 0) { @@ -114,7 +117,7 @@ App.SlaveAssignment.devotion = (function() { slave.devotion += 5; slave.trust += 5; } else if (V.rivalryDuration > 20 && slave.devotion < 5) { - if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + if (gettingPersonalAttention) { r.push(`You took everything from ${slave.slaveName} and <span class="devotion dec">${he} hates you for it.</span> Since you won't give ${him} what ${he} wants, ${he} <span class="trust dec">refuses to trust you.</span> Since you are putting such a personal touch into ${his} care, ${he} can't find it in ${him} to rebel as strongly.`); slave.devotion -= 5; slave.trust -= 5; @@ -124,7 +127,7 @@ App.SlaveAssignment.devotion = (function() { slave.trust -= 25; } } else if (V.rivalryDuration > 10 && slave.devotion < 5) { - if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + if (gettingPersonalAttention) { r.push(`${He} is <span class="trust dec">horrified by you.</span> Your rival taught ${him} a great deal about slave life in your arcology and indulged ${his} deepest fantasies. ${slave.slaveName} considers being your pet <span class="devotion dec">a fate worse than death.</span> Since you are putting such a personal touch into ${his} care, maybe you aren't the monster ${he} thought you were. ${He} can't find it in ${him} to hate and fear you as much.`); slave.devotion -= 3; slave.trust -= 3; @@ -208,7 +211,7 @@ App.SlaveAssignment.devotion = (function() { } const effectiveInt = (slave.intelligence + slave.intelligenceImplant); if (effectiveInt > 95) { - if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">brilliant mind</span> strongly resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} genius.`); } else { if (slave.trust < -20) { @@ -220,7 +223,7 @@ App.SlaveAssignment.devotion = (function() { } } } else if (effectiveInt > 50) { - if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">highly acute mind</span> naturally resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} intelligence.`); } else { if (slave.trust < -20) { @@ -232,7 +235,7 @@ App.SlaveAssignment.devotion = (function() { } } } else if (effectiveInt > 15) { - if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + if (gettingPersonalAttention) { r.push(`${slave.slaveName}'s <span class="intelligent">intelligent mind</span> naturally resists slavery, but since you are giving ${him} personal attention you are able to compensate for ${his} cleverness.`); } else { if (slave.trust < -20) { @@ -885,7 +888,7 @@ App.SlaveAssignment.devotion = (function() { if (slave.devotion >= (slave.oldDevotion + 5)) { if (V.arcologies[0].FSChattelReligionist >= random(1, 100)) { r.push(`The natural resilience of ${his} mind is overcome by the omnipresent combination of faith and servitude in ${V.arcologies[0].name}, and ${he} does not resist ${his} progress down the path towards total subservience.`); - } else if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + } else if (gettingPersonalAttention) { r.push(`${He} gained so much regard for you this week that ${his} natural reaction is to rebound a little, but since you're giving ${him} personal attention, your charismatic presence prevents this.`); } else if (slave.devotion < 95) { r.push(`So many things served to drive ${him} into subservience this week that ${his} mind <span class="devotion dec">rebounds a little.</span>`); @@ -917,7 +920,7 @@ App.SlaveAssignment.devotion = (function() { if (slave.trust >= (slave.oldTrust + 5)) { if (V.arcologies[0].FSChattelReligionist >= random(1, 100)) { r.push(`Any natural doubts ${he} harbors are overcome by ${his} belief in Chattel Religionism, and ${he} does not resist ${his} progress down the path towards total trust in you.`); - } else if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex((s) => s.ID === slave.ID) !== -1) { + } else if (gettingPersonalAttention) { r.push(`${He} gained so much trust in you this week that ${his} natural reaction is to doubt ${himself}, but since you're giving ${him} personal attention, ${he} decides to trust ${his} understanding of your will.`); } else if (slave.trust < 95) { r.push(`${He} gained so much trust in you this week that ${he} <span class="trust dec">draws back a little</span> out of self-doubt.`);