code:
App.Medicine.Surgery.Reactions.Face = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		r.push(faceIncreaseDesc(slave, diff.face));
		if (slave.fetish === "mindbroken") {
			r.push(`${He} doesn't notice the improvements to ${his} face, but ${he}'s not the one looking at it. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
		} else if (slave.devotion > 50) {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`examines ${his} new self in the mirror with approval. ${He} doesn't recognize ${himself} quite yet, but ${he}`);
			} else {
				r.push(`listens closely to the description of ${his} new face. ${He}`);
			}
			r.push(`hopes you'll like ${his} new face better and use ${him} more frequently as a result. ${He}'s happy with your changes to ${his} face. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`examines ${his} new self in the mirror with hesitation. ${He} doesn't recognize ${himself} quite yet, but ${he}`);
			} else {
				r.push(`listens closely to the description of ${his} new face. ${He}`);
			}
			r.push(`hopes you'll like ${his} new face better and treat ${him} more kindly as a result. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`examines ${his} new self in the mirror with revulsion. ${He} doesn't recognize ${himself} quite yet,`);
			} else {
				r.push(`listens closely to the description of ${his} new face,`);
			}
			r.push(`which ${he} hates, though ${he} hopes you'll like ${his} new face better and punish ${him} less cruelly as a result. For now, ${he} seems to view this fake face as a cruel imposition. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.FaceShape = class extends App.Medicine.Surgery.Procedure {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @param {string} targetShape
	 */
	constructor(slave, targetShape) {
		super(slave);
		this.targetShape = targetShape;
	}

	get name() {
		if (this.targetShape === "androgynous" && this._slave.faceShape === "masculine") {
			return `Soften to androgynous`;
		} else if (this.targetShape === "normal") {
			return `Make conventionally feminine`;
		} else {
			return capFirstChar(this.targetShape);
		}
	}

	get healthCost() { return 10; }

	apply(cheat) {
		this._slave.faceShape = this.targetShape;
		faceIncreaseAction(this._slave, 20);
		this._slave.faceImplant = Math.clamp(this._slave.faceImplant + faceSurgeryArtificiality(), 0, 100);
		return this._assemble(new App.Medicine.Surgery.Reactions.Face());

	}
};

App.Medicine.Surgery.Procedures.FaceAttractiveness = class extends App.Medicine.Surgery.Procedure {
	get name() { return "Just improve attractiveness"; }

	get healthCost() { return 10; }

	apply(cheat) {
		faceIncreaseAction(this._slave, 20);
		this._slave.faceImplant = Math.clamp(this._slave.faceImplant + faceSurgeryArtificiality(), 0, 100);
		return this._assemble(new App.Medicine.Surgery.Reactions.Face());
	}
};


code:
App.Medicine.Surgery.Reactions.Lips = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} vaguely realizes ${his} mouth doesn't move as well as it used to. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
		} else if (slave.devotion > 20 && this._strongKnownFetish(slave, "cumslut")) {
			r.push(`${He} licks ${his} new lips experimentally but doesn't lose much time before turning to you with ${his} mouth open and ready. ${He}'s still sore, so ${he}'s careful, but ${he} runs ${his} wet tongue over ${his} lips, already panting at the thought of sucking dick. If ${he} had much in the way of oral skills, they've likely suffered. ${He}'s happy with your changes to ${his} lips, so much so that ${he} now trusts your plans for ${his} body. As with all surgery ${his} health has been slightly affected.`);
			reaction.trust += 4;
			reaction.devotion += 4;
			if (slave.skill.oral > 10) {
				slave.skill.oral -= 10;
			}
		} else if (slave.devotion > 50) {
			r.push(`${He} puckers ${his} new lips experimentally and turns to you with a smile to show them off. ${He}'s still sore, so ${he}'s careful as ${he} blows you an awkward kiss. If ${he} had much in the way of oral skills, they've likely suffered. ${He}'s happy with your changes to ${his} lips. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
			if (slave.skill.oral > 10) {
				slave.skill.oral -= 10;
			}
		} else if (slave.devotion >= -20) {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`eyes`);
			} else {
				r.push(`puckers`);
			}
			r.push(`${his} new lips skeptically. ${He}'s still sore, so ${he} doesn't touch them. ${He}'s come to terms with the fact that ${he}'s a slave, so ${he} expected something like this when ${he} was sent to the surgery. ${He} isn't much affected mentally, but if ${he} had much in the way of oral skills, they've likely suffered. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
			if (slave.skill.oral > 10) {
				slave.skill.oral -= 10;
			}
		} else {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`eyes`);
			} else {
				r.push(`puckers`);
			}
			r.push(`${his} new lips with resentment. ${He}'s still sore, so ${he} doesn't touch them, but ${canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`}. ${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim. If ${he} had much in the way of oral skills, they've likely suffered. For now, ${he} seems to view these fake lips as a cruel imposition. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
			if (slave.skill.oral > 10) {
				slave.skill.oral -= 10;
			}
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.IncreaseLipImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Replace with the next size up";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lipsImplant += 20;
		this._slave.lips += 20;
		return this._assemble(new App.Medicine.Surgery.Reactions.Lips());
	}
};

App.Medicine.Surgery.Procedures.AddLipImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Lip implant";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lipsImplant = 20;
		this._slave.lips += 20;
		return this._assemble(new App.Medicine.Surgery.Reactions.Lips());
	}
};

App.Medicine.Surgery.Procedures.RemoveLipImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Remove lip implants";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lips -= this._slave.lipsImplant;
		this._slave.lipsImplant = 0;
		if (this._slave.skill.oral > 10) {
			this._slave.skill.oral -= 10;
		}
		return this._assemble(new App.Medicine.Surgery.Reactions.Lips());
	}
};

App.Medicine.Surgery.Procedures.ReduceLips = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Reduce lips";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lips -= 10;
		return this._assemble(new App.Medicine.Surgery.Reactions.Lips());
	}
};

repo_name: CloudyCoffee/fc

license: mit


