Skip to content
Snippets Groups Projects
Commit f428b7c8 authored by Pregmodder's avatar Pregmodder
Browse files

template literal implementation

parent 547cb877
No related branches found
No related tags found
No related merge requests found
...@@ -20,27 +20,27 @@ window.saRest = function saRest(slave) { ...@@ -20,27 +20,27 @@ window.saRest = function saRest(slave) {
} }
if (slave.health > 90) { if (slave.health > 90) {
t += " " + His + " health is so outstanding that rest does not improve it."; t += ` ${His} health is so outstanding that rest does not improve it.`;
} else if (slave.health > -100) { } else if (slave.health > -100) {
t += " " + His + " <span class='green'>health recovers</span> with rest."; t += ` ${His} <span class='green'>health recovers</span> with rest.`;
slave.health += 10; slave.health += 10;
} }
if (slave.fuckdoll == 0 && slave.fetish != "mindbroken") { if (slave.fuckdoll == 0 && slave.fetish != "mindbroken") {
if (slave.devotion > 20) { if (slave.devotion > 20) {
if (slave.trust <= 20) { if (slave.trust <= 20) {
t += " Being allowed to rest <span class='mediumaquamarine'>reduces " + his + " fear</span> of you."; t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
slave.trust += 4; slave.trust += 4;
} else if (slave.trust <= 50) { } else if (slave.trust <= 50) {
t += " Being allowed to rest <span class='mediumaquamarine'>builds " + his + " trust</span> in you."; t += ` Being allowed to rest <span class='mediumaquamarine'>builds ${his} trust</span> in you.`;
slave.trust += 2; slave.trust += 2;
} else { } else {
t += " Being allowed to rest <span class='mediumaquamarine'>confirms " + his + " trust</span> in you."; t += ` Being allowed to rest <span class='mediumaquamarine'>confirms ${his} trust</span> in you.`;
slave.trust += 2; slave.trust += 2;
} }
} else { } else {
if (slave.trust < -20) { if (slave.trust < -20) {
t += " Being allowed to rest <span class='mediumaquamarine'>reduces " + his + " fear</span> of you."; t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
slave.trust += 4; slave.trust += 4;
} }
} }
......
...@@ -7,41 +7,41 @@ window.saServant = function saServant(slave) { ...@@ -7,41 +7,41 @@ window.saServant = function saServant(slave) {
var He = capFirstChar(he), His = capFirstChar(his); var He = capFirstChar(he), His = capFirstChar(his);
var V = State.variables; var V = State.variables;
var t = "works as a servant. " + He + " performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief."; var t = "works as a servant. ${He} performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief.";
if (V.servantsQuarters > 0) { if (V.servantsQuarters > 0) {
if ((V.universalRulesFacilityWork == 1 && slave.assignment == "be a servant" && V.servantsQuartersSpots > 0) || (slave.assignment == "work as a servant")) { if ((V.universalRulesFacilityWork == 1 && slave.assignment == "be a servant" && V.servantsQuartersSpots > 0) || (slave.assignment == "work as a servant")) {
if (slave.assignment == "be a servant") { if (slave.assignment == "be a servant") {
t += " Since there's extra space in the servants' quarters, " + V.assistantName + " attaches " + him + " to the cadre of maids there."; t += ` Since there's extra space in the servants' quarters, ${V.assistantName} attaches ${him} to the cadre of maids there.`;
V.servantsQuartersSpots--; V.servantsQuartersSpots--;
} }
if (V.Stewardess != 0) { if (V.Stewardess != 0) {
t += " This brings " + him + " under " + V.Stewardess.slaveName + "'s supervision. The Stewardess "; t += ` This brings ${him} under ${V.Stewardess.slaveName}'s supervision. The Stewardess `;
if (slave.devotion < -20) { if (slave.devotion < -20) {
t += "subjects " + him + " to corrective rape when " + his + "service is imperfect, or when the Stewardess feels like raping " + him + ", forcing the poor slave to <span class='yellowgreen'>find refuge in work.</span>"; t += `subjects ${him} to corrective rape when ${his}service is imperfect, or when the Stewardess feels like raping ${him}, forcing the poor slave to <span class='yellowgreen'>find refuge in work.</span>`;
} else if (slave.devotion <= 20) { } else if (slave.devotion <= 20) {
t += "molests " + him + ", encouraging the poor slave to keep " + his + " head down and <span class='yellowgreen'>work harder.</span>"; t += `molests ${him}, encouraging the poor slave to keep ${his} head down and <span class='yellowgreen'>work harder.</span>`;
} else { } else {
t += "uses sex as a reward, getting " + him + " off when " + he + " <span class='yellowgreen'>works harder.</span>"; t += `uses sex as a reward, getting ${him} off when ${he} <span class='yellowgreen'>works harder.</span>`;
} }
V.cash += V.stewardessBonus; V.cash += V.stewardessBonus;
} }
} }
} }
t += " " + He + " is "; t += " ${He} is ";
if (slave.trust < -20) { if (slave.trust < -20) {
t += "frightened of punishment and works very hard, <span class='yellowgreen'>reducing the upkeep</span> of your slaves."; t += "frightened of punishment and works very hard, <span class='yellowgreen'>reducing the upkeep</span> of your slaves.";
} else if (slave.devotion < -20) { } else if (slave.devotion < -20) {
t += "reluctant, requiring your other slaves to force " + his + " services, and does not <span class='yellowgreen'>reduce upkeep</span> of your slaves much."; t += `reluctant, requiring your other slaves to force ${his} services, and does not <span class='yellowgreen'>reduce upkeep</span> of your slaves much.`;
} else if (slave.devotion <= 20) { } else if (slave.devotion <= 20) {
t += "hesitant, requiring your other slaves to demand " + his + " services, and only slightly <span class='yellowgreen'>reduces upkeep</span> of your slaves."; t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class='yellowgreen'>reduces upkeep</span> of your slaves.`;
} else if (slave.devotion <= 50) { } else if (slave.devotion <= 50) {
t += "obedient, offering your other slaves " + his + " services, and moderately <span class='yellowgreen'>reduces the upkeep</span> of your slaves."; t += `obedient, offering your other slaves ${his} services, and moderately <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
} else if (slave.devotion <= 95) { } else if (slave.devotion <= 95) {
t += "devoted, happily giving your other slaves " + his + " services, and <span class='yellowgreen'>reduces the upkeep</span> of your slaves."; t += `devoted, happily giving your other slaves ${his} services, and <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
} else { } else {
t += "so happy to serve your other slaves that " + he + " often sees to their needs before they know they have them, and greatly <span class='yellowgreen'>reduces the upkeep</span> of your slaves."; t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
} }
let _oral = jsRandom(5,10); let _oral = jsRandom(5,10);
...@@ -49,45 +49,45 @@ window.saServant = function saServant(slave) { ...@@ -49,45 +49,45 @@ window.saServant = function saServant(slave) {
V.oralTotal += _oral; V.oralTotal += _oral;
if (slave.relationship == -2) { if (slave.relationship == -2) {
t += " " + He + " does " + his + " best to perfect your domesticity due to " + his + " emotional bond to you."; t += ` ${He} does ${his} best to perfect your domesticity due to ${his} emotional bond to you.`;
} else if (slave.relationship == -3 && slave.devotion > 50) { } else if (slave.relationship == -3 && slave.devotion > 50) {
t += " " + He + " does " + his + "very best to be the perfect housewife, making " + him + " an outstanding servant."; t += ` ${He} does ${his}very best to be the perfect housewife, making ${him} an outstanding servant.`;
} }
if (setup.servantCareers.includes(slave.career)) { if (setup.servantCareers.includes(slave.career)) {
t += " " + He + " has experience with house keeping from " + his + " life before " + he + " was a slave, making " + him + " more effective."; t += ` ${He} has experience with house keeping from ${his} life before ${he} was a slave, making ${him} more effective.`;
} else if (slave.skillS >= V.masteredXP) { } else if (slave.skillS >= V.masteredXP) {
t += " " + He + " has experience with house keeping from working for you, making " + him + " more effective."; t += ` ${He} has experience with house keeping from working for you, making ${him} more effective.`;
} else { } else {
slave.skillS += jsRandom(1,(slave.intelligence+4)*2); slave.skillS += jsRandom(1,(slave.intelligence+4)*2);
} }
if (slave.fetishStrength > 60) { if (slave.fetishStrength > 60) {
if (slave.fetish == "submissive" && slave.fetishKnown == 1) { if (slave.fetish == "submissive" && slave.fetishKnown == 1) {
t += " " + His + " natural affinity for submission increases " + his + " effectiveness."; t += ` ${His} natural affinity for submission increases ${his} effectiveness.`;
} else if (slave.fetishKnown == 1 && slave.fetish == "dom") { } else if (slave.fetishKnown == 1 && slave.fetish == "dom") {
t += " " + His + " sexual appetite for domination reduces " + his + " effectiveness."; t += ` ${His} sexual appetite for domination reduces ${his} effectiveness.`;
} }
} }
if (slave.energy < 20) { if (slave.energy < 20) {
t += " " + His + " frigidity allows " + him + " to ignore the intercourse all around " + him + ", making " + him + " very efficient."; t += ` ${His} frigidity allows ${him} to ignore the intercourse all around ${him}, making ${him} very efficient.`;
} else if (slave.energy < 40) { } else if (slave.energy < 40) {
t += " " + His + " low sex drive keeps " + him + " from becoming too distracted by the intercourse all around " + him + ", making " + him + " more efficient."; t += ` ${His} low sex drive keeps ${him} from becoming too distracted by the intercourse all around ${him}, making ${him} more efficient.`;
} }
if ((slave.eyes <= -1 && slave.eyewear != "corrective glasses" && slave.eyewear != "corrective contacts") || (slave.eyewear == "blurring glasses") || (slave.eyewear == "blurring contacts")) { if ((slave.eyes <= -1 && slave.eyewear != "corrective glasses" && slave.eyewear != "corrective contacts") || (slave.eyewear == "blurring glasses") || (slave.eyewear == "blurring contacts")) {
t += " " + His + " bad vision makes " + him + " a worse servant."; t += ` ${His} bad vision makes ${him} a worse servant.`;
} }
if (slave.lactation > 0) { if (slave.lactation > 0) {
t += " Since " + he + " is lactating, "; t += " Since ${he} is lactating, ";
if (slave.devotion > 20 || slave.trust < -20) { if (slave.devotion > 20 || slave.trust < -20) {
t += he + " serves "; t += ` ${he} serves `;
} else { } else {
t += "and disobedient, " + he + " is restrained to serve "; t += `and disobedient, ${he} is restrained to serve `;
} }
t += "as a drink dispenser at mealtimes, and makes a meaningful contribution to " + his + " fellow slaves' nutrition in concert with the feeding systems."; t += `as a drink dispenser at mealtimes, and makes a meaningful contribution to ${his} fellow slaves' nutrition in concert with the feeding systems.`;
} }
return t; return t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment