diff --git a/src/uncategorized/PETS.tw b/src/uncategorized/PETS.tw index a833c90fef93c4f63d2badf7a4f24cf174b73cdc..c81311c30b9fde663df9e978df681b67032071cc 100644 --- a/src/uncategorized/PETS.tw +++ b/src/uncategorized/PETS.tw @@ -127,16 +127,16 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<set $activeSlave.vaginalCount += 1>> <<set $vaginalTotal += 1>> <<elseif canDoAnal($activeSlave)>> - <<set $activeSlave.analCount += 1>> - <<set $analTotal += 1>> + <<set $activeSlave.analCount += 1>> + <<set $analTotal += 1>> <</if>> <<set $activeSlave.oralCount += 20>> <<set $oralTotal += 20>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $activeSlave.assignment == "get treatment in the clinic">> - <<set $slaves[$i].trust += 2>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.assignment == "get treatment in the clinic") { + s.trust += 2; + } + })>> <</replace>> <</link>> <<if canDoVaginal($activeSlave) || canDoAnal($activeSlave)>> @@ -261,15 +261,9 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#result">> In a conversational tone of voice, you tell $activeSlave.slaveName to continue the spanking. $subSlave.slaveName has one anguished second to realize what's happening before you shove yourself <<if ($PC.dick == 0)>>against her mouth<<else>>down her throat<</if>>. She gags reflexively, jerking back, only to jerk forward again in automatic pain avoidance when $activeSlave.slaveName hits her already-sore buttocks yet again. She's broken enough to understand that she needs to relax and let herself be abused, but her body's reflexive responses deny her the relief that might give. The sadistic stewardess @@.hotpink;comes twice@@ before you do, a deliciously aggressive expression on her face. Poor $subSlave.slaveName staggers off coughing, promising to @@.gold;never offend@@ again. <<set $activeSlave.devotion += 4>> - <<set $subSlave.trust -= 5>> - <<set $subSlave.oralCount += 1>> - <<set $oralTotal += 1>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $subSlave.ID == $slaves[$i].ID>> - <<set $slaves[$i] = $subSlave>> - <<break>> - <</if>> - <</for>> + <<set $subSlave.trust -= 5, $subSlave.oralCount += 1, $oralTotal += 1>> + <<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>> + <<set $slaves[_i] = $subSlave>> <</replace>> <</link>> <br><<link "Make sure your stewardess remembers her place">> @@ -287,28 +281,22 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#name">>$activeSlave.slaveName<</replace>> <<replace "#result">> You lean against the doorway of the classroom. $activeSlave.slaveName glances at you, but you subtly let her know to continue with her business. When she finishes the lesson and, around the same time, climaxes, you clear your throat. The students all start with surprise and turn to you with trepidation. You observe in a conversational tone of voice that $activeSlave.slaveName is making great sacrifices here, performing an unsexy, boring job, and that any slave that does not work hard to learn will find herself at the teacher's sexual disposal. Several of the least attentive students @@.green;try to look studious,@@ though a few of the better ones can't hide a certain anticipation. - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].assignment == "learn in the schoolroom">> - <<set $slaves[$i].intelligenceImplant += 0.1>> - <<set $slaves[$i].oralCount += 1>> - <<set $oralTotal += 1>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.assignment == "learn in the schoolroom") { + s.intelligenceImplant += 0.1; + s.oralCount += 1; + }; + })>> + <<set $oralTotal += $schoolroomSlaves>> <</replace>> <</link>> <br><<link "Take the delinquent student in hand">> <<replace "#name">>$activeSlave.slaveName<</replace>> <<replace "#result">> When $activeSlave.slaveName finishes using $subSlave.slaveName's mouth, $subSlave.slaveName crawls out from under her desk and stumbles back towards her seat. She stops short when she realizes you're sitting in it. All the other students do their absolute best to be perfectly studious as $subSlave.slaveName gets back to her knees, for you this time. After class is over, you tell her that since she can't have been paying particularly good attention, she'll have to take @@.green;remedial classes@@ after everyone else is done. $activeSlave.slaveName gives $subSlave.slaveName a very thorough grope at 'remedial classes,' making sure to pinch her student's nipples. - <<set $subSlave.oralCount += 1>> - <<set $oralTotal += 1>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $subSlave.ID == $slaves[$i].ID>> - <<set $slaves[$i].oralCount += 1>> - <<set $oralTotal += 1>> - <<set $slaves[$i].intelligenceImplant += 0.5>> - <</if>> - <</for>> + <<set $subSlave.oralCount += 1, $oralTotal += 1, $subSlave.intelligenceImplant += 0.5>> + <<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>> + <<set $slaves[_i] = $subSlave>> <</replace>> <</link>> @@ -318,23 +306,23 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#name">>$activeSlave.slaveName<</replace>> <<replace "#result">> You let $activeSlave.slaveName know that as far as you're concerned, sleep is a privilege, not a right. She grins evilly and grinds herself into $subSlave.slaveName's mouth harder. The poor prisoner heard you, of course, and begins to produce muffled sobs as she realizes what this means for her. $activeSlave.slaveName reaches down and caresses her cheek. "There, there," she croons. <<if SlaveStatsChecker.checkForLisp($activeSlave)>>"It'th not rape if you do it in return for thomething."<<else>>"It's not rape if you do it in return for something."<</if>> All the prisoners are all that much more @@.hotpink;broken@@ this week, though sleep deprivation @@.red;isn't healthy.@@ - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].assignment == "be confined in the cellblock">> - <<set $slaves[$i].devotion += 10>> - <<set $slaves[$i].health -= 10>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.assignment == "be confined in the cellblock") { + s.devotion += 10; + s.health -= 10; + } + })>> <</replace>> <</link>> <br><<link "Have a quiet word with the Wardeness about prisoners' health">> <<replace "#name">>$activeSlave.slaveName<</replace>> <<replace "#result">> You let $activeSlave.slaveName finish using $subSlave.slaveName's mouth, turn off the lights in her cell, and then meet her outside. It won't do to undermine her in front of the prisoners. You offer a few choice remarks on the value of her charges to you and the potential effects of sleep deprivation, and point out that she is a poor Wardeness if she cannot break slaves without taking measures that may damage their health. She's clearly filled with remorse, begs your forgiveness, and manages to break slaves just as effectively this week while taking @@.green;better care@@ of their health. - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].assignment == "be confined in the cellblock">> - <<set $slaves[$i].health += 10>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.assignment == "be confined in the cellblock") { + s.health += 10; + } + })>> <</replace>> <</link>> <<if ($subSlave.anus > 0) && canDoAnal($subSlave)>> @@ -342,18 +330,10 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#name">>$activeSlave.slaveName<</replace>> <<replace "#result">> You silently interrupt $activeSlave.slaveName and indicate that she should sit down on the cell's bed without letting $subSlave.slaveName's head out from between her legs. She sits down with a thump, dragging the struggling $subSlave.slaveName with her. You<<if ($PC.dick == 0)>> pull on a strap-on, and then<</if>> seize $subSlave.slaveName's hips and hoist them into the air, giving her a horrible second of anticipation as you manhandle <<if ($PC.dick == 0)>>the cruelly large phallus<<else>>your cock<</if>> into place. She gives a strangled squeal of protest at the feeling of you pushing your way inexorably up her poor anus, making $activeSlave.slaveName jerk with surprise at the sensation of $subSlave.slaveName howling into her crotch. Twenty minutes later, you and $activeSlave.slaveName leave her @@.hotpink;quiescent@@ on the floor of the cell. After she locks the door after herself, $activeSlave.slaveName can't resist the urge to @@.hotpink;offer you a cheerful high-five.@@ - <<set $activeSlave.devotion += 10>> - <<set $activeSlave.oralCount += 1>> - <<set $oralTotal += 1>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID == $subSlave.ID>> - <<set $slaves[$i].devotion += 4>> - <<set $slaves[$i].oralCount += 2>> - <<set $oralTotal += 2>> - <<set $slaves[$i].analCount += 1>> - <<set $analTotal += 1>> - <</if>> - <</for>> + <<set $activeSlave.devotion += 10, $activeSlave.oralCount += 1, $oralTotal += 1>> + <<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 12, $subSlave.analCount += 1, $analTotal += 1>> + <<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>> + <<set $slaves[_i] = $subSlave>> <</replace>> <</link>> <</if>> @@ -362,18 +342,10 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#name">>$activeSlave<</replace>> <<replace "#result">> You silently interrupt $activeSlave.slaveName and indicate that she should sit down on the cell's bed without letting $subSlave.slaveName's head out from between her legs. She sits down with a thump, dragging the struggling $subSlave.slaveName with her. You<<if ($PC.dick == 0)>> pull on a strap-on, and then<</if>> seize $subSlave.slaveName's hips and hoist them into the air, giving her a horrible second of anticipation as you manhandle <<if ($PC.dick == 0)>>the cruelly large phallus<<else>>your cock<</if>> into place. She gives a strangled squeal of protest at the feeling of you pushing your way inexorably up her poor pussy, making $activeSlave.slaveName jerk with surprise at the sensation of $subSlave.slaveName howling into her crotch. Twenty minutes later, you and $activeSlave.slaveName leave her @@.hotpink;quiescent@@ on the floor of the cell. After she locks the door after herself, $activeSlave.slaveName can't resist the urge to @@.hotpink;offer you a cheerful high-five.@@ - <<set $activeSlave.devotion += 10>> - <<set $activeSlave.oralCount += 1>> - <<set $oralTotal += 1>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID == $subSlave.ID>> - <<set $slaves[$i].devotion += 4>> - <<set $slaves[$i].oralCount += 2>> - <<set $oralTotal += 2>> - <<set $slaves[$i].vaginaCount += 1>> - <<set $vaginalTotal += 1>> - <</if>> - <</for>> + <<set $activeSlave.devotion += 10, $activeSlave.oralCount += 1, $oralTotal += 1>> + <<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 2, $subSlave.vaginaCount += 1, $vaginalTotal += 1>> + <<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>> + <<set $slaves[_i] = $subSlave>> <</replace>> <</link>> <</if>> @@ -385,11 +357,9 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo <<replace "#result">> You meet $activeSlave.slaveName after $subSlave.slaveName leaves. She likes to take a cool shower after spending time in the steam, so you get under the refreshing water with her, encircling her <<if ($activeSlave.weight > 10)>>plush<<else>>taut<</if>> midriff with your arms and giving her a hug before asking her about $subSlave.slaveName. In $activeSlave.slaveName's opinion, there's nothing really wrong with her: she's just having a little trouble accepting different expectations about human interactions. <<if SlaveStatsChecker.checkForLisp($activeSlave)>>"The girl jutht needth a little help accepting that her free dayth are over, and it'th her place to therve you, <<Master>>," she lisps. "Like I have!"<<else>>"She just needs a little help accepting that she's a slave and it's her place to serve you, <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>>," she says. "Like I have!"<</if>> She wriggles around in your arms and plants a wet kiss on your nose. She's clean now, so you release her and she steps over to her towel. As she does, you land a wet slap on her <<if ($activeSlave.butt > 5)>>massive<<elseif ($activeSlave.butt > 3)>>big<<else>>nice<</if>> butt, eliciting a @@.hotpink;delighted@@ squeal. You use the information to @@.hotpink;subtly address@@ $subSlave.slaveName's unhappiness. <<set $activeSlave.devotion += 4>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID == $subSlave.ID>> - <<set $slaves[$i].devotion += 4>> - <</if>> - <</for>> + <<set $subSlave.devotion += 4>> + <<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>> + <<set $slaves[_i] = $subSlave>> <</replace>> <</link>> <br><<link "Leave the matter between the Attendant and the slave she's helping">> diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw index f2ca4c5137ae8e6f21accef5425470a5e4ee0344..f5828925bef1801249e4b1cb08a4507d3e094f52 100644 --- a/src/uncategorized/genericPlotEvents.tw +++ b/src/uncategorized/genericPlotEvents.tw @@ -7,19 +7,19 @@ <<switch $Event>> <<case "bad curatives">> -<<set $activeSlave = 0>> -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].curatives > 1 || $slaves[$i].inflationType == "curative">> - <<set $slaves[$i].health -= random(1,2)>> - <<set $activeSlave = $slaves[$i]>> - <</if>> -<</for>> -<<if $activeSlave == 0>> +<<set _i = $slaves.findIndex(function(s) { return s.curatives > 1 || s.inflationType == "curative"; })>> +<<if _i != -1>> + <<run $slaves.forEach(function(s) { + if (s.curatives > 1 || s.inflationType == "curative") { + s.health -= Math.floor(Math.random() * 2 + 1); + } + })>> +<<else>> <<goto "Random Nonindividual Event">> <</if>> <<set $cash += 500*$slaves.length>> -Early one morning, you hear convulsive dry heaving coming from one of the bathrooms. On investigation, it seems that $activeSlave.slaveName woke up feeling terribly nauseous. She's in no danger, but you've hardly checked her over before more slaves stagger in. Every one of your slaves on curatives has been struck by the mysterious malady and has @@.red;sickened.@@ +Early one morning, you hear convulsive dry heaving coming from one of the bathrooms. On investigation, it seems that $slaves[_i].slaveName woke up feeling terribly nauseous. She's in no danger, but you've hardly checked her over before more slaves stagger in. Every one of your slaves on curatives has been struck by the mysterious malady and has @@.red;sickened.@@ <br><br> It doesn't take much investigation before you find other slaveowners reporting the same thing. Elementary detective work fingers a particular drug supplier as the culprit, and before long the unfortunate Pharmaceutical concern is drowning under a rain of harsh public comment and harsher private contract warfare. As the day wears on, the poor slaves feel a bit better, but begin to report discomfort in their breasts. Apparently the problem has to do with contamination of the curative production line with A-HGH production reactants. <br><br> @@ -27,18 +27,18 @@ The firm promptly pays @@.yellowgreen;fair compensation@@ for the minor damage t <<case "bad breasts">> -<<set $activeSlave = 0>> -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].drugs == "breast injections" || $slaves[$i].drugs == "intensive breast injections" || $slaves[$i].drugs == "hyper breast injections">> - <<set $slaves[$i].health -= random(1,2)>> - <<set $activeSlave = $slaves[$i]>> - <</if>> -<</for>> -<<if $activeSlave == 0>> +<<set _i = $slaves.findIndex(function(s) { return ["breast injections", "intensive breast injections", "hyper breast injections"].includes(s.drugs); })>> +<<if _i != -1>> + <<run $slaves.forEach(function(s) { + if (["breast injections", "intensive breast injections", "hyper breast injections"].includes(s.drugs)) { + s.health -= Math.floor(Math.random() * 2 + 1); + } + })>> +<<else>> <<goto "Random Nonindividual Event">> <</if>> -Early one morning, you hear heaving coming from one of the bathrooms. On investigation, it seems that $activeSlave.slaveName woke up feeling terribly nauseous. She's in no danger, but you've hardly checked her over before more slaves stagger in. Every one of your slaves on breast focused A-HGH has been struck by the mysterious malady and has @@.red;sickened.@@ +Early one morning, you hear heaving coming from one of the bathrooms. On investigation, it seems that $slaves[_i].slaveName woke up feeling terribly nauseous. She's in no danger, but you've hardly checked her over before more slaves stagger in. Every one of your slaves on breast focused A-HGH has been struck by the mysterious malady and has @@.red;sickened.@@ <br><br> It doesn't take much investigation before you find other slaveowners reporting the same thing. Elementary detective work fingers a particular drug supplier as the culprit, and before long the unfortunate Pharmaceutical concern is drowning under a rain of harsh public comment and harsher private contract warfare. As the day wears on, the poor slaves feel much better, and appear positively glowing. However, their breasts swell slightly and their bellies bulge, pointing to the issue being the contamination of the A-HGH production line with fertility agents. <br><br> @@ -562,14 +562,14 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<link "Free breast growth is acceptable">> <<replace "#result">> Since you're not displeased with the breast expansion, you accept the health compensation and even make discreet inquiries to see of the effect can perhaps be replicated. Unfortunately, it seems that the result that occurred was as much due to luck as anything else. The process cannot be safely marketed. - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].curatives > 1>> - <<set $slaves[$i].boobs += 100*random(1,10)>> - <</if>> - <<if $slaves[$i].inflationType == "curative">> - <<set $slaves[$i].boobs += 300*random(1,10)*$slaves[$i].inflation>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.curatives > 1) { + s.boobs += Math.floor(Math.random() * 10 + 1) * 100; + } + if (s.inflationType == "curative") { + s.boobs += Math.floor(Math.random() * 10 + 1) * 300 * s.inflation; + } + })>> <</replace>> <</link>> <br><<link "Demand further compensation">> @@ -593,9 +593,9 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<if ($slaves[$i].drugs == "breast injections") && canGetPregnant($slaves[$i])>> <<set $slaves[$i].preg = 1>> <<set $slaves[$i].pregType = random(10,25)>> - <<set $activeSlave.pregKnown = 1>> - <<set $activeSlave.pregWeek = 1>> - <<SetBellySize $activeSlave>> + <<set $slaves[$i].pregKnown = 1>> + <<set $slaves[$i].pregWeek = 1>> + <<SetBellySize $slaves[$i]>> <<elseif $slaves[$i].drugs == "breast injections">> <<set $slaves[$i].lactation = 1>> <<if $slaves[$i].hips < 1>> @@ -614,9 +614,9 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<elseif $slaves[$i].drugs == "intensive breast injections" && canGetPregnant($slaves[$i])>> <<set $slaves[$i].preg = 1>> <<set $slaves[$i].pregType = random(15,35)>> - <<set $activeSlave.pregKnown = 1>> - <<set $activeSlave.pregWeek = 1>> - <<SetBellySize $activeSlave>> + <<set $slaves[$i].pregKnown = 1>> + <<set $slaves[$i].pregWeek = 1>> + <<SetBellySize $slaves[$i]>> <<elseif $slaves[$i].drugs == "intensive breast injections">> <<set $slaves[$i].lactation = 1>> <<if $slaves[$i].hips < 1>> @@ -635,9 +635,9 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<elseif ($slaves[$i].drugs == "hyper breast injections") && canGetPregnant($slaves[$i])>> <<set $slaves[$i].preg = 1>> <<set $slaves[$i].pregType = random(20,45)>> - <<set $activeSlave.pregKnown = 1>> - <<set $activeSlave.pregWeek = 1>> - <<SetBellySize $activeSlave>> + <<set $slaves[$i].pregKnown = 1>> + <<set $slaves[$i].pregWeek = 1>> + <<SetBellySize $slaves[$i]>> <<elseif $slaves[$i].drugs == "hyper breast injections">> <<set $slaves[$i].lactation = 1>> <<if $slaves[$i].hips < 1>> @@ -666,11 +666,11 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <br><<link "Force surgical repairs and compensation">> <<replace "#result">> The hapless manufacturer eventually goes bankrupt. However, you do manage to force surgical correction of the pregnancies before they do. As additional compensation, they agree to naturally enhance your afflicted slaves busts knowing full well that most buyers are not interested in slaves that have been knocked up. At the managers expense, your slaves move through a top-flight surgeons care and are pregnancy free and sporting @@.lime;larger breasts@@. - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].drugs == "breast injections">> - <<set $slaves[$i].boobs += 100*(random(1,10))>> - <</if>> - <</for>> + <<run $slaves.forEach(function(s) { + if (s.drugs == "breast injections") { + s.boobs += Math.floor(Math.random() * 10 + 1) * 100; + } + })>> <</replace>> <</link>>