code:
App.Medicine.Surgery.Reactions.BodyHairRemoval = class extends App.Medicine.Surgery.SimpleReaction {
	get invasive() { return false; }

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, His, his, him} = getPronouns(slave);
		let r = [];

		r.push(`When ${he}`);
		if (!hasAnyLegs(slave)) {
			r.push(`is carried`);
		} else if (canWalk(slave)) {
			r.push(`walks`);
		} else {
			r.push(`is escorted`);
		}
		r.push(`out of the surgery ${he} feels the breeze on ${his} skin and realizes that`);
		if (slave.hStyle !== "bald" && slave.eyebrowHStyle !== "bald") {
			r.push(`all hair below ${his} neck is missing.`);
		} else {
			r.push(`${he} is now completely hairless.`);
		}
		if (this._hasEmotion(slave)) {
			reaction.longReaction.push(r);
			r = [];
			if (slave.devotion > 50) {
				r.push(`${He} is <span class="devotion inc">happy</span> with how smooth ${his} body has become and is already <span class="trust inc">wondering</span> what new kinky things you have planned for ${him}.`);
				reaction.trust += 5;
				reaction.devotion += 5;
			} else if (slave.devotion >= -20) {
				r.push(`${His} new lack of body hair doesn't bother ${him} much, since it just means ${he} needs to spend less time getting rid of any unseemly hairs.`);
				reaction.trust += 5;
			} else {
				r.push(`${He} is <span class="devotion dec">sad</span> and <span class="trust dec">frightened</span> that you would force this on ${him}.`);
				reaction.trust -= 5;
				reaction.devotion -= 5;
			}
		}
		reaction.longReaction.push(r);
		r = [];
		r.push(`As this was a non-invasive procedure, ${his} health was not affected.`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.BodyHairRemoval = class extends App.Medicine.Surgery.Procedure {
	get name() {
		const {his} = getPronouns(this._slave);
		return `Surgically remove ${his} ability to grow body hair`;
	}

	get healthCost() { return 0; }

	apply(cheat) {
		if (this._slave.underArmHStyle !== "hairless") {
			this._slave.underArmHStyle = "bald";
		}
		if (this._slave.pubicHStyle !== "hairless") {
			this._slave.pubicHStyle = "bald";
		}
		return this._assemble(new App.Medicine.Surgery.Reactions.BodyHairRemoval());
	}
};


code:
App.Medicine.Surgery.Reactions.EyebrowRemoval = class extends App.Medicine.Surgery.SimpleReaction {
	get invasive() { return false; }

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, His, his, him} = getPronouns(slave);
		let r = [];

		r.push(`When ${he}`);
		if (!hasAnyLegs(slave)) {
			r.push(`is carried`);
		} else if (canWalk(slave)) {
			r.push(`walks`);
		} else {
			r.push(`is escorted`);
		}
		r.push(`out of the surgery ${he} feels the breeze on ${his} face and realizes that ${his} eyebrows are gone, permanently.`);
		if (this._hasEmotion(slave)) {
			reaction.longReaction.push(r);
			r = [];
			if (slave.devotion > 50) {
				r.push(`${He} is <span class="trust inc">thrilled</span> at how easy it will be to do ${his} makeup for up now that ${he} doesn't have to worry about ${his} eyebrows any longer.`);
				reaction.trust += 2;
			} else if (slave.devotion >= -20) {
				r.push(`${His} missing facial feature <span class="devotion dec">unnerves ${him}</span> a little. ${He} <span class="trust dec">shudders nervously</span> about what plans you may have to replace them.`);
				reaction.trust -= 2;
				reaction.devotion -= 2;
			} else {
				r.push(`${He} is <span class="devotion dec">sad</span> and <span class="trust dec">frightened</span> that you would force this on ${him}.`);
				reaction.trust -= 5;
				reaction.devotion -= 5;
			}
		}
		reaction.longReaction.push(r);
		r = [];
		r.push(`As this was a non-invasive procedure, ${his} health was not affected.`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.EyebrowRemoval = class extends App.Medicine.Surgery.Procedure {
	get name() {
		const {his} = getPronouns(this._slave);
		return `Surgically remove ${his} ability to grow eyebrows`;
	}

	get healthCost() { return 0; }

	apply(cheat) {
		this._slave.eyebrowHStyle = "bald";
		return this._assemble(new App.Medicine.Surgery.Reactions.EyebrowRemoval());
	}
};


code:
App.Medicine.Surgery.Reactions.HairRemoval = class extends App.Medicine.Surgery.SimpleReaction {
	get invasive() { return false; }

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him} = getPronouns(slave);
		let r = [];

		r.push(`When ${he}`);
		if (!hasAnyLegs(slave)) {
			r.push(`is carried`);
		} else if (canWalk(slave)) {
			r.push(`walks`);
		} else {
			r.push(`is escorted`);
		}
		r.push(`out of the surgery ${he} immediately notices the chill on ${his} head and realizes that ${he} is bald.`);
		if (this._hasEmotion(slave)) {
			reaction.longReaction.push(r);
			r = [];
			if (slave.devotion > 50) {
				if (slave.fetish === "humiliation" && slave.fetishStrength > 50) {
					r.push(`${He} is <span class="devotion inc">turned on</span> by how humiliating this is for ${him} and <span class="trust inc">can't wait</span> for the next time you decide to show ${him} off.`);
					reaction.trust += 5;
					reaction.devotion += 5;
				} else {
					r.push(`${He} is very devoted to you so ${his} new condition doesn't affect ${him} as much as it would other slaves.`);
				}
			} else if (slave.devotion >= -20) {
				if (slave.fetish === "humiliation" && slave.fetishStrength > 50) {
					r.push(`${He} is both <span class="devotion inc">turned on</span> and <span class="trust dec">horrified</span> by this humiliation.`);
					reaction.trust -= 5;
					reaction.devotion += 5;
				} else {
					r.push(`${He} thought ${he} was used to slavery but this is <span class="trust dec">too much.</span>`);
					reaction.trust -= 5;
				}
			} else {
				r.push(`${He} is <span class="trust dec">horrified</span> and <span class="devotion dec">angry</span> at this new humiliation.`);
				reaction.trust -= 5;
				reaction.devotion -= 5;
			}
		}
		reaction.longReaction.push(r);
		r = [];
		r.push(`As this was a non-invasive procedure, ${his} health was not affected.`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.HairRemoval = class extends App.Medicine.Surgery.Procedure {
	get name() {
		const {his} = getPronouns(this._slave);
		return `Surgically remove ${his} ability to grow hair`;
	}

	get healthCost() { return 0; }

	apply(cheat) {
		this._slave.bald = 1;
		this._slave.hStyle = "bald";
		this._slave.eyebrowHStyle = "bald";
		return this._assemble(new App.Medicine.Surgery.Reactions.HairRemoval());
	}
};


code:
App.Medicine.Surgery.Reactions.RestoreHairBrow = class extends App.Medicine.Surgery.SimpleReaction {
	intro(slave) {
		return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`];
	}

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const r = [];

		r.push(`${He} awakens from surgery to an unfamiliar, rather irritating, itch above ${his} eyes.`);
		if (hasAnyArms(slave)) {
			r.push(`As ${he} reaches to scratch it,`);
		} else if (canSee(slave)) {
			r.push(`When ${he} investigates,`);
		} else {
			r.push(`As ${he} struggles to rub it against something,`);
		}
		if (slave.fetish === "mindbroken") {
			r.push(`${he} fails to realize ${he} now has eyebrows.`);
		} else {
			r.push(`${he} is <span class="devotion inc">delighted</span> to find ${he} now has eyebrows.`);
			reaction.devotion += 2;
		}
		r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.OFRestoreHairBrow = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Brow";
	}

	get healthCost() {
		return 5;
	}

	apply(cheat) {
		this._slave.eyebrowHStyle = "natural";
		this._slave.eyebrowFullness = "natural";
		this._slave.eyebrowHColor = getGeneticHairColor(this._slave);
		return this._assemble(new App.Medicine.Surgery.Reactions.RestoreHairBrow());
	}
};


code:
App.Medicine.Surgery.Reactions.RestoreHairHead = class extends App.Medicine.Surgery.SimpleReaction {
	intro(slave) {
		return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`];
	}

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const r = [];

		r.push(`${He} awakens from surgery to an unfamiliar, rather irritating, itch coming from the top of ${his} head.`);
		if (hasAnyArms(slave)) {
			r.push(`As ${he} reaches to scratch it,`);
		} else if (canSee(slave)) {
			r.push(`When ${he} investigates,`);
		} else {
			r.push(`As ${he} struggles to rub it against something,`);
		}
		if (slave.fetish === "mindbroken") {
			r.push(`${he} fails to realize ${he} now has a head of short hair.`);
		} else {
			r.push(`${he} is <span class="devotion inc">delighted</span> to find ${he} now has hair.`);
			reaction.devotion += 2;
		}
		r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.OFRestoreHairHead = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Scalp";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.bald = 0;
		this._slave.hLength = 1;
		this._slave.hStyle = "neat";
		this._slave.hColor = getGeneticHairColor(this._slave);
		return this._assemble(new App.Medicine.Surgery.Reactions.RestoreHairHead());
	}
};


code:
App.Medicine.Surgery.Reactions.RestoreHairPits = class extends App.Medicine.Surgery.SimpleReaction {
	intro(slave) {
		return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`];
	}

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY);
		const r = [];

		r.push(`${He} awakens from surgery to an unfamiliar, rather irritating, itch`);
		if (hasAnyArms(slave)) {
			r.push(`under ${his} ${(hasBothArms(slave)) ? `arms` : `arm`}`);
		} else {
			r.push(`below where ${his} arms used to be.`);
		}
		if (hasAnyArms(slave)) {
			r.push(`As ${he} reaches to scratch it,`);
		} else if (canSee(slave)) {
			r.push(`When ${he} investigates,`);
		} else {
			r.push(`As ${he} struggles to rub it against something,`);
		}
		if (slave.fetish === "mindbroken") {
			r.push(`${he} fails to realize ${he} now has underarm hair.`);
		} else {
			if (slave.physicalAge < pubertyAge - 2) {
				r.push(`${he} finds nothing unusual; ${his} hair is still growing in.`);
			} else if (slave.physicalAge < pubertyAge - 1) {
				r.push(`${he} is surprised to find a few new hairs.`);
			} else if (slave.physicalAge < pubertyAge) {
				r.push(`${he} is surprised to find two patches of hair.`);
			} else {
				r.push(`${he} is shocked to find two dense patches of hair; a trip to the autosalon to manage it may be in order.`);
			}
		}
		r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.OFRestoreHairPits = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Axillary";
	}

	get healthCost() {
		return 5;
	}

	apply(cheat) {
		this._slave.underArmHStyle = "bushy";
		this._slave.underArmHColor = getGeneticHairColor(this._slave);
		return this._assemble(new App.Medicine.Surgery.Reactions.RestoreHairPits());
	}
};


code:
App.Medicine.Surgery.Reactions.RestoreHairPubes = class extends App.Medicine.Surgery.SimpleReaction {
	intro(slave) {
		return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`];
	}

	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY);
		const r = [];

		r.push(`${He} awakens from surgery to an unfamiliar, rather irritating, itch above ${his} crotch.`);
		if (hasAnyArms(slave)) {
			r.push(`As ${he} reaches to scratch it,`);
		} else if (canSee(slave)) {
			r.push(`When ${he} looks in the mirror,`);
		} else {
			r.push(`As ${he} struggles to rub it against something,`);
		}
		if (slave.fetish === "mindbroken") {
			r.push(`${he} fails to realize ${he} now has pubic hair.`);
		} else {
			if (slave.physicalAge < pubertyAge - 2) {
				r.push(`${he} finds nothing unusual; ${his} hair is still growing in.`);
			} else if (slave.physicalAge < pubertyAge - 1) {
				r.push(`${he} is surprised to find a few new hairs.`);
			} else if (slave.physicalAge < pubertyAge) {
				r.push(`${he} is surprised to find a patch of pubic hair.`);
			} else {
				r.push(`${he} is shocked to find a dense bush of hair trailing up to ${his} navel; a trip to the autosalon to style ${his} new pubes may be in order.`);
			}
		}
		r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.OFRestoreHairPubes = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Pubic";
	}

	get healthCost() {
		return 5;
	}

	apply(cheat) {
		this._slave.pubicHStyle = "very bushy";
		this._slave.pubicHColor = getGeneticHairColor(this._slave);
		return this._assemble(new App.Medicine.Surgery.Reactions.RestoreHairPubes());
	}
};


