From 056ad3457288a9fa99126df640023d9aa5962a29 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 10 Jul 2021 20:19:38 -0400 Subject: [PATCH] slave medic --- src/events/nonRandom/mercs/pSlaveMedic.js | 265 ++++++++++------------ src/events/nonRandomEvent.js | 3 +- 2 files changed, 120 insertions(+), 148 deletions(-) diff --git a/src/events/nonRandom/mercs/pSlaveMedic.js b/src/events/nonRandom/mercs/pSlaveMedic.js index a1bee0d02b0..0ee83b1e92b 100644 --- a/src/events/nonRandom/mercs/pSlaveMedic.js +++ b/src/events/nonRandom/mercs/pSlaveMedic.js @@ -1,179 +1,152 @@ - :: P slave medic [nobr] +App.Events.PSlaveMedic = class PSlaveMedic extends App.Events.BaseEvent { + eventPrerequisites() { + return [ + () => V.eventResults.slaveMedic > 0 + ]; + } - V.nextButton = "Continue", V.nextLink = "Random Nonindividual Event", V.returnTo = "Random Nonindividual Event"; + execute(node) { + let r = []; + + V.nextButton = "Continue"; + V.nextLink = "Random Nonindividual Event"; V.eventResults.slaveMedic = 0; - if (V.pedo_mode === 1) { - _minAge = V.minimumSlaveAge; - _maxAge = 18; - } else { - _minAge = 25; - _maxAge = 42; - } - _genParam = {minAge: _minAge, maxAge: _maxAge, disableDisability: 1}; + const minAge = (V.pedo_mode === 1) ? V.minimumSlaveAge : 18; + const maxAge = (V.pedo_mode === 1) ? 25 : 42; + + const genParam = {minAge: minAge, maxAge: maxAge, disableDisability: 1}; + let slave; if (V.seeDicks >= 100) { - _slave = GenerateNewSlave("XY", _genParam); - _slave.dick = 5; - _slave.foreskin = 0; - _slave.balls = 3; - _slave.scrotum = 3; - _slave.butt = 3; - _slave.attrXY = 70; + slave = GenerateNewSlave("XY", genParam); + slave.dick = 5; + slave.foreskin = 0; + slave.balls = 3; + slave.scrotum = 3; + slave.butt = 3; + slave.attrXY = 70; } else { - _slave = GenerateNewSlave("XX", _genParam); - _slave.vagina = 2; - _slave.preg = -1; - _slave.ovaries = 1; - _slave.skill.vaginal = 35; + slave = GenerateNewSlave("XX", genParam); + slave.vagina = 2; + slave.preg = -1; + slave.ovaries = 1; + slave.skill.vaginal = 35; } if (V.pedo_mode === 1) { - _slave.sexualQuirk = "caring"; - _slave.intelligenceImplant = 15; - if (_slave.physicalAge >= 12) { - _slave.teeth = "cosmetic braces"; + slave.sexualQuirk = "caring"; + slave.intelligenceImplant = 15; + if (slave.physicalAge >= 12) { + slave.teeth = "cosmetic braces"; } if (V.seeDicks < 100) { - _slave.hips = 1; - _slave.boobs = 2000; - _slave.boobShape = "perky"; - _slave.geneticQuirks.macromastia = 2; - _slave.butt = 4; - _slave.voice = 3; + slave.hips = 1; + slave.boobs = 2000; + slave.boobShape = "perky"; + slave.geneticQuirks.macromastia = 2; + slave.butt = 4; + slave.voice = 3; } else { - _slave.geneticQuirks.wellHung = 2; + slave.geneticQuirks.wellHung = 2; } } else { - _slave.anusTat = "bleached"; - _slave.height = random(165,190); - _slave.intelligenceImplant = 30; - _slave.teeth = "normal"; + slave.anusTat = "bleached"; + slave.height = random(165, 190); + slave.intelligenceImplant = 30; + slave.teeth = "normal"; if (V.seeDicks < 100) { - _slave.boobs += 400; - _slave.butt += 1; - _slave.stampTat = either("flowers", "tribal patterns"); + slave.boobs += 400; + slave.butt += 1; + slave.stampTat = either("flowers", "tribal patterns"); } } - _slave.origin = "${He} was captured while caring for those injured in a failed attack on the Free City."; - _slave.career = "a nurse"; - _slave.custom.desc = "${He} has a faint air of fatigue about ${him}, and strength too: that of a survivor."; - _slave.sexualFlaw = "none"; - _slave.behavioralFlaw = "none"; - _slave.devotion = random(30,40); - _slave.trust = _slave.devotion-20; - _slave.oldDevotion = _slave.devotion; - _slave.muscles = random(20,50); - _slave.skill.oral = 35; - _slave.skill.anal = 15; - _slave.skill.whoring = 0; - _slave.skill.entertainment = 15; - _slave.intelligence = random(51,95); - _slave.anus = 2; - _slave.hStyle = "neat"; - _slave.hLength = 35; - setHealth(_slave, jsRandom(20, 40)); + slave.origin = "$He was captured while caring for those injured in a failed attack on the Free City."; + slave.career = "a nurse"; + slave.custom.desc = "$He has a faint air of fatigue about $him, and strength too: that of a survivor."; + slave.sexualFlaw = "none"; + slave.behavioralFlaw = "none"; + slave.devotion = random(30, 40); + slave.trust = slave.devotion - 20; + slave.oldDevotion = slave.devotion; + slave.muscles = random(20, 50); + slave.skill.oral = 35; + slave.skill.anal = 15; + slave.skill.whoring = 0; + slave.skill.entertainment = 15; + slave.intelligence = random(51, 95); + slave.anus = 2; + slave.hStyle = "neat"; + slave.hLength = 35; + setHealth(slave, jsRandom(20, 40)); if (V.mercenaries >= 3) { - _slave.counter.publicUse += 39; + slave.counter.publicUse += 39; } else { - _slave.counter.publicUse += 13; + slave.counter.publicUse += 13; } - <span id="art-frame"> - /* 000-250-006 */ - if (V.seeImages === 1) { - if (V.imageChoice === 1) { - <div class="imageRef lrgVector"><div class="mask"> </div> - <<SlaveArt _slave 3 0>></div> - } else { - <div class="imageRef lrgRender"><div class="mask"> </div> - <<SlaveArt _slave 3 0>></div> - } - } - /* 000-250-006 */ - </span> - - App.Utils.setLocalPronouns(_slave); - Enunciate(_slave); + App.Events.drawEventArt(node, slave); + const { + He, + he, his, him, himself, girl, + } = getPronouns(slave); if (V.pedo_mode === 1 && V.seeDicks < 100) { + r.push(`You make a habit of dropping in on your mercenaries whenever you get the chance. You have regular meetings with their grizzled captain, of course, but turning up unannounced to get to know them is simply a matter of self-preservation. The better they like you, the more likely they are to think of more than their pay when deciding how to hazard themselves on your behalf. When you enter the lounge of their`); + if (V.barracks) { + r.push(`barracks`); + } else { + r.push(`main living area`); + } + r.push(`, you see ${slave.slaveName} kneeling next to a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't squirm!" ${he} says with an annoyed tone. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} tank top, allowing ${his} huge tits to swing free. ${He}'s quite young, but ${his} _slave.skin body is appealingly curvy. As ${he} swings one leg across the seated mercenary, ${he} continues, "Please sit still and let me do the work. You need to take it easy for a day or two or you'll pop those sutures." Using ${his} hands, ${he} gently caresses his stiff prick with ${his} pillowy breasts, eliciting a grunt. ${He}'s a strong ${girl}, and pleasures him without letting any of ${his} weight rest on his body at all. When he climaxes, ${he} leans in to clean him with ${his} mouth and then heads off to wash out ${his} cleavage.`); + } else { r.push(`You make a habit of dropping in on your mercenaries whenever you get the chance. You have regular meetings with their grizzled captain, of course, but turning up unannounced to get to know them is simply a matter of self-preservation. The better they like you, the more likely they are to think of more than their pay when deciding how to hazard themselves on your behalf.`); r.push(`When you enter the lounge of their`); - if (V.barracks) { - r.push(`barracks`); - } else { - r.push(`main living area`); + if (V.barracks) { + r.push(`barracks`); + } else { + r.push(`main living area`); + } + r.push(`, you see ${slave.slaveName} bending over a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't squirm," ${he} says quietly. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} fatigue pants.`); + if (V.pedo_mode === 1) { + r.push(`${He}'s quite youthful, nimble and knows just how to manage ${his} impressive asset without it touching ${his} charge.`); + } else { + r.push(`${He}'s no longer young, but ${his} ${slave.skin} legs are pretty enough.`); + } + r.push(`As ${he} swings one leg across the seated mercenary, ${he} continues, "Please sit still and let me do the work. You need to take it easy for a day or two or you'll pop those sutures." Using a hand, ${he} guides ${himself} down onto his stiff prick, eliciting a grunt. ${He}'s a strong ${girl}, and rides him without letting any of ${his} weight rest on his hips at all. When he climaxes, ${he} kneels to clean him with ${his} mouth and then heads off to wash.`); } - r.push(`, you see${ _${slave.slaveName}} kneeling next to a mercenary with most of his armor stripped off. ${He}'s the`); - V.aNational(_slave.nationality) - r.push(`nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank.`); - "Don't - <<s>> - r.push(`quirm!" ${he} says with an annoyed tone. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} tank top, allowing ${his} huge tits to swing free. ${He}'s quite young, but ${his} _slave.skin body is appealingly curvy. As ${he} swings one leg across the seated mercenary, ${he} continues, "Pleas>> - r.push(`e`); - <<s>> - r.push(`it`); - <<s>> - r.push(`till and let me do the work. You need to take it ea`); - <<s>> - r.push(`y for a day or two or you'll pop tho`); - <<s>> - r.push(`e`); - <<s>> - r.push(`uture`); - <<s." Using ${his} hands, ${he} gently caresses his stiff prick with ${his} pillowy breasts, eliciting a grunt. ${He}'s a strong ${girl}, and pleasures him without letting any of ${his} weight rest on his body at all. When he climaxes, ${he} leans in to clean him with ${his} mouth and then heads off to wash out ${his} cleavage.`); - } else { - r.push(`You make a habit of dropping in on your mercenaries whenever you get the chance. You have regular meetings with their grizzled captain, of course, but turning up unannounced to get to know them is simply a matter of self-preservation. The better they like you, the more likely they are to think of more than their pay when deciding how to hazard themselves on your behalf.`); + App.Events.addParagraph(node, r); - r.push(`When you enter the lounge of their`); - if (V.barracks) { - r.push(`barracks`); + const lowBid = 10000; + const highBid = 25000; + const choices = []; + if (V.cash > lowBid) { + choices.push(new App.Events.Result(`Offer ${cashFormat(lowBid)} for ${him}"`, offerLow)); + if (V.cash > highBid) { + choices.push(new App.Events.Result(`Offer a very generous ${cashFormat(highBid)} for ${him}"`, offerHigh)); + } else { + choices.push(new App.Events.Result(null, null, `Cannot afford even a generous bid of ${cashFormat(highBid)}`)); + } } else { - r.push(`main living area`); + choices.push(new App.Events.Result(null, null, `Cannot afford even a low bid of ${cashFormat(lowBid)}`)); } - r.push(`, you see${ _${slave.slaveName}} bending over a mercenary with most of his armor stripped off. ${He}'s the`); - V.aNational(_slave.nationality) - r.push(`nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank.`); - "Don't - <<s>> - r.push(`quirm," ${he} says quietly. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} fatigue pants.`); - if (V.pedo_mode === 1) { - r.push(`${He}'s quite youthful, nimble and knows just how to manage ${his} impressive asset without it touching ${his} charge.`); - } else { - r.push(`${He}'s no longer young, but ${his}${ _${slave.skin}} legs are pretty enough.`); - } - r.push(`As ${he} swings one leg across the seated mercenary, ${he} continues, "Pleases>> - r.push(`it`); - <<s>> - r.push(`till and let me do the work. You need to take it ea`); - <<s>> - r.push(`y for a day or two or you'll pop tho`); - <<s>> - r.push(`e`); - <<s>> - r.push(`uture`); - <<s." Using a hand, ${he} guides ${himself} down onto his stiff prick, eliciting a grunt. ${He}'s a strong ${girl}, and rides him without letting any of ${his} weight rest on his hips at all. When he climaxes, ${he} kneels to clean him with ${his} mouth and then heads off to wash.`); + App.Events.addResponses(node, choices); + + function offerLow() { + return `The mercenary laughs at your offered price. "No offense, ${properTitle()}, but no. Even if I wanted to sell ${him} on everyone's behalf for that price, my buddies would kill me for that. ${He}'s popular, that ${slave.slaveName}."`; } - <span id="result"> - <br><br> - <<link "Offer - V.cashFormat(10000) - r.push(`for ${him}">>replace "#result"The mercenary laughs at your offered price. "No offense,`); - V.properTitle() - r.push(`, but no. Even if I wanted to sell ${him} on everyone's behalf for that price, my buddies would kill me for that. ${He}'s popular, that${ _${slave.slaveName."}}`); - <</replace>> - <</link>> - <br> - <<link "Offer a very generous - V.cashFormat(25000) - r.push(`for ${him}">>`); - <<replace "#result">> - cashX(-25000, "slaveTransfer", _slave); - "Huh," says the mercenary. "${He}'s popular, but for that we could probably buy two of ${him}. Might be fun to train a couple of new nurses. Let me ask the boys and girls." He speaks into his helmet for a few minutes, and then turns back to you. "Sold. Enjoy, ${he}'s a good fuck." - <<includeDOM App.UI.newSlaveIntro(_slave)>> - <</replace>> - <</link>> - </span> + function offerHigh() { + const frag = new DocumentFragment(); + let r = []; + cashX(-offerHigh, "slaveTransfer", slave); + r.push(`"Huh," says the mercenary. "${He}'s popular, but for that we could probably buy two of ${him}. Might be fun to train a couple of new nurses. Let me ask the boys and girls." He speaks into his helmet for a few minutes, and then turns back to you. "Sold. Enjoy, ${he}'s a good fuck."`); + r.push(App.UI.newSlaveIntro(slave)); + + App.Events.addParagraph(frag, r); + return frag; + } + } +}; diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index 4be62aeaea8..fb168edd842 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -105,6 +105,7 @@ App.Events.getNonrandomEvents = function() { new App.Events.PMercsHelpCorp(), new App.Events.PMercenaryRomeo(), new App.Events.PRaidResult(), + new App.Events.PSlaveMedic(), ]; }; @@ -291,8 +292,6 @@ globalThis.nonRandomEvent = function() { setTimeout(() => Engine.play("RE The Siren Strikes Back"), Engine.minDomActionDelay); } else if (V.eventResults.snatch === 1) { setTimeout(() => Engine.play("P snatch and grab result"), Engine.minDomActionDelay); - } else if (V.eventResults.slaveMedic > 0) { - setTimeout(() => Engine.play("P slave medic"), Engine.minDomActionDelay); } else if ((effectiveWeek >= 37) && (V.arcologies[0].FSNeoImperialistLaw1 === 1) && (V.arcologies[0].FSNeoImperialistLaw2 === 1) && V.poorKnight !== 1 && effectiveWeek >= V.imperialEventWeek + 3) { V.poorKnight = 1; V.imperialEventWeek = effectiveWeek; -- GitLab