diff --git a/src/events/nonRandom/mercs/pSnatchAndGrabResult.js b/src/events/nonRandom/mercs/pSnatchAndGrabResult.js index c26e3f58f2bead6d9c882a5520e051e5af102ab2..e098c8125e6262bb32922311888be44ac9725625 100644 --- a/src/events/nonRandom/mercs/pSnatchAndGrabResult.js +++ b/src/events/nonRandom/mercs/pSnatchAndGrabResult.js @@ -1,107 +1,122 @@ - :: P snatch and grab result [nobr] +App.Events.PSnatchAndGrabResult = class PSnatchAndGrabResult extends App.Events.BaseEvent { + eventPrerequisites() { + return [ + () => V.eventResults.snatch === 1 + ]; + } - V.nextButton = "Continue", V.nextLink = "Random Nonindividual Event", V.returnTo = "Random Nonindividual Event", V.eventResults.snatch = 0; + execute(node) { + let r = []; - _snatched = GenerateNewSlave("XX", {maxAge: (V.pedo_mode === 1 ? V.minimumSlaveAge : 18), disableDisability: 1}); + V.nextButton = "Continue"; + V.nextLink = "Random Nonindividual Event"; + V.eventResults.snatch = 0; + + const snatched = GenerateNewSlave("XX", {maxAge: (V.pedo_mode === 1 ? V.minimumSlaveAge : 18), disableDisability: 1}); if (V.pedo_mode === 1) { - _snatched.boobShape = "saggy"; - _snatched.nipples = "partially inverted"; - _snatched.areolae = 3; - _snatched.lips = 15; - _snatched.voice = 2; - _snatched.weight = 60; - _snatched.muscles = 0; - _snatched.shoulders = -2; - _snatched.hips = 0; - _snatched.waist = 10; + snatched.boobShape = "saggy"; + snatched.nipples = "partially inverted"; + snatched.areolae = 3; + snatched.lips = 15; + snatched.voice = 2; + snatched.weight = 60; + snatched.muscles = 0; + snatched.shoulders = -2; + snatched.hips = 0; + snatched.waist = 10; } else { - if (_snatched.lips < 10) { - _snatched.lips += 5; + if (snatched.lips < 10) { + snatched.lips += 5; } - _snatched.height = Height.random(_snatched, {skew: 1, limitMult: [0, 2]}); - _snatched.weight = 0; - _snatched.muscles = 20; - _snatched.waist = -75; + snatched.height = Height.random(snatched, {skew: 1, limitMult: [0, 2]}); + snatched.weight = 0; + snatched.muscles = 20; + snatched.waist = -75; } - _snatched.faceShape = (V.pedo_mode === 1 ? "exotic" : "androgynous"); - _snatched.anus = 0; + snatched.faceShape = (V.pedo_mode === 1 ? "exotic" : "androgynous"); + snatched.anus = 0; if (V.seeDicks !== 100) { - _snatched.vagina = 0; - _snatched.ovaries = 1; + snatched.vagina = 0; + snatched.ovaries = 1; } if (V.seeDicks === 0) { - _snatched.dick = 0; - _snatched.balls = 0; - _snatched.scrotum = 0; + snatched.dick = 0; + snatched.balls = 0; + snatched.scrotum = 0; } else if (V.seeDicks > 75) { - _snatched.dick = (V.pedo_mode === 1 ? 2 : 6); - if (_snatched.foreskin > 0) { - _snatched.foreskin = _snatched.dick; - } - _snatched.balls = 1; - _snatched.scrotum = _snatched.balls; + snatched.dick = (V.pedo_mode === 1 ? 2 : 6); + if (snatched.foreskin > 0) { + snatched.foreskin = snatched.dick; + } + snatched.balls = 1; + snatched.scrotum = snatched.balls; } else { - _snatched.dick = 1; - _snatched.foreskin = 1; - _snatched.balls = 1; - _snatched.scrotum = _snatched.balls; + snatched.dick = 1; + snatched.foreskin = 1; + snatched.balls = 1; + snatched.scrotum = snatched.balls; } - _snatched.boobs += (V.pedo_mode === 1 ? 6000 : 200); - _snatched.butt += (V.pedo_mode === 1 ? 1 : 2); - _snatched.origin = "${He} is your share of a raid on an illegal laboratory by your mercenaries."; - _snatched.career = "a slave"; - _snatched.devotion = 100; - _snatched.trust = 100; - setHealth(_snatched, 250, 0, 0, 0, 0); - _snatched.face = 15; - _snatched.skill.vaginal = 0; - _snatched.skill.oral = 0; - _snatched.skill.anal = 0; - _snatched.skill.whoring = 0; - _snatched.skill.entertainment = 0; - _snatched.birthWeek = 0; - _snatched.hStyle = "shaved bald"; - _snatched.hLength = 0; - _snatched.custom.desc = "${His} skin is unnaturally perfect, totally without blemishes. ${He} radiates unnatural health and resilience."; - _snatched.custom.tattoo = "${He} has a barcode tattooed on the top of ${his} head."; - _snatched.behavioralFlaw = "odd"; - _snatched.fetish = "none"; - _snatched.energy = 100; - _snatched.fetishKnown = 1; - _snatched.attrKnown = 1; - if (_snatched.physicalAge >= 12) { - _snatched.teeth = "normal"; + snatched.boobs += (V.pedo_mode === 1 ? 6000 : 200); + snatched.butt += (V.pedo_mode === 1 ? 1 : 2); + snatched.origin = "$He is your share of a raid on an illegal laboratory by your mercenaries."; + snatched.career = "a slave"; + snatched.devotion = 100; + snatched.trust = 100; + setHealth(snatched, 250, 0, 0, 0, 0); + snatched.face = 15; + snatched.skill.vaginal = 0; + snatched.skill.oral = 0; + snatched.skill.anal = 0; + snatched.skill.whoring = 0; + snatched.skill.entertainment = 0; + snatched.birthWeek = 0; + snatched.hStyle = "shaved bald"; + snatched.hLength = 0; + snatched.custom.desc = "$His skin is unnaturally perfect, totally without blemishes. $He radiates unnatural health and resilience."; + snatched.custom.tattoo = "$He has a barcode tattooed on the top of $his head."; + snatched.behavioralFlaw = "odd"; + snatched.fetish = "none"; + snatched.energy = 100; + snatched.fetishKnown = 1; + snatched.attrKnown = 1; + if (snatched.physicalAge >= 12) { + snatched.teeth = "normal"; } - _snatched.pubicHStyle = "hairless"; - _snatched.underArmHStyle = "hairless"; + snatched.pubicHStyle = "hairless"; + snatched.underArmHStyle = "hairless"; - <<setLocalPronouns _snatched>> - _snatched.slaveCost = -10000; + snatched.slaveCost = -10000; - In the middle of the night, there is a polite knock on your penthouse door. You are alerted by V.assistant.name, who observes + const { + he, himself + } = getPronouns(snatched); + + r.push(`In the middle of the night, there is a polite knock on your penthouse door. You are alerted by ${V.assistant.name}, who observes`); if (V.assistant.personality === 1) { r.push(`with some irritation`); } - r.push(`that the mercenary who knocked has gone, has left a large case outside the door, and has satisfied the security systems that the case contains nothing hazardous.`); + r.push(`that the mercenary who knocked has gone, has left a large case outside the door, and has satisfied the security systems that the case contains nothing hazardous.`); - The case prompts you for a handprint code; your hand works just fine. It contains a naked, hairless, perfectly healthy young body in the fetal position. This person awakens as the case opens, looks you confidently in the eye, and says "Are you my + r.push(`The case prompts you for a handprint code; your hand works just fine. It contains a naked, hairless, perfectly healthy young body in the fetal position. This person awakens as the case opens, looks you confidently in the eye, and says "Are you my`); if (V.PC.title !== 0) { - r.push(`Master`); + r.push(`Master?"`); } else { - r.push(`Mistress`); - }?" + r.push(`Mistress?"`); + } - When you state that, apparently, you are, ${he} climbs out of the case, prostrates ${himself} in the hall before you, and says reverentially into the floor, "I love you, + r.push(`When you state that, apparently, you are, ${he} climbs out of the case, prostrates ${himself} in the hall before you, and says reverentially into the floor, "I love you,`); if (V.PC.title !== 0) { - r.push(`Master`); + r.push(`Master."`); } else { - r.push(`Mistress`); + r.push(`Mistress."`); } - r.push(`."`); - <br><br> - <<includeDOM App.Desc.longSlave(_snatched)>> + App.Events.addParagraph(node, r); + r = []; + node.append(App.Desc.longSlave(snatched)); - <<includeDOM App.UI.newSlaveIntro(_snatched)>> + node.append(App.UI.newSlaveIntro(snatched)); + } +}; diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index fb168edd84280727f22fd5a342ddca9049068eab..04e80345a676b913f0e14c2dfa3e2547501cbf98 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -106,6 +106,7 @@ App.Events.getNonrandomEvents = function() { new App.Events.PMercenaryRomeo(), new App.Events.PRaidResult(), new App.Events.PSlaveMedic(), + new App.Events.PSnatchAndGrabResult(), ]; }; @@ -290,8 +291,6 @@ globalThis.nonRandomEvent = function() { } } else if ((V.arcologies[0].FSPaternalistDecoration === 100) && (V.swanSong === 2) && (V.week - V.swanSongWeek >= 3)) { 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 ((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;