code:
App.Medicine.Surgery.Reactions.Horn = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} shows little reaction to ${his} new head ornamentation. As with all invasive surgery <span class="health dec">${his} health has been affected.</span>`);
		} else if (slave.devotion > 20) {
			if (canSee(slave)) {
				r.push(`${He} looks in the mirror and turns ${his} head side to side admiring ${his} new ${slave.hornColor} ${slave.horn},`);
			} else {
				r.push(`${He} can't see but it's clear from the dull ache that something has been done to ${his} head,`);
			}
			if (hasAnyArms(slave)) {
				r.push(`the base is still a bit sore, but ${he} reaches up to feel their shape,`);
			}
			r.push(`${he} turns to you with a smile, tilting ${his} head at various angles to show them off. ${He} seems to think ${his} new horns are cute. As with all invasive surgery ${his} health has been affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new ${slave.hornColor} ${slave.horn} disapprovingly`);
			} else {
				r.push(`${He} can't see but it's clear from the dull ache that something has been done to ${his} head,`);
			}
			if (hasAnyArms(slave)) {
				r.push(`the base is still a bit sore, but ${he} reaches up to tug on them gently,`);
			}
			r.push(`${He}'s come to terms with the fact that ${he}'s a slave, so ${he} isn't much affected mentally despite the surprise of having horns attached to ${his} head. As with all invasive surgery ${his} health has been affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new ${slave.hornColor} ${slave.horn} with disgust.`);
			} else {
				r.push(`${He} can't see but it's clear from the dull ache that something has been done to ${his} head, and probably not for the better.`);
			}
			if (hasAnyArms(slave)) {
				r.push(`The base is still a bit sore, but ${he} reaches up to tug on them, as if to confirm it's not some trick.`);
			}
			r.push(`For now, ${he} seems to view ${his} head ornamentation as a cruel imposition. As with all invasive surgery ${his} health has been affected. ${He} is now terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}
		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.Horn = class extends App.Medicine.Surgery.Procedure {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @param {string} name
	 * @param {FC.HornType} hornType
	 * @param {string} hornColor
	 */
	constructor(slave, name, hornType, hornColor) {
		super(slave);
		this._name = name;
		this.type = hornType;
		this.color = hornColor;
	}

	get name() {
		return this._name;
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.horn = this.type;
		this._slave.hornColor = this.color;
		return this._assemble(new App.Medicine.Surgery.Reactions.Horn());
	}
};


code:
App.Medicine.Surgery.Reactions.HornGone = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} shows little reaction to the removal of ${his} head ornamentation. As with all invasive surgery <span class="health dec">${his} health has been affected.</span>`);
		} else if (slave.devotion > 20) {
			r.push(`${He} is a little sad ${his} head ornaments are gone but since ${he} is attentive to your will it doesn't have a great impact on ${his} mental state. As with all invasive surgery ${his} health has been affected.`);
		} else {
			r.push(`${He} is glad to be rid of the horns but any happiness is tempered by ${his} general dissatisfaction of being treated as your surgical plaything. As with all invasive surgery ${his} health has been affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.HornGone = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return this._slave.horn === "one long oni horn" ? "Remove it" : "Remove them";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.horn = "none";
		this._slave.hornColor = "none";
		return this._assemble(new App.Medicine.Surgery.Reactions.HornGone());
	}
};


code:
App.Medicine.Surgery.Reactions.Liposuction = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} notices that ${he} is quite lighter than ${he} used to be. As with all surgeries, <span class="health dec">${his} health has been affected.</span>`);
		} else if (slave.behavioralFlaw === "anorexic") {
			if (canSee(slave)) {
				r.push(`${He} looks over ${his} new thin figure experimentally`);
			} else {
				r.push(`${He} shifts ${his} weight experimentally`);
			}
			r.push(`and turns to you with a smile to show it off. As an anorexic ${he} thinks you have brought ${him} closer to the true ideal. As with all surgeries, ${his} health has been affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 50) {
			if (canSee(slave)) {
				r.push(`${He} looks over ${his} new thin figure experimentally`);
			} else {
				r.push(`${He} shifts ${his} weight experimentally`);
			}
			r.push(`and turns to you with a smile to show it off. ${He}'s still sore, so ${he} doesn't bend or flirt, but ${he} turns around to let you see it from all angles. ${He}'s happy with your changes to ${his} body. As with all surgery ${his} health has been affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`eyes ${his} new thin figure`);
			} else {
				r.push(`shifts ${his} weight`);
			}
			r.push(`skeptically. ${He}'s still sore, so ${he} doesn't bend or touch ${himself}. ${He}'s come to terms with the fact that ${he}'s a slave, so ${he} expected something like this when ${he} was sent to the surgery. ${He} isn't much affected mentally. As with all surgery ${his} health has been affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new thin figure`);
			} else {
				r.push(`How light ${he} feels fills ${him}`);
			}
			r.push(`with resentment. ${He}'s still sore, so ${he} doesn't bend or touch ${himself}, but ${canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`}. ${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim. For now, ${he} seems to view this model figure as a cruel imposition. As with all surgery ${his} health has been affected. ${He} is terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}
		if (slave.weight > 190 && slave.bellySag < 10) {
			r.push(`Due to the tremendous amount of fat removed from ${his} midsection, it sags terribly after the surgery.`);
			slave.bellySag = 10;
		} else if (slave.weight > 130 && slave.bellySag < 5) {
			r.push(`Due to the large amount of fat removed from ${his} midsection, it droops noticeably after the surgery.`);
			slave.bellySag = 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.Liposuction = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this.originalSlave.weight > 190) {
			return "Major liposuction";
		} else if (this.originalSlave.weight > 130) {
			return "Heavy liposuction";
		} else {
			return "Liposuction";
		}
	}

	get healthCost() {
		if (this.originalSlave.weight > 190) {
			return 40;
		} else if (this.originalSlave.weight > 130) {
			return 20;
		} else {
			return 10;
		}
	}

	apply(cheat) {
		this._slave.weight = 0;
		return this._assemble(new App.Medicine.Surgery.Reactions.Liposuction());
	}
};


code:
App.Medicine.Surgery.Reactions.Ribs = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He}'s desperately stiff and sore. It takes a good while for ${him} to figure out what has happened, but eventually ${his} careful investigations discern that the cause is ${his} new extremely narrow waist. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else if (slave.behavioralFlaw === "anorexic") {
			r.push(`${He}'s desperately stiff and sore. It takes a good while for ${him} to figure out what has happened, but eventually ${his} careful investigations discern that the cause of ${his} extremely narrow waist is that ${his} ribcage has been shortened. ${He} gasps with shock, and when ${he}`);
			if (canSee(slave)) {
				r.push(`looks at you, you see awe in ${his} eyes.`);
			} else {
				r.push(`turns to face you, you see awe on ${his} face.`);
			}
			r.push(`As an anorexic ${he} thinks you have brought ${him} closer to the true ideal. Since the surgery was invasive, ${his} health has been greatly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 50) {
			r.push(`${He}'s desperately stiff and sore. It takes a good while for ${him} to figure out what has happened, but eventually ${his} careful investigations discern that the cause of ${his} extremely narrow waist is that ${his} ribcage has been shortened. ${He} gasps with shock, and when ${he}`);
			if (canSee(slave)) {
				r.push(`looks at you, you see awe and fear in ${his} eyes.`);
			} else {
				r.push(`turns to you, you see awe and fear on ${his} face.`);
			}
			r.push(`${He} has become more submissive due to your radical reshaping of ${his} body. Since the surgery was invasive, ${his} health has been greatly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 20) {
			r.push(`${He}'s desperately stiff and sore. It takes a good while for ${him} to figure out what has happened, but eventually ${his} careful investigations discern that the cause of ${his} extremely narrow waist is that ${his} ribcage has been shortened. ${He} gasps with shock, but eventually ${his} shoulders slump and ${he} tries to carry on. ${He} isn't much affected mentally. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else {
			r.push(`${He}'s desperately stiff and sore. It takes a good while for ${him} to figure out what has happened, but eventually ${his} careful investigations discern that the cause of ${his} extremely narrow waist is that ${his} ribcage has been shortened. ${He} gasps with shock, wobbles a little, gasps with pain at the soreness as ${he} does, and then manages to hold ${himself} upright and still as ${he} sobs. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 10;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.Ribs = class extends App.Medicine.Surgery.Procedure {
	get name() {
		const {his} = getPronouns(this.originalSlave);
		return `Remove ribs to severely narrow ${his} waist`;
	}

	get healthCost() {
		return 40;
	}

	apply(cheat) {
		this._slave.waist = -100;
		return this._assemble(new App.Medicine.Surgery.Reactions.Ribs());
	}
};


code:
App.Medicine.Surgery.Reactions.Waist = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`While ${he} notices how sore ${his} waist is, ${he} fails to find the reason why. Since the surgery was invasive, <span class="health dec">${his} health has been greatly affected.</span>`);
		} else if (slave.behavioralFlaw === "anorexic") {
			if (canSee(slave)) {
				r.push(`${He} looks over ${his} new waist experimentally`);
			} else {
				r.push(`${He} shifts ${his} weight experimentally`);
			}
			r.push(`and turns to you with a smile to show it off. As an anorexic ${he} thinks you have brought ${him} closer to the true ideal. Since the surgery was invasive, ${his} health has been greatly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 50) {
			if (canSee(slave)) {
				r.push(`${He} looks over ${his} new waist experimentally`);
			} else {
				r.push(`${He} shifts ${his} weight experimentally`);
			}
			r.push(`and turns to you with a smile to show it off. ${He}'s still sore, so ${he} doesn't bend or flirt, but ${he} turns around to let you see it from all angles. ${He}'s happy with your changes to ${his} waist. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			r.push(`${He}`);
			if (canSee(slave)) {
				r.push(`eyes ${his} new waist`);
			} else {
				r.push(`shifts ${his} weight`);
			}
			r.push(`skeptically. ${He}'s still sore, so ${he} doesn't bend or touch ${himself}. ${He}'s come to terms with the fact that ${he}'s a slave, so ${he} expected something like this when ${he} was sent to the surgery. ${He} isn't much affected mentally. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new waist`);
			} else {
				r.push(`How light ${he} feels fills ${him}`);
			}
			r.push(`with resentment. ${He}'s still sore, so ${he} doesn't bend or touch ${himself}, but ${canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`}. ${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim. For now, ${he} seems to view this fake figure as a cruel imposition. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.WaistReduction = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Liposuction";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.waist -= 20;
		return this._assemble(new App.Medicine.Surgery.Reactions.Waist());
	}
};


code:
App.Medicine.Surgery.Reactions.Areolae = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} shows little reaction to ${his} altered nipples. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
		} else if (slave.devotion > 20 && this._strongKnownFetish(slave, "boobs")) {
			if (hasAnyArms(slave)) {
				r.push(`${He}'s barely out of the surgery before ${he}'s playing with ${his} new nipples despite the pain.`);
			} else {
				r.push(`${He}'s barely out of the surgery before ${he}'s rubbing ${his} new nipples against anything ${he} can reach, despite the pain.`);
			}
			r.push(`${He}'s deliriously happy with your changes to what ${he} thinks of as ${his} primary sexual organs, so much so that ${he} now trusts your plans for ${his} body. As with all surgery ${his} health has been slightly affected.`);
			reaction.trust += 4;
			reaction.devotion += 4;
		} else if (slave.devotion > 50) {
			if (hasAnyArms(slave)) {
				r.push(`${He} runs a finger over ${his} new nipples experimentally and turns to you with a smile to show them off. ${He}'s still sore, so ${he} doesn't touch them much, but ${he} turns from side to side to let you see them from all angles.`);
			} else {
				r.push(`${He} bounces a little to feel the new nipples capping ${his} tits turns ${his} torso to you with a smile to show them off. ${He}'s still sore, so ${he} doesn't move too violently, but ${he} wiggles ${himself} a little to show off.`);
			}
			r.push(`<span class="devotion inc">${He}'s happy with your changes to ${his} nipples.</span> As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new nipples skeptically.`);
			} else {
				r.push(`The cool air flowing over ${his} new nipples draws a skeptical expression to ${his} face.`);
			}
			if (hasAnyArms(slave)) {
				r.push(`${He}'s still sore, so ${he} doesn't touch them.`);
			} else {
				r.push(`${He}'s still sore, so ${he} keeps ${his} body still.`);
			}
			r.push(`${He}'s come to terms with the fact that ${he}'s a slave, so ${he} isn't much affected mentally despite the surprise of having ${his} nipples reshaped. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new nipples`);
			} else {
				r.push(`The feel of the air running over ${his} new nipples fills ${him}`);
			}
			r.push(`with resentment.`);
			if (hasAnyArms(slave)) {
				r.push(`${He}'s still sore, so ${he} doesn't touch them,`);
			} else {
				r.push(`${He}'s still sore, so ${he} keeps ${his} body still,`);
			}
			r.push(`but ${canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`}.`);
			r.push(`${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim. For now, ${he} seems to view ${his} altered nipples as a cruel imposition. As with all surgery ${his} health has been slightly affected. ${He} is now terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.RestoreNipples = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Restore their shape and function";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.nipples = "huge";
		return this._assemble(new App.Medicine.Surgery.Reactions.Areolae());
	}
};

App.Medicine.Surgery.Procedures.ReshapeAreolae = class extends App.Medicine.Surgery.Procedure {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @param {string} areolaeShape
	 */
	constructor(slave, areolaeShape) {
		super(slave);
		this.areolaeShape = areolaeShape;
	}

	get name() {
		if (this.areolaeShape === "circle") {
			return "Normal";
		}
		return capFirstChar(`${this.areolaeShape}-shaped`);
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		if (this._slave.areolaeShape === "circle") {
			this._slave.areolae -= 1;
		}
		this._slave.areolaeShape = this.areolaeShape;
		return this._assemble(new App.Medicine.Surgery.Reactions.Areolae());
	}
};

App.Medicine.Surgery.Procedures.ResizeAreolae = class extends App.Medicine.Surgery.Procedure {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @param {number} aeroleaDelta resize by how much, may be negative
	 */
	constructor(slave, aeroleaDelta) {
		super(slave);
		this.aeroleaDelta = aeroleaDelta;
	}

	get name() {
		if (this.aeroleaDelta < 0) {
			return "Reduce areolae";
		} else {
			return "Enlarge areolae";
		}
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.areolae += this.aeroleaDelta;
		return this._assemble(new App.Medicine.Surgery.Reactions.Areolae());
	}
};


code:
App.Medicine.Surgery.Reactions.EndLactation = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, His, his, him} = getPronouns(slave);
		const r = [];

		r.push(`${He} notices almost immediately that the soreness that used to tell ${him} ${he} needed to be milked has gone. ${He} bounces ${his} breasts idly; it looks like ${he} doesn't know what to think about having ${his} lactation dry up. As with all surgery ${his} health has been slightly affected.`);

		if (slave.assignment === "get milked" || slave.assignment === "work in the dairy") {
			r.push(`<span class="job change">${His} assignment has defaulted to rest.</span>`);
			reaction.shortReaction.push(`<span class="job change">${His} assignment has defaulted to rest.</span>`);
			removeJob(slave, slave.assignment);
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.EndLactation = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Remove lactation implant";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lactation = 0;
		this._slave.lactationDuration = 0;
		return this._assemble(new App.Medicine.Surgery.Reactions.EndLactation());
	}
};


code:
App.Medicine.Surgery.Reactions.Lactation = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, His, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} notices almost immediately that ${his} breasts feel fuller, gasping as milk begins to leak from ${his} nipples. As with all surgery ${his} health has been slightly affected.`);
		} else if (slave.devotion > 50) {
			if (hasAnyArms(slave)) {
				r.push(`${He} hefts ${his} swollen breasts experimentally and turns to you with a smile to show them off.`);
				if (slave.lactation === 1) {
					r.push(`${His} milk begins to flow as ${he} does, but instead of a slight dribble, it keeps coming.`);
				} else {
					r.push(`As ${he} does, a drop of milk drips from a nipple and ${he} gasps in surprise.`);
				}
				r.push(`${He}'s shocked, but after`);
				if (canTaste(slave)) {
					r.push(`tasting`);
				} else {
					r.push(`licking up`);
				}
				r.push(`${his} own milk experimentally ${he}`);
				if (canSee(slave)) {
					r.push(`looks`);
				} else {
					r.push(`smiles`);
				}
				r.push(`at you shyly and gently teases some more milk out of ${himself}. The resulting stream of cream is bountiful and ${he} giggles happily.`);
			} else {
				r.push(`As you carry ${him} out of the surgery, droplets of milk begin to bud from ${his} nipples, and ${he} giggles giddily.`);
			}
			r.push(`<span class="devotion inc">${He}'s happy with your changes to ${his} boobs.</span> As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			if (hasAnyArms(slave)) {
				if (canSee(slave)) {
					r.push(`${He} eyes ${his} swollen breasts skeptically.`);
				} else {
					r.push(`${He} is skeptical of the how swollen ${his} breasts feel.`);
				}
				r.push(`${He}'s still sore, so ${he} doesn't touch them. Even so, a drop of milk drips from a nipple and ${he} gasps in surprise.`);
				if (slave.lactation === 1) {
					r.push(`While ${he} was already lactating, it never just flowed freely like this. After`);
				} else {
					r.push(`${He}'s shocked, but after`);
				}
				r.push(`a few experimental pokes and rubs at ${himself} ${he} seems to understand that ${he}'s a lactation slave now, and that's how it is.`);
			} else {
				r.push(`As you carry ${him} out of the surgery, droplets of milk begin to bud from ${his}`);
				if (slave.lactation === 1) {
					r.push(`nipples; ${he} was already lactating, but it never just flowed freely like this.`);
				} else {
					r.push(`nipples.`);
				}
				r.push(`${He}'s shocked, but ${he} seems to understand that ${he}'s a lactation slave now, and that's how it is.`);
			}
			r.push(`${He} isn't much affected mentally. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} swollen breasts`);
			} else {
				r.push(`As ${he} feels the fullness in ${his} breasts, ${his} face fills`);
			}
			r.push(`with resentment. ${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim.`);
			if (slave.lactation === 1) {
				r.push(`As milk begins to bead at ${his} nipples, ${he} breaks down in rage and unhappiness, dripping bitter tears as the flow steadily increases past what ${he} was used to.`);
			} else {
				r.push(`When ${he} finally figures out ${he}'s lactating, ${he} breaks down in rage and unhappiness, dripping milk and bitter tears.`);
			}
			r.push(`For now, ${he} seems to view being a lactation slave as a cruel hardship. As with all surgery ${his} health has been slightly affected. ${He} is now terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}

		// Done here to allow for natural lactation into artificial lactation text
		slave.lactation = 2;

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.Lactation = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Implant slow-release pro-lactation drugs";
	}

	get description() {
		const {his} = getPronouns(this.originalSlave);
		return `This may increase ${his} natural breast size`;
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.lactationDuration = 2;
		this._slave.induceLactation = 0;
		this._slave.boobs -= this._slave.boobsMilk;
		this._slave.boobsMilk = 0;
		this._slave.rules.lactation = "none";
		return this._assemble(new App.Medicine.Surgery.Reactions.Lactation());
	}
};


code:
App.Medicine.Surgery.Reactions.NippleCunts = class extends App.Medicine.Surgery.SimpleReaction {
	reaction(slave, diff) {
		const reaction = super.reaction(slave, diff);
		const {He, he, his, him, himself} = getPronouns(slave);
		const r = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} shows no reaction to ${his} altered nipples. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
		} else if (slave.devotion > 20 && this._strongKnownFetish(slave, "boobs")) {
			if (hasAnyArms(slave)) {
				r.push(`${He}'s barely out of the surgery before ${he}'s experimentally probing ${his} new nipples despite the pain.`);
			} else {
				r.push(`${He}'s barely out of the surgery before ${he}'s rubbing ${his} new nipples against anything ${he} can reach, despite the pain.`);
			}
			r.push(`${He}'s deliriously happy with your changes to what ${he} thinks of as ${his} primary sexual organs, so much so that ${he} now trusts your plans for ${his} body. As with all surgery ${his} health has been slightly affected.`);
			reaction.trust += 4;
			reaction.devotion += 4;
		} else if (slave.devotion > 50) {
			if (hasAnyArms(slave)) {
				r.push(`${He} runs a finger into ${his} new nipples experimentally and turns to you with a smile to show them off. ${He}'s still sore, so ${he} doesn't touch them much, but ${he} turns from side to side to let you see them from all angles.`);
			} else {
				r.push(`${He} bounces a little to feel the new nipples capping ${his} tits turns ${his} torso to you with a smile to show them off. ${He}'s still sore, so ${he} doesn't move too violently, but ${he} wiggles ${himself} a little to show off.`);
			}
			r.push(`<span class="devotion inc">${He}'s happy with your changes to ${his} nipples.</span> As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			reaction.devotion += 4;
		} else if (slave.devotion >= -20) {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new nipples skeptically.`);
			} else {
				r.push(`The cool air flowing over ${his} new nipples draws a skeptical expression to ${his} face.`);
			}
			if (hasAnyArms(slave)) {
				r.push(`${He}'s still sore, so ${he} doesn't touch them.`);
			} else {
				r.push(`${He}'s still sore, so ${he} keeps ${his} body still.`);
			}
			r.push(`${He}'s come to terms with the fact that ${he}'s a slave, so ${he} isn't much affected mentally despite the surprise of having ${his} nipples reshaped; ${he} may reconsider once ${he} realizes just what they are now capable of. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
			reaction.trust -= 5;
		} else {
			if (canSee(slave)) {
				r.push(`${He} eyes ${his} new nipples`);
			} else {
				r.push(`The feel of the air running over ${his} new nipples fills ${him}`);
			}
			r.push(`with resentment.`);
			if (hasAnyArms(slave)) {
				r.push(`${He}'s still sore, so ${he} doesn't touch them,`);
			} else {
				r.push(`${He}'s still sore, so ${he} keeps ${his} body still,`);
			}
			r.push(`but ${canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`}.`);
			r.push(`${He} still thinks of ${himself} as a person, so ${he} isn't used to the idea of being surgically altered to suit your every whim; a notion that is likely only going to strengthen once ${he} realizes just how fuckable ${his} tits have become. For now, ${he} seems to view ${his} altered nipples as a cruel imposition. As with all surgery ${his} health has been slightly affected. ${He} is now terribly afraid of your total power over ${his} body.`);
			reaction.trust -= 10;
			reaction.devotion -= 5;
		}

		reaction.longReaction.push(r);
		return reaction;
	}
};

App.Medicine.Surgery.Procedures.NippleCunts = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Reshape them to support being penetrated";
	}

	get description() {
		return this._slave.piercing.nipple.weight > 0 ? `Will remove piercings` : ``;
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.nipples = "fuckable";
		this._slave.piercing.nipple.weight = 0;
		return this._assemble(new App.Medicine.Surgery.Reactions.NippleCunts());
	}
};


code:
{
	class Amp extends App.Medicine.Surgery.Reaction {
		get key() { return "amp"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const r = [];

			V.nextButton = " ";
			r.push(App.Medicine.Limbs.amputate(slave, V.oldLimbs, "Remote Surgery"));
			delete V.oldLimbs;

			reaction.longReaction.push(r);
			return reaction;
		}

		outro(slave, previousReaction) {
			const reaction = super.outro(slave, previousReaction);
			const {He, him} = getPronouns(slave);

			if (slave.behavioralFlaw === "arrogant") {
				reaction.longReaction.last()
					.push(`<span class="flaw break">${He} can hardly be arrogant relying on others to feed, bathe and carry ${him}.</span>`);
				slave.behavioralFlaw = "none";
			}

			return reaction;
		}
	}

	new Amp();
}


code:
{
	class Anus extends App.Medicine.Surgery.Reaction {
		get key() { return "anus"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his, him} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} leaves the surgery with a terribly sore rear end and little desire to mess with it. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			} else {
				if (this._strongKnownFetish(slave, "buttslut")) {
					r.push(`${He} leaves the surgery with a terribly sore rear end. ${He} is filled with joy at the prospect of having a tight butt all over again, so much so that ${he} now trusts your plans for ${his} body. If ${he} had much in the way of anal skills, they've likely suffered. As with all surgery ${his} health has been slightly affected.`);
					reaction.trust += 4;
					reaction.devotion += 10;
				} else if (slave.devotion > 50) {
					r.push(`${He} leaves the surgery with a terribly sore rear end. ${He}'s a bit anxious at the prospect of the pain having to get back to a loose asshole the hard way, but ${he}'s happy that you think ${him} worth the effort of surgical improvement. If ${he} had much in the way of anal skills, they've likely suffered. As with all surgery ${his} health has been slightly affected.`);
					reaction.devotion += 4;
				} else if (slave.devotion >= -20) {
					r.push(`${He} leaves the surgery with a terribly sore rear end. ${He} knows ${he}'ll have to endure the pain of being fucked in a tight asshole again soon enough, but trepidation is nothing new for ${him}. If ${he} had much in the way of anal skills, they've likely suffered. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
					reaction.trust -= 5;
				} else {
					r.push(`${He} leaves the surgery with a terribly sore rear end. ${He}'s horrified at surgical alteration of ${his} rear end, and knows that this means that ${he}'ll have to take the pain of sodomy in a tight ass all over again. If ${he} had much in the way of anal skills, they've likely suffered. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} most intimate parts.`);
					reaction.trust -= 10;
					reaction.devotion -= 5;
				}
				if (slave.skill.anal > 10) {
					slave.skill.anal -= 10;
				}
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Anus();
}


code:
{
	class BackInterface extends App.Medicine.Surgery.Reaction {
		get key() { return "backInterface"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {his} = getPronouns(slave);
			const r = [];

			r.push(`Implanting back sockets and interfacing them with ${his} spinal column is a delicate and invasive procedure <span class="health dec">${his} health has been greatly affected.</span>`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new BackInterface();
}


code:
{
	class Braces extends App.Medicine.Surgery.Reaction {
		get key() { return "braces"; }

		get invasive() { return false; }

		get permanentChanges() { return false; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, His, his, him, himself} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} is quite quick to realize ${his} teeth now have something on them. What its purpose is is beyond ${him}, though.`);
			} else if (slave.teeth === "straightening braces") {
				r.push(`Quite aware that ${his} crooked, aching teeth are now in braces,`);
				if (slave.devotion > 50) {
					r.push(`${He} smiles tentatively at`);
					if (canSee(slave)) {
						r.push(`${himself} in the mirror.`);
					} else {
						r.push(`you.`);
					}
					r.push(`${He}'s experiencing considerable discomfort, but ${he} knows it will <span class="devotion inc">make ${him} prettier for you,</span> and resolves to do ${his} best to put up with it.`);
					reaction.devotion += 4;
				} else if (slave.devotion > 20) {
					r.push(`${He} pulls ${his} lips back to`);
					if (canSee(slave)) {
						r.push(`check them out.`);
					} else {
						r.push(`feel them.`);
					}
					r.push(`${He}'s experiencing considerable discomfort, but ${he} knows it will <span class="devotion inc">make ${him} prettier,</span> and ${he} accepts that the pain is for ${his} own good.`);
					reaction.devotion += 2;
				} else {
					r.push(`${He} pulls ${his} lips back to`);
					if (canSee(slave)) {
						r.push(`check them out.`);
					} else {
						r.push(`feel them.`);
					}
					r.push(`${He}'s experiencing considerable discomfort, and ${his} feelings are mixed. ${He} knows that straightening teeth is expensive, and in different circumstances ${he} would probably be glad to be given free braces. However, ${he}'s very aware that ${he}'s being beautified because ${he}'s a sex slave.`);
				}
			} else if (slave.teeth === "cosmetic braces") {
				r.push(`Quite aware that ${his} aching teeth are now in braces,`);
				if (slave.devotion > 50) {
					r.push(`${he} smiles tentatively at`);
					if (canSee(slave)) {
						r.push(`${himself} in the mirror.`);
					} else {
						r.push(`you.`);
					}
					r.push(`${His} teeth are already quite straight, so ${he} doesn't understand why you've done this. ${He}'s not unwilling to put up with inexplicable things you command, however, so ${he} resolves to put up with this, too.`);
				} else if (slave.devotion > 20) {
					r.push(`${he} pulls ${his} lips back to`);
					if (canSee(slave)) {
						r.push(`check them out.`);
					} else {
						r.push(`feel them.`);
					}
					r.push(`The discomfort is limited by the fact that ${his} teeth are already straight. ${He} doesn't understand why you've given ${his} braces anyway, so ${his} reaction is limited to vague confusion.`);
				} else {
					r.push(`${he} pulls ${his} lips back to`);
					if (canSee(slave)) {
						r.push(`check them out.`);
					} else {
						r.push(`feel them.`);
					}
					r.push(`${His} teeth are already straight, limiting the discomfort but confusing ${him} greatly. ${He}'s not a little relieved that the autosurgery's attention to ${his} mouth only left ${him} with pointless braces, and is only mildly angered by the strange intrusion.`);
					reaction.devotion -= 2;
				}
			}
			r.push(`Though unpleasant, orthodontia isn't particularly harmful; ${his} health is unaffected.`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Braces();
}


code:
{
	class ChemCastrate extends App.Medicine.Surgery.Reaction {
		get key() { return "chem castrate"; }

		get invasive() { return false; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his} = getPronouns(slave);
			const r = [];

			r.push(`${He} knows something has been done to ${his} testicles, but ${he} can't feel anything off about them. Since the surgery was nothing more than a simple injection, ${he} has been spared any pain.`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new ChemCastrate();
}


code:
{
	class Chop extends App.Medicine.Surgery.Reaction {
		get key() { return "chop"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, His, his, him, himself} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`Surprisingly, ${he} already realized while exiting that ${his} genitalia was completely reshaped. The reasons why are lost to ${him}, though.`);
			} else if (slave.vagina === -1) {
				r.push(`Of course, ${he} already realized while exiting that something very dear to ${him} has been taken away.`);
				if (slave.devotion > 50 && slave.sexualFlaw === "self hating") {
					r.push(`Strong emotions play out on ${his} face as ${he} experiences a watershed in ${his} life of sexual slavery, perhaps the most radical one ${he}'ll ever experience. ${He} loves you with all ${his} being, and truly hates ${himself}. ${He} finds ${himself} in an emotional place where ${he}'s willing to accept having had you cut ${his} dick off. ${He} knows ${he}'s a worthless piece of trash, and realizes that if you feel like trimming useless bits off ${him}, that's your prerogative. In moments, ${he}'s confirmed in total, final, fanatical submission to your will. It's almost frightening.`);
					reaction.devotion += 50;
				} else if (slave.devotion > 20 && slave.fetishKnown === 1 && slave.fetishStrength > 95 && slave.fetish === "buttslut") {
					r.push(`${He}'s such a complete buttslut, though, that ${he} finds ${he} doesn't really care. ${He} never really paid much attention to ${his} own dick; for ${him}, sex is about the phalli that get rammed up ${his} ass. And you didn't take that from ${him}. If anything, ${he}'s reassured by the implicit promise that ${he}'ll never be anything but a butthole slut, and of course is forced even further into submission to your will.`);
					reaction.devotion += 8;
					reaction.trust += 8;
				} else if (slave.devotion > 20 && slave.fetishKnown === 1 && slave.fetishStrength > 95 && slave.fetish === "cumslut") {
					r.push(`${He}'s such an oral slut, though, that ${he} finds ${he} doesn't really care. ${He} never really paid much attention to ${his} dick; for ${him}, sex is about what ${he} gets to suck. As far as ${he}'s concerned, you've simply confirmed that ${his} most important hole is the one in ${his} face. If anything, ${he}'s reassured by the implicit promise that ${he}'ll never be anything more than a nice inviting facepussy, and of course, ${he}'s forced even further into submission to your will.`);
					reaction.devotion += 8;
					reaction.trust += 8;
				} else if (slave.devotion > 20 && slave.fetishKnown === 1 && slave.fetishStrength > 95 && slave.fetish === "submissive") {
					r.push(`${He}'s such a total submissive, though, that ${he} accepts even this. Having ${his} cock removed, reducing ${him} to a sexually helpless place where ${he} can only receive pleasure by being penetrated, is perhaps the final step in sexual slavery, and ${he}'s a little awed by it. If anything, ${he}'s reassured by the implicit promise that ${his} body exists for the sexual gratification of others, and of course, ${he}'s forced even further into submission to your will.`);
					reaction.devotion += 8;
					reaction.trust += 8;
				} else if (slave.devotion > 95) {
					r.push(`Doubt, fear, and even nausea play across ${his} face, but ${he}'s so worshipful of you that ${he} masters them all, accepting that this is your will. There's surprisingly little mental effect on ${him}. The horror of having ${his} dick cut off is so strong that it breaks through to ${him}, and the only way ${he} can find to deal with it is to think about it as little as possible. ${He} falls back on worshipful duty.`);
				} else if (slave.devotion > 50) {
					r.push(`${He}'s devoted to you, but doubt and fear play across ${his} face as ${he} comes to terms with what's happened. ${He} does not see how having ${his} dick removed will improve ${his} sexual slavery. ${He} does not rage or scream, but ${he} does cry, sadly wondering whether ${he}'s valuable to you at all, or if ${he}'s just a surgical plaything to be degraded. ${He}'s very frightened that you'll cut off more of ${his} remaining parts.`);
					reaction.trust -= 10;
					reaction.devotion -= 10;
				} else if (slave.devotion > 20) {
					r.push(`${He}'s properly broken to slavery, but this is much too far. Having ${his} dick cut off cuts straight through ${his} conditioning, and tears roll down ${his} face as the horrible permanence of what's happened to ${him} really sinks in. Open anger begins to become apparent through ${his} tears; ${he} thought that ${his} obedience merited better than this, and ${he}'s extremely terrified to find that despite being a decent slave, ${he} remains a surgical playground.`);
					reaction.trust -= 20;
					reaction.devotion -= 20;
				} else {
					r.push(`${He}'s horrified almost beyond the ability of ${his} mind to comprehend. ${His} face takes on a blank look as ${he} goes into shock. There's no screaming and no tears, not yet; it will take ${his} time to process what's happened to ${him}. Without a doubt, ${he}'ll be absolutely filled by rage and terror.`);
					reaction.trust -= 40;
					reaction.devotion -= 40;
				}
			} else {
				r.push(`Of course, ${he} already realized while exiting that ${his} genitalia has been radically simplified. As a herm slave ${he} knew this day might come,`);
				if (slave.devotion > 50) {
					r.push(`and ${his} face is a strange mix of hope, happiness, satisfaction, and the tiniest tinge of soul-crushing sadness as ${he}`);
					if (canSee(slave)) {
						r.push(`views`);
					} else {
						r.push(`feels`);
					}
					r.push(`the vagina that is all that remains of ${his} once-unique hermaphroditic genitalia. <span class="devotion inc">${He} has become more submissive due to your radical reshaping of ${his} body.</span>`);
					reaction.devotion += 4;
				} else if (slave.devotion > 20) {
					r.push(`and ${his} face is a strange mix of fear, hope, and resignation as ${he}`);
					if (canSee(slave)) {
						r.push(`views`);
					} else {
						r.push(`feels`);
					}
					r.push(`the vagina that is all that remains of ${his} once-unique hermaphroditic genitalia. Eventually ${his} shoulders slump and ${he} tries to carry on. ${He} will struggle with feelings of confusion and loss. ${He} is terribly afraid of your total power over ${his} body.`);
					reaction.trust -= 10;
					reaction.devotion -= 5;
				} else {
					r.push(`but expectations and the reality are two different things. ${He}'s beside ${himself}, weeping gently.`);
					if (hasAnyArms(slave)) {
						r.push(`${He} absently moves a hand to where ${his} penis would have been and snatches it away with a sob.`);
					}
					r.push(`<span class="devotion dec">The surgical invasion has filled ${him} with horror and anger.</span> ${He} is <span class="trust dec">cripplingly afraid</span> of your total power over ${his} body.`);
					reaction.trust -= 20;
					reaction.devotion -= 20;
				}
			}
			r.push(`Naturally, <span class="health dec">${his} health has been greatly affected</span> by such serious surgery.`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Chop();
}


code:
{
	class Circumcision extends App.Medicine.Surgery.Reaction {
		get key() { return "circumcision"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his, himself} = getPronouns(slave);
			const r = [];

			if (slave.dick > 0) {
				if (slave.fetish === "mindbroken") {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that something was done to ${his} dick. Since it is still there, ${he} doesn't understand what changed. Circumcision of an adult is not a trivial procedure, so ${his} health has been slightly affected.`);
				} else if (slave.devotion > 50) {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that something was done to ${his} dick. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s very happy you'd take an interest in ${his} penis, and looks forward to having a slightly easier time keeping ${himself} clean through ${his} life as a sex slave. Circumcision of an adult is not a trivial procedure, so ${his} health has been slightly affected.`);
					reaction.devotion += 4;
				} else if (slave.devotion > 20) {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that something was done to ${his} dick. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s flooded with relief. ${He}'s so elated that ${he} hasn't been severely damaged that ${he} doesn't mind your taking surgical control of ${his} member. Circumcision of an adult is not a trivial procedure, so ${his} health has been slightly affected.`);
				} else {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that something was done to ${his} dick. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s flooded with relief, since ${he} was afraid that you'd done something far more terrible. Once ${he} has time to think about it, though, ${he}'s somewhat resentful, since ${he} naturally feels a certain proprietary interest in ${his} own penis. Circumcision of an adult is not a trivial procedure, so ${his} health has been slightly affected.`);
					reaction.devotion -= 5;
				}
			} else {
				if (slave.fetish === "mindbroken") {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that something was done to ${his} crotch. Since everything is still there, ${he} doesn't understand what changed. ${his} health has been slightly affected.`);
				} else if (slave.devotion > 50) {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that ${his} crotch was operated on. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s very happy you'd take an interest in ${his} sex, and looks forward to having a slightly easier time keeping ${himself} clean through ${his} life as a sex slave. ${his} health has been slightly affected.`);
					reaction.devotion += 4;
				} else if (slave.devotion > 20) {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that ${his} crotch was operated on. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s flooded with relief. ${He}'s so elated that ${he} hasn't been severely damaged that ${he} doesn't mind minor surgical alteration. ${his} health has been slightly affected.`);
				} else {
					r.push(`${He} exits the surgery gingerly, since ${he} can feel that ${his} crotch was operated on. ${He} examines it carefully`);
					if (canSee(slave)) {
						r.push(`in the mirror.`);
					} else {
						r.push(`by feeling alone.`);
					}
					r.push(`Realizing that ${he}'s been circumcised, ${he}'s flooded with relief, since ${he} was afraid that you'd done something far more terrible. Once ${he} has time to think about it, though, ${he}'s somewhat resentful, since ${he} naturally feels a certain proprietary interest in ${his} sex. ${his} health has been slightly affected.`);
					reaction.devotion -= 5;
				}
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Circumcision();
}


code:
{
	class ClitoralEnlargement extends App.Medicine.Surgery.Reaction {
		get key() { return "clitoral enlargement"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, His, his} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} leaves the surgery with a terribly sore pussy and little desire to mess with it. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			} else if (slave.energy > 95) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He} is filled with joy at the thought that ${his} pussy will now be more appealing to ${his} ${getWrittenTitle(slave)}; ${his} sensitivity has been increased, raising ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected.`);
				reaction.trust += 4;
				reaction.devotion += 10;
				slave.energy += 1;
			} else if (slave.devotion > 50) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s happy that you think ${his} pussy worth the effort of surgical improvement; ${his} sensitivity has been increased, raising ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected.`);
				reaction.devotion += 4;
				slave.energy += 1;
			} else if (slave.devotion >= -20) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s somewhat revolted by the surgery, but as far as ${he}'s concerned, the short recovery period will mean a time during which ${he} can be sure no one will use ${his} pussy. ${His} sensitivity has been increased, raising ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
				reaction.trust -= 5;
				slave.energy += 1;
			} else {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s horrified at surgical alteration of ${his} womanhood; this is probably more of an invasion than ${he} could readily imagine before today. ${His} sensitivity has been increased, raising ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} most intimate parts.`);
				reaction.trust -= 10;
				reaction.devotion -= 5;
				slave.energy += 1;
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new ClitoralEnlargement();
}


code:
{
	class ClitoralReduction extends App.Medicine.Surgery.Reaction {
		get key() { return "clitoral reduction"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} leaves the surgery with a terribly sore pussy and little desire to mess with it. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			} else if (slave.energy > 95) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He} is filled with joy at the thought that ${his} pussy will now be more appealing to ${his} ${getWrittenTitle(slave)}; ${his} sensitivity has been reduced, reducing ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected.`);
				reaction.trust += 4;
				reaction.devotion += 10;
				slave.energy -= 5;
			} else if (slave.devotion > 50) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s happy that you think ${his} pussy worth the effort of surgical improvement, although ${his} sensitivity has been reduced, reducing ${his} sex drive slightly. As with all surgery ${his} health has been slightly affected.`);
				reaction.devotion += 4;
				slave.energy -= 5;
			} else if (slave.devotion >= -20) {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s somewhat revolted by the surgery, but as far as ${he}'s concerned, the short recovery period will mean a time during which ${he} can be sure no one will use ${his} pussy. The reduced sensitivity has noticeably reduced ${his} sex drive. As with all surgery ${his} health has been slightly affected. ${He} is sensibly fearful of your total power over ${his} body.`);
				reaction.trust -= 5;
				slave.energy -= 10;
			} else {
				r.push(`${He} leaves the surgery with a terribly sore pussy. ${He}'s horrified at surgical alteration of ${his} womanhood; this is probably more of an invasion than ${he} could readily imagine before today and ${his} sex drive takes a heavy hit. As with all surgery ${his} health has been slightly affected. ${He} is terribly afraid of your total power over ${his} most intimate parts.`);
				reaction.trust -= 10;
				reaction.devotion -= 5;
				slave.energy -= 20;
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new ClitoralReduction();
}


code:
{
	class Ejaculation extends App.Medicine.Surgery.Reaction {
		get key() { return "ejaculation"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, His, his, him, himself} = getPronouns(slave);
			const r = [];

			r.push(`${His} groin is a little sore, and ${he} examines it closely, finding it slightly swollen. Near the end of ${his} close inspection of ${his} own private parts, though, ${he} happens to stimulate ${himself}, unintentionally, and just a little. That's enough. ${He} begins to leak excessive precum, as usual, but a distinct pressure begins building in ${his} loins. ${He} groans as the swelling rises before bucking and orgasming uncontrollably, coating ${himself} and the bed in a layer of fluid.`);
			if (this._hasEmotion(slave)) {
				if (slave.devotion > 50) {
					r.push(`${He}'s delighted. ${He}'s such a good sex slave that the lewdness of extra large ejaculations is exciting to ${him}. That, and the extra length of ${his} climax wasn't bad either.`);
					reaction.devotion += 4;
				} else if (slave.devotion >= -20) {
					r.push(`${He} obviously doesn't know what to think at first. Just brushing ${his} private parts resulted in a huge mess, a somewhat exciting prospect, but ${he}'s realizing that this is going to be rather inconvenient, if not moist. Still, having such a lewd change made to ${his} body affects ${his} feelings towards you; ${he} is sensibly fearful of your total power over ${him}.`);
					reaction.trust -= 5;
				} else {
					r.push(`${He} feared the worst when ${he} realized that something had been done to ${him} down there, and ${he}'s initially relieved to find that ${he}'s intact and apparently functional. But ${he}'s been invaded in an extremely personal way, and resents having you tamper with ${his} private parts. Furthermore, ${he} is sensibly fearful of your total power over ${him}.`);
					reaction.trust -= 5;
					reaction.devotion -= 5;
				}
			}
			r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Ejaculation();
}


code:
{
	class Electrolarynx extends App.Medicine.Surgery.Reaction {
		get key() { return "electrolarynx"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his, him} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`Before surgery, ${he} was warned repeatedly not to try talking for a while, but ${he} fails to recall that. ${He} doesn't notice any difference.`);
			} else if (slave.voice === 0) {
				if (slave.devotion > 50) {
					r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, so ${he} knows that ${his} voice has been restored. When you come in to check on ${him} late in the process, though, ${he} does ${his} best to communicate adoration with ${his}`);
					if (canSee(slave)) {
						r.push(`eyes`);
					} else {
						r.push(`face`);
					}
					r.push(`alone. Finally, the accelerated healing process reaches the time when ${he}'s to test ${his} new vocal organs. ${He}`);
					if (canSee(slave)) {
						r.push(`looks at`);
					} else {
						r.push(`turns to`);
					}
					r.push(`you shyly, and`);
					if (hasAnyArms(slave)) {
						r.push(`meekly beckons to you from where ${he}'s still`);
					} else {
						r.push(`meekly mouths a request that you come over to where ${he}'s`);
					}
					r.push(`restrained by the autosurgery. When you're near, ${he} clears ${his} sore throat gingerly and then whispers, "I love you, ${getWrittenTitle(slave)}." ${He} is far more trusting of your plans for ${him} in the future.`);

					reaction.trust += 5;
					reaction.devotion += 5;
				} else if (slave.devotion >= -20) {
					r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, so ${he} knows that ${his} voice has been restored. When you come in to check on ${him} late in the process, though, ${he} does ${his} best to communicate gratitude with ${his}`);
					if (canSee(slave)) {
						r.push(`eyes`);
					} else {
						r.push(`face`);
					}
					r.push(`alone. Finally, the accelerated healing process reaches the time when ${he}'s to test ${his} new vocal organs. ${He}`);
					if (canSee(slave)) {
						r.push(`looks at`);
					} else {
						r.push(`turns to`);
					}
					r.push(`you shyly, and hesitantly`);
					if (hasAnyArms(slave)) {
						r.push(`beckons to you from where ${he}'s still`);
					} else {
						r.push(`mouths a request that you come over to where ${he}'s`);
					}
					r.push(`restrained by the autosurgery. When you're near, ${he} clears ${his} sore throat gingerly and then whispers, "Thank you, ${getWrittenTitle(slave)}." ${He} has a much higher regard for you due to this display of care for ${him}.`);
					reaction.devotion += 10;
				} else {
					r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, so ${he} knows that ${his} voice has been restored. When you come in to check on ${him} late in the process, though, ${he}`);
					if (canSee(slave)) {
						r.push(`stares at`);
					} else {
						r.push(`faces`);
					}
					r.push(`you for a long moment before turning away from you, towards the wall, and beginning to cry quietly. It seems ${he}'s surprised that you would do this for ${him}, and does not understand how to deal with the situation. In any case, ${he} hates you far less than ${he} once did.`);
					reaction.devotion += 10;
				}
			} else {
				if (slave.devotion > 50) {
					r.push(`Before surgery, ${he} was warned repeatedly not to try talking for a while, and ${he} obeys. When ${he} finally does, ${his} voice is raspy and weak, but it gains strength gradually. While ${he} first believes nothing has changed,`);
					if (canHear(slave)) {
						r.push(`${he} soon notices a slight synthetic tone to ${his} voice and realizes ${he} has been given a mechanical larynx.`);
					} else {
						r.push(`the autosurgery informs ${him} in no uncertain terms that ${he} has implanted with a mechanical larynx.`);
					}
					r.push(`${He} is <span class="devotion inc">appreciative</span> of ${his} new implant, and knowing how much you invested in ${him} makes ${him} <span class="trust inc">trust you more</span> as well.`);
					reaction.devotion += 10;
					reaction.trust += 10;
				} else if (slave.devotion > 20) {
					r.push(`Before surgery, ${he} was warned repeatedly not to try talking for a while, and ${he} obeys. When ${he} finally does, ${his} voice is raspy and weak, but it gains strength gradually. While ${he} first believes nothing has changed,`);
					if (canHear(slave)) {
						r.push(`${he} soon notices a slight synthetic tone to ${his} voice and realizes ${he} has been given a mechanical larynx.`);
					} else {
						r.push(`the autosurgery informs ${him} in no uncertain terms that ${he} has implanted with a mechanical larynx.`);
					}
					r.push(`${He} has mixed feelings about this development, but ${he}'s aware how valuable such implants are, and ${he} already accepted that you have complete control over ${his} body.`);
					reaction.devotion += 5;
					reaction.trust += 10;
				} else {
					r.push(`Before surgery, ${he} was warned repeatedly not to try talking for a while, and ${he} obeys. When ${he} finally does, ${his} voice is raspy and weak, but it gains strength gradually. While ${he} first believes nothing has changed,`);
					if (canHear(slave)) {
						r.push(`${he} soon notices a slight synthetic tone to ${his} voice and realizes ${he} has been given a mechanical larynx.`);
					} else {
						r.push(`the autosurgery informs ${him} in no uncertain terms that ${he} has implanted with a mechanical larynx.`);
					}
					r.push(`${He} is <span class="trust dec">disturbed</span> that you replaced ${his} larynx with an artificial one and afraid of increased control over ${him} that such device grants.`);
					reaction.devotion -= 5;
				}
			}
			r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Electrolarynx();
}


code:
{
	class EndEjaculation extends App.Medicine.Surgery.Reaction {
		get key() { return "endejac"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, His, his} = getPronouns(slave);
			const r = [];

			r.push(`${His} groin is a little sore, and ${he} examines it closely, but ${he} can't find much difference other than the swelling in ${his} crotch has gone down. ${He}'ll realize later when ${his} next ejaculation is rather underwhelming from what ${he} has become accustomed to. As with all surgery ${his} health has been slightly affected.`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new EndEjaculation();
}


code:
{
	class EndPrecum extends App.Medicine.Surgery.Reaction {
		get key() { return "endprecum"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {he, His, his, him} = getPronouns(slave);
			const r = [];

			r.push(`${His} groin is a little sore, and ${he} examines it closely, but ${he} can't find much difference. ${His} generous production of precum won't tail off for some time, until the slow-release drugs are completely flushed from ${his} system. Even then, the only real change for ${him} will be a little less inconvenience. As with all surgery ${his} health has been slightly affected.`);

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new EndPrecum();
}


code:
{
	class Fang extends App.Medicine.Surgery.Reaction {
		get key() { return "fang"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his, him, himself} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw, yet fails to understand that ${his} teeth have changed shape. Since the surgery was moderately invasive, ${his} health has been somewhat affected.`);
			} else if (slave.devotion > 50) {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has a fang. ${He} seems doubtful,`);
				if (slave.lips <= 50) {
					r.push(`but then closes ${his} mouth and finds that it hangs cutely over ${his} lip. ${He} giggles at the absurdity of it.`);
				} else {
					r.push(`especially when he tries to close ${his} mouth only to find ${his} fat lip keeps meeting the tip of ${his} tooth.`);
				}
				r.push(`Since the surgery was moderately invasive, <span class="health dec">${his} health has been somewhat affected.</span>`);
			} else if (slave.devotion > 20) {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has a fang. ${He} gasps with shock, but eventually ${his} shoulders slump and ${he} tries to carry on. ${He} isn't much affected mentally. Since the surgery was moderately invasive, ${his} health has been somewhat affected.`);
			} else {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has a fang ${He} gasps with shock, accidentally gets ${his} lip in the way in ${his} anguish, bites ${himself}, and starts gagging and spitting blood. The surgical invasion has filled ${him} with horror and anger. Since the surgery was moderately invasive, ${his} health has been somewhat affected. ${He} is terribly afraid of your total power over ${his} body.`);
				reaction.trust -= 10;
				reaction.devotion -= 10;
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Fang();
}


code:
{
	class Fangs extends App.Medicine.Surgery.Reaction {
		get key() { return "fangs"; }

		reaction(slave, diff) {
			const reaction = super.reaction(slave, diff);
			const {He, he, his, him, himself} = getPronouns(slave);
			const r = [];

			if (slave.fetish === "mindbroken") {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw, yet fails to understand that ${his} teeth have changed shape. Since the surgery was moderately invasive, ${his} health has been somewhat affected.`);
			} else if (slave.devotion > 50) {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has a pair of fangs. ${He} seems doubtful, but then works up ${his} courage and bares them`);
				if (canSee(slave)) {
					r.push(`at a mirror.`);
				} else {
					r.push(`so you may see.`);
				}
				r.push(`${He} menaces`);
				if (canSee(slave)) {
					r.push(`${himself}`);
				}
				r.push(`for a while before laughing quietly. Since the surgery was moderately invasive, <span class="health dec">${his} health has been somewhat affected.</span>`);
			} else if (slave.devotion > 20) {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has teeth fit for a carnivore. ${He} gasps with shock, but eventually ${his} shoulders slump and ${he} tries to carry on. ${He} isn't much affected mentally. Since the surgery was moderately invasive, ${his} health has been somewhat affected.`);
			} else {
				r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. It takes a good while for ${him} to figure out what has happened, but eventually ${he} gets enough sensation in ${his} mouth to realize that ${he} now has a pair of fangs. ${He} gasps with shock, accidentally gets ${his} lip in the way in ${his} anguish, bites ${himself}, and starts gagging and spitting blood. The surgical invasion has filled ${him} with horror and anger. Since the surgery was moderately invasive, ${his} health has been somewhat affected. ${He} is terribly afraid of your total power over ${his} body.`);
				reaction.trust -= 10;
				reaction.devotion -= 10;
			}

			reaction.longReaction.push(r);
			return reaction;
		}
	}

	new Fangs();
}