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 === Job.MILKED || slave.assignment === Job.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());
	}
};

license: mit


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:
App.Medicine.Surgery.Reactions.BackInterface = class extends App.Medicine.Surgery.SimpleReaction {
	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;
	}
};

App.Medicine.Surgery.Procedures.BackInterface = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Implant back interface";
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.PBack = 1;
		this._slave.appendages = "none";
		this._slave.appendagesColor = "none";
		return this._assemble(new App.Medicine.Surgery.Reactions.BackInterface());
	}
};


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

		r.push(`When ${he} is carried out of surgery ${he}`);
		if (canSee(slave)) {
			r.push(`cranes ${his} neck to better see the ports`);
		} else {
			r.push(`wiggles ${his} stumps trying to feel the ports`);
		}
		r.push(`installed in ${his} stumps. Recovery will be significant, since the surgical implantation of anchor points for the limbs themselves and the installation of nerve impulse detectors constituted major surgery.`);
		if (this._hasEmotion(slave)) {
			if (slave.devotion > 20) {
				r.push(`Nevertheless, ${he}'s overwhelmed with gratitude, and thanks you profusely the first chance ${he} gets. ${He} follows the acclimation program diligently, doing ${his} best to learn how to be a good slave despite, or sometimes even because of, ${his} disability. ${He} places more trust in you, too, since you obviously have ${his} best interests at heart.`);
				reaction.devotion += 5;
				reaction.trust += 5;
			} else if (slave.devotion >= -20) {
				r.push(`${He}'s overwhelmed with gratitude, in part because ${he} didn't think you'd do something like this for ${him}. ${He} thanks you profusely the first chance ${he} gets, and follows the acclimation program diligently, trying to deserve the expense you went to. ${He} places more trust in you, too, since you seem to have a plan for ${him}.`);
				reaction.devotion += 5;
				reaction.trust += 5;
			} else {
				r.push(`Despite ${his} hatred of you, ${he} can't help but trust you a bit more, since you clearly have a plan that involves putting a good deal of value into ${him}. Your goals might not be ${hers}, but at least ${he} has an indication that you're not toying with ${him}.`);
				reaction.trust += 5;
			}
		}

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

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

		r.push(`When ${he} is carried out of surgery ${he}`);
		if (canSee(slave)) {
			r.push(`cranes ${his} neck to better see the ports`);
		} else {
			r.push(`wiggles ${his} stumps trying to feel the ports`);
		}
		r.push(`installed in ${his} stumps. ${His} stumps twitch slightly as the software begins configuring. Recovery will be significant, since the surgical implantation of anchor points for the limbs themselves and the installation of nerve bridges constituted major surgery.`);
		if (this._hasEmotion(slave)) {
			if (slave.devotion > 20) {
				r.push(`Nevertheless, ${he}'s overwhelmed with gratitude, and thanks you profusely the first chance ${he} gets. ${He} follows the acclimation program diligently, doing ${his} best to learn how to be a good slave despite, or sometimes even because of, ${his} disability. ${He} places more trust in you, too, since you obviously have ${his} best interests at heart.`);
				reaction.devotion += 5;
				reaction.trust += 5;
			} else if (slave.devotion >= -20) {
				r.push(`${He}'s overwhelmed with gratitude, in part because ${he} didn't think you'd do something like this for ${him}. ${He} thanks you profusely the first chance ${he} gets, and follows the acclimation program diligently, trying to deserve the expense you went to. ${He} places more trust in you, too, since you seem to have a plan for ${him}.`);
				reaction.devotion += 5;
				reaction.trust += 5;
			} else {
				r.push(`Despite ${his} hatred of you, ${he} can't help but trust you a bit more, since you clearly have a plan that involves putting a good deal of value into ${him}. Your goals might not be ${hers}, but at least ${he} has an indication that you're not toying with ${him}.`);
				reaction.trust += 5;
			}
		}

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

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

		r.push(`When ${he} is carried out of surgery ${he}`);
		if (canSee(slave)) {
			r.push(`cranes ${his} neck to better see the ports`);
		} else {
			r.push(`wiggles ${his} stumps trying to feel the ports`);
		}
		r.push(`installed in ${his} stumps. ${His} stumps twitch slightly as the software begins configuring. Since ${he} already had anchors installed in previous surgery this procedure was less invasive and thus ${his} health has been only slightly affected.`);
		if (slave.fetish !== "mindbroken" && slave.fuckdoll === 0) {
			if (slave.devotion > 20) {
				r.push(`${He} is overjoyed when ${he} finds out this upgrade will allow ${him} to feel with ${his} limbs again and thanks you profusely the first chance ${he} gets. ${He} places more trust in you, too, since you obviously have ${his} best interests at heart.`);
			} else if (slave.devotion >= -20) {
				r.push(`${He}'s overwhelmed with joy and gratitude, when ${he} finds out this upgrade will allow ${him} to feel with ${his} limbs again, in part because ${he} didn't think you'd do something like this for ${him}. ${He} thanks you profusely the first chance ${he} gets and is determined to prove ${himself} worthy of the expense you went to for ${him}. ${He} places more trust in you, too, since you seem to have a plan for ${him}.`);
			} else {
				r.push(`Despite ${his} hatred of you, ${he} can't help but feel some trust and gratitude, towards you, since you clearly have a plan that involves putting a good deal of value into ${him}. Your goals might not be ${hers}, but at least ${he} has an indication that you're not toying with ${him}.`);
			}
			reaction.devotion += 5;
			reaction.trust += 5;
		}

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

App.Medicine.Surgery.Reactions.PLimbInterface4 = 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(`When ${he} is carried out of surgery ${he}`);
		if (canSee(slave)) {
			r.push(`cranes ${his} neck to better see the ports`);
		} else {
			r.push(`wiggles ${his} stumps trying to feel the ports`);
		}
		r.push(`installed in ${his} stumps. ${His} stumps twitch slightly as the software begins configuring. Since ${he} already had anchors installed in previous surgery this procedure was less invasive and thus ${his} health has been only slightly affected.`);
		if (slave.fetish !== "mindbroken" && slave.fuckdoll === 0) {
			if (slave.devotion > 20) {
				r.push(`${He} trusts you enough to be not be put off by your explanation of what kind of prosthetic limbs will fit ${his} new interface. Thinking that maybe being a pet won't be so bad.`);
			} else if (slave.devotion >= -20) {
				r.push(`${He}'s <span class="devotion inc">apprehensive</span> when ${he} finds out this interface will make ${him} quadrupedal like a animal.`);
				reaction.devotion -= 5;
				reaction.trust -= 5;
			} else {
				r.push(`The flicker of gratefulness towards you is quickly replaced by hatred when ${he} finds out that this new interface will force her to walk like an animal. ${His} impression of you becomes worse now that ${he} knows that you plan to turn ${him} into a pet.`);
				reaction.devotion -= 25;
				reaction.trust -= 25;
			}
		}

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

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

		r.push(`When ${he} is carried out of surgery ${he}`);
		if (canSee(slave)) {
			r.push(`cranes ${his} neck to better see the ports`);
		} else {
			r.push(`wiggles ${his} stumps trying to feel the ports`);
		}
		r.push(`installed in ${his} stumps. Recovery will be significant, since the surgical implantation of anchor points for the limbs themselves and the installation of nerve impulse detectors constituted major surgery.`);
		if (this._hasEmotion(slave)) {
			if (slave.devotion > 20) {
				r.push(`Even after learning what kind of prosthetics will fit ${him}, ${he}'s still filled with gratitude, and thanks you the first chance ${he} gets. ${He} follows the acclimation program diligently, doing ${his} best to learn how to be a good pet for you. ${He} places more trust in you, too, since you gave ${him} the ability to move on ${his} own again.`);
				reaction.devotion += 5;
				reaction.trust += 5;
			} else if (slave.devotion >= -20) {
				r.push(`After learning what kind of prosthetics are awaiting ${him}, ${he}'s still relatively grateful to you, because ${he} didn't think ${he}'d ever move on ${his} own again. ${He} thanks you sincerely, and follows the acclimation program diligently, looking forward to being able to move on ${his} own again. ${He} places more trust in you, since you don't seem to have bad things planned for ${him}.`);
				reaction.trust += 5;
			} else {
				r.push(`The slight joy of being able to have limbs again is greatly dampened when ${he} learns what kind of limbs are awaiting ${him}, ${he}'s only comforted by the thought of being able to walk on ${his} own again. The already bad impression of you worsens, now that ${he} has feels like you're toying with ${him}.`);
				reaction.devotion -= 5;
				reaction.trust -= 5;
			}
		}

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

App.Medicine.Surgery.Procedures.BasicPLimbInterface = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Install basic prosthetic interface";
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.PLimb = 1;
		return this._assemble(new App.Medicine.Surgery.Reactions.PLimbInterface1());
	}
};

App.Medicine.Surgery.Procedures.AdvancedPLimbInterface = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this.originalSlave.PLimb === 0) {
			return "Install advanced prosthetic interface";
		} else if (this.originalSlave.PLimb === 1) {
			return "Upgrade to advanced prosthetic interface";
		} else {
			return "Downgrade to advanced prosthetic interface";
		}
	}

	get disabledReasons() {
		const r = super.disabledReasons;
		const {He} = getPronouns(this.originalSlave);
		if (this.originalSlave.PLimb === 3 && hasAnyProstheticLimbs(this.originalSlave)) {
			r.push(`${He} still has limbs attached. Remove all limbs before downgrading.`);
		}
		return r;
	}

	get healthCost() {
		return this.originalSlave.PLimb === 0 ? 20 : 10;
	}

	apply(cheat) {
		this._slave.PLimb = 2;

		if (this.originalSlave.PLimb === 0) {
			return this._assemble(new App.Medicine.Surgery.Reactions.PLimbInterface2());
		} else {
			return this._assemble(new App.Medicine.Surgery.Reactions.PLimbInterface3());
		}
	}
};

App.Medicine.Surgery.Procedures.QuadrupedalPLimbInterface = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this.originalSlave.PLimb === 0) {
			return "Install quadrupedal prosthetic interface";
		} else {
			return "Upgrade to quadrupedal prosthetic interface";
		}
	}

	get disabledReasons() {
		const r = super.disabledReasons;
		const {He} = getPronouns(this.originalSlave);
		if ((this.originalSlave.PLimb === 1 || this.originalSlave.PLimb === 2) && hasAnyProstheticLimbs(this.originalSlave)) {
			r.push(`${He} still has limbs attached. Remove all limbs before upgrading.`);
		}
		return r;
	}

	get healthCost() {
		return this.originalSlave.PLimb === 0 ? 20 : 10;
	}

	apply(cheat) {
		this._slave.PLimb = 3;
		if (this.originalSlave.PLimb === 0) {
			return this._assemble(new App.Medicine.Surgery.Reactions.PLimbInterface5());
		} else {
			return this._assemble(new App.Medicine.Surgery.Reactions.PLimbInterface4());
		}
	}
};


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

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

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

App.Medicine.Surgery.Procedures.TailInterface = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Implant interface";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.PTail = 1;
		this._slave.tail = "none";
		this._slave.tailColor = "none";
		return this._assemble(new App.Medicine.Surgery.Reactions.TailInterface());
	}
};


code:
App.Medicine.Surgery.Reactions.Amputate = class extends App.Medicine.Surgery.SimpleReaction {
	/**
	 * @param {FC.LimbsState} newLimbs
	 */
	constructor(newLimbs) {
		super();
		this.newLimbs = newLimbs;
	}

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

		// TODO: add missing cases, improve descriptions

		if (isAmputee(this.newLimbs)) {
			if (slave.fetish === "mindbroken") {
				r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. ${He} squirms the entire time, trying to move the arms and legs ${he} now lacks. Since the surgery was invasive, ${his} health has been greatly affected.`);
			} else if (slave.devotion > 50) {
				r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. ${He} knows what a slave's life is, but ${he} did not really expect that it would ever come to this for ${him}. After a long, silent`);
				if (canSee(slave)) {
					r.push(`stare at`);
				} else {
					r.push(`consideration of`);
				}
				r.push(`${his} limbless torso, ${he} squares ${his} shoulders and visibly resolves to carry on being a good slave as best ${he} can. Since the surgery was invasive, ${his} health has been greatly affected.`);
			} else if (slave.devotion > 20) {
				r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. Despite ${his} obedience, ${he} cries softly the whole time, shoulder and hip stumps moving occasionally as ${he} reflexively tries to stand — to walk — to touch ${himself} — to gesture — all things that ${he} will never do again. ${He} will struggle greatly with ${his} medically created disability. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is cripplingly afraid of your total power over ${his} body.`);
				reaction.trust -= 20;
				reaction.devotion -= 20;
			} else {
				r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. You had a good idea what ${his} reaction would be, so`);
				if (slave.teeth === "removable") {
					r.push(`you removed ${his} teeth`);
				} else {
					r.push(`${he}'s muzzled`);
				}
				r.push(`to prevent ${him} from trying to bite. ${He} sobs convulsively, and ${his}`);
				if (canSee(slave)) {
					r.push(`eyes dart desperately from side to side through ${his} tears, hopelessly imploring the mirror to show ${him} something other than this.`);
				} else {
					r.push(`stumps twitch pathetically with ${his} desperate efforts to move ${his} limbs, to prove there is something other than this.`);
				}
				r.push(`Anything other than this. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is terrified to the point of insanity of your total power over ${his} body.`);
				reaction.trust -= 50;
				reaction.devotion -= 50;
			}
		} else {
			if (hasBothLegs(this.newLimbs)) {
				if (hasBothArms(slave) && !hasAnyArms(this.newLimbs)) {
					// both arms removed
					if (!this._hasEmotion(slave)) {
						r.push(`You're there to open the door for ${him} as ${he} exits the surgery. ${He} smiles dumbly at your generosity, already seeming to forget the sensation of touching. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 50) {
						r.push(`You're there to open the door for ${him} as ${he} exits the surgery. ${He} knows what a slave's life is, but ${he} did not really expect that it would ever come to this for ${him}. After a short, silent`);
						if (canSee(slave)) {
							r.push(`stare at`);
						} else {
							r.push(`consideration of`);
						}
						r.push(`the two stumps that were once ${his} arms, ${he} squares ${his} shoulders and resolves to carry on being a good slave as best ${he} can. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 20) {
						r.push(`You're there to open the door for ${him} as ${he} exits the surgery. Despite ${his} obedience, ${he} cries softly the whole time, ${his} shoulder stumps occasionally moving as ${he} reflexively tries to grab at ${himself} and ${his} surroundings. ${He} will struggle greatly with ${his} medically created disability. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is extremely afraid of your total power over ${his} body.`);
						reaction.trust -= 15;
						reaction.devotion -= 15;
					} else {
						r.push(`You're there to open the door for ${him} as ${he} exits the surgery. You had a good idea what ${his} reaction would be, so you've made sure to bind ${his} ${(hasBothLegs(slave)) ? `legs` : `leg`} to prevent ${him} from trying to attack you, and`);
						if (slave.teeth === "removable") {
							r.push(`remove ${his} teeth`);
						} else {
							r.push(`muzzle ${him}`);
						}
						r.push(`to prevent ${him} from trying to bite. ${He} sobs convulsively, and ${his}`);
						if (canSee(slave)) {
							r.push(`eyes dart desperately from side to side through ${his} tears, hopelessly imploring the mirror to show ${him} something other than this.`);
						} else {
							r.push(`shoulder stumps twitch pathetically with ${his} desperate efforts to move ${his} arms, to prove there is something other than this.`);
						}
						r.push(`Anything other than this. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is utterly and entirely terrified of your total power over ${his} body.`);
						reaction.trust -= 40;
						reaction.devotion -= 40;
					}
				} else {
					// 1 arm removed
					if (!this._hasEmotion(slave)) {
						r.push(`You're there to help ${him} with the door as ${he} exits the surgery. ${He} smiles dumbly at your generosity, already seeming to forget ${he} ever had another arm. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 50) {
						r.push(`You're there to help ${him} with the door as ${he} exits the surgery. ${He} knows what a slave's life is, but ${he} did not really expect that it would ever come to this for ${him}. After a short, silent`);
						if (canSee(slave)) {
							r.push(`stare at`);
						} else {
							r.push(`consideration of`);
						}
						r.push(`the stump that was once ${his} arm, ${he} squares ${his} shoulders and resolves to carry on being a good slave as best ${he} can. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 20) {
						r.push(`You're there to help ${him} with the door as ${he} exits the surgery. Despite ${his} obedience, ${he} cries softly the whole time, the stump at ${his} shoulder occasionally moving as ${he} reflexively tries to grab at ${himself} and ${his} surroundings. ${He} will struggle greatly with ${his} medically created disability. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is immensely afraid of your total power over ${his} body.`);
						reaction.trust -= 8;
						reaction.devotion -= 8;
					} else {
						r.push(`You're there to help ${him} with the door as ${he} exits the surgery. You had a good idea what ${his} reaction would be, so you've made sure to bind ${his} other arm`);
						if (hasAnyLegs(slave)) {
							r.push(`and ${his} ${(hasBothLegs(slave)) ? `legs` : `leg`}`);
						}
						r.push(`to prevent ${him} from trying to attack you, and`);
						if (slave.teeth === "removable") {
							r.push(`remove ${his} teeth`);
						} else {
							r.push(`muzzle ${him}`);
						}
						r.push(`to prevent ${him} from trying to bite. ${He} sobs convulsively, and ${his}`);
						if (canSee(slave)) {
							r.push(`eyes dart desperately from side to side through ${his} tears, hopelessly imploring the mirror to show ${him} something other than this.`);
						} else {
							r.push(`shoulder stump twitches pathetically with ${his} desperate efforts to move ${his} missing arm, to prove there is something other than this.`);
						}
						r.push(`Anything other than this. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is incredibly and intensely terrified of your total power over ${his} body.`);
						reaction.trust -= 20;
						reaction.devotion -= 20;
					}
				}
			} else {
				if (hasAnyLegs(this.newLimbs)) {
					if (slave.fetish === "mindbroken") {
						r.push(`Of course, ${he} could not walk out of the surgery by ${himself}; you had to walk alongside ${him}. ${He} leans into you the entire time, already seeming to forget ${he} ever had another leg. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 50) {
						r.push(`Of course, ${he} could not walk out of the surgery by ${himself}; you had to walk alongside ${him}. ${He} knows what a slave's life is, but ${he} did not really expect that it would involve this. After a brief, silent`);
						if (canSee(slave)) {
							r.push(`stare at`);
						} else {
							r.push(`consideration of`);
						}
						r.push(`the stump that was once ${his} leg, ${he} squares ${his} shoulders and resolves to carry on being a good slave as best ${he} can. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 20) {
						r.push(`Of course, ${he} could not walk out of the surgery by ${himself}; you had to walk alongside ${him}. Despite ${his} obedience, ${he} cries softly the whole time, the stump at ${his} hip occasionally moving as ${he} reflexively tries to use it somehow. ${He} will struggle greatly with ${his} medically created disability. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is immensely afraid of your total power over ${his} body.`);
						reaction.trust -= 5;
						reaction.devotion -= 5;
					} else {
						r.push(`Of course, ${he} could not walk out of the surgery by ${himself}; you had to carry ${him}. You had a good idea what ${his} reaction would be, so you've made sure to bind ${his} other leg`);
						if (hasAnyArms(slave)) {
							r.push(`and ${his} ${(hasBothArms(slave)) ? `arms` : `arm`}`);
						}
						r.push(`to prevent ${him} from trying to attack you, and`);
						if (slave.teeth === "removable") {
							r.push(`remove ${his} teeth`);
						} else {
							r.push(`muzzle ${him}`);
						}
						r.push(`to prevent ${him} from trying to bite. ${He} sobs convulsively, and ${his}`);
						if (canSee(slave)) {
							r.push(`eyes dart desperately from side to side through ${his} tears, hopelessly imploring the mirror to show ${him} something other than this.`);
						} else {
							r.push(`leg stump twitches pathetically with ${his} desperate efforts to move ${his} missing leg, to prove there is something other than this.`);
						}
						r.push(`Anything other than this. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is incredibly and intensely terrified of your total power over ${his} body.`);
						reaction.trust -= 15;
						reaction.devotion -= 15;
					}
				} else {
					if (slave.fetish === "mindbroken") {
						r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. ${He} holds onto you the entire time, already seeming to forget the sensation of walking. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 50) {
						r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. ${He} knows what a slave's life is, but ${he} did not really expect that it would involve this. After a brief, silent`);
						if (canSee(slave)) {
							r.push(`stare at`);
						} else {
							r.push(`consideration of`);
						}
						r.push(`the two stumps that were once ${his} legs, ${he} squares ${his} shoulders and resolves to carry on being a good slave as best ${he} can. Since the surgery was invasive, ${his} health has been greatly affected.`);
					} else if (slave.devotion > 20) {
						r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. Despite ${his} obedience, ${he} cries softly the whole time, ${his} hip stumps occasionally moving as ${he} reflexively tries to stand up and walk around. ${He} will struggle greatly with ${his} medically created disability. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is extremely afraid of your total power over ${his} body.`);
						reaction.trust -= 10;
						reaction.devotion -= 10;
					} else {
						r.push(`Of course, ${he} could not walk out of the surgery; you carried ${him}. You had a good idea what ${his} reaction would be, so you've made sure to bind ${his} ${(hasBothArms(slave)) ? `arms` : `arm`} to prevent ${him} from trying to attack you, and`);
						if (slave.teeth === "removable") {
							r.push(`remove ${his} teeth`);
						} else {
							r.push(`muzzle ${him}`);
						}
						r.push(`to prevent ${him} from trying to bite. ${He} sobs convulsively, and ${his}`);
						if (canSee(slave)) {
							r.push(`eyes dart desperately from side to side through ${his} tears, hopelessly imploring the mirror to show ${him} something other than this.`);
						} else {
							r.push(`hip stumps twitch pathetically with ${his} desperate efforts to move ${his} legs, to prove there is something other than this.`);
						}
						r.push(`Anything other than this. The surgical invasion has filled ${him} with horror and anger. Since the surgery was invasive, ${his} health has been greatly affected. ${He} is utterly and entirely terrified of your total power over ${his} body.`);
						reaction.trust -= 30;
						reaction.devotion -= 30;
					}
				}
			}
		}
		reaction.longReaction.push(r);

		if (slave.PLimb > 0) {
			// The player can install prosthetic interfaces even when the slave has some natural limbs left. After
			// amputating they appear magically on the other limbs. Give a lore explanation for it.
			r = [];
			const newlyAmputated = getLimbCount(this.newLimbs) - getLimbCount(slave);
			r.push(`While amputating ${his} limb${newlyAmputated > 1 ? "s" : ""}, you also install`);
			if (newlyAmputated === 1) {
				r.push(`a prosthetic interface`);
			} else {
				r.push(`prosthetic interfaces`);
			}
			r.push(`into ${his} new stump${newlyAmputated > 1 ? "s" : ""}.`);

			reaction.longReaction.push(r);
		}

		return reaction;
	}

	outro(slave, diff, previousReaction) {
		const reaction = super.outro(slave, diff, 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;
	}
};

App.Medicine.Surgery.Procedures.Amputate = class extends App.Medicine.Surgery.Procedure {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @param {boolean} leftArm
	 * @param {boolean} rightArm
	 * @param {boolean} leftLeg
	 * @param {boolean} rightLeg
	 */
	constructor(slave, leftArm, rightArm, leftLeg, rightLeg) {
		super(slave);
		this.leftArm = leftArm;
		this.rightArm = rightArm;
		this.leftLeg = leftLeg;
		this.rightLeg = rightLeg;
		this.count = (leftArm ? 1 : 0) + (rightArm ? 1 : 0) + (leftLeg ? 1 : 0) + (rightLeg ? 1 : 0);
	}

	get name() {
		if (this.count === 0) {
			return "Amputate limb(s)";
		} else if (this.count === 1) {
			return "Amputate limb";
		} else {
			return "Amputate limbs";
		}
	}

	get description() {
		const {him} = getPronouns(this.originalSlave);
		return `this will greatly restrict ${him}`;
	}

	get disabledReasons() {
		const reasons = super.disabledReasons;
		if (this.count === 0) {
			reasons.push("No limb selected");
		}
		return reasons;
	}

	get healthCost() {
		return this.count * 10;
	}

	get _workCost() {
		return super._workCost * this.count;
	}

	apply(cheat) {
		if (this.leftArm) {
			removeLimbs(this._slave, "left arm");
		}
		if (this.rightArm) {
			removeLimbs(this._slave, "right arm");
		}
		if (this.leftLeg) {
			removeLimbs(this._slave, "left leg");
		}
		if (this.rightLeg) {
			removeLimbs(this._slave, "right leg");
		}

		if (!hasAnyArms(this._slave)) {
			this._slave.rules.release.masturbation = 0;
		}

		const newLimbs = App.Medicine.Limbs.currentLimbs(this._slave);

		return this._assemble(new App.Medicine.Surgery.Reactions.Amputate(newLimbs));
	}
};


code:
App.Medicine.Surgery.Reactions.ShortenTendons = 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 = [];

		if (slave.fetish === "mindbroken") {
			r.push(`${He} exits the surgery on all fours, unable to stand due to the changes to ${his} legs. A whorish pair of heels are slipped onto ${him} and ${he} is forced to ${his} feet to show that ${he} can indeed walk comfortably while wearing them. As with all surgery ${his} health has been slightly affected.`);
		} else if (slave.devotion > 50) {
			r.push(`${He} exits the surgery on all fours, unable to stand due to the changes to ${his} legs. ${He} finds a whorish pair of heels waiting for ${him} and eagerly puts them on, gingerly standing to find that ${he} can indeed walk comfortably while wearing them. ${He} struts back and forth experimentally and then offers`);
			if (canSee(slave)) {
				r.push(`the mirror`);
			} else {
				r.push(`you`);
			}
			r.push(`${his} asshole to check to see that ${his} ability to take a standing buttfuck hasn't been affected. ${He} has become more submissive due to your radical reshaping of ${his} body. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 20) {
			r.push(`${He} exits the surgery on all fours, unable to stand due to the changes to ${his} legs. ${He} finds a whorish pair of heels waiting for ${him} and obediently puts them on, gingerly standing to find that ${he} can indeed walk comfortably while wearing them. After a while ${he} realizes that ${he}'ll never walk without looking like a stripper again, but ${he} accepts it. ${He} isn't much affected mentally. As with all surgery ${his} health has been slightly affected.`);
		} else {
			r.push(`${He} exits the surgery on all fours, unable to stand due to the changes to ${his} legs. ${He} finds a whorish pair of heels waiting for ${him}, but obstinately ignores them. After some time, ${he} realizes that the situation isn't changing and puts them on, gingerly standing to find that ${he} can indeed walk comfortably while wearing them. ${His}`);
			if (canSee(slave)) {
				r.push(`eyes are`);
			} else {
				r.push(`face is`);
			}
			r.push(`filled with hatred when ${he}`);
			if (canSee(slave)) {
				r.push(`sees ${his} new and permanent appearance in the mirror.`);
			} else {
				r.push(`discovers this is the only way ${he}'ll be able to stand now.`);
			}
			r.push(`The surgical invasion has filled ${him} with horror and anger. 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 -= 10;
		}

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

App.Medicine.Surgery.Reactions.ReplaceTendons = class extends App.Medicine.Surgery.SimpleReaction {
	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} exits the surgery on ${his} own two feet. ${He}'s still sore, but the modern surgery is fast and effective, and ${he} can use ${his} restored legs immediately. ${He} gingerly stands on one foot, then the other; and even takes a few little hops. ${He} obviously confused, but will get used to it soon enough. As with all surgery ${his} health has been slightly affected.`);
		} else if (slave.devotion >= -20) {
			r.push(`${He} exits the surgery on ${his} own two feet. ${He}'s still sore, but the modern surgery is fast and effective, and ${he} can use ${his} restored legs immediately. ${He} gingerly stands on one foot, then the other; and even takes a few little hops. ${He}'s grinning like a fool the whole time. ${He} has become more obedient due to gratitude. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
		} else {
			r.push(`${He} exits the surgery on ${his} own two feet. ${He}'s still sore, but the modern surgery is fast and effective, and ${he} can use ${his} restored legs immediately. ${He} gingerly stands on one foot, then the other; and even takes a few little hops. ${He} obviously confused, finding it surprising that you would go to the expense and trouble of repairing ${him}. As with all surgery ${his} health has been slightly affected.`);
		}

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

App.Medicine.Surgery.Procedures.ShortenTendons = class extends App.Medicine.Surgery.Procedure {
	get name() { return "Shorten tendons"; }

	get description() {
		const {him} = getPronouns(this._slave);
		return `Prevents ${him} from walking in anything but very high heels`;
	}

	get healthCost() { return 20; }

	apply(cheat) {
		this._slave.heels = 1;
		this._slave.shoes = "heels";
		return this._assemble(new App.Medicine.Surgery.Reactions.ShortenTendons());
	}
};

App.Medicine.Surgery.Procedures.ReplaceTendons = class extends App.Medicine.Surgery.Procedure {
	get name() { return "Replace tendons"; }

	get healthCost() { return 10; }

	apply(cheat) {
		this._slave.heels = 0;
		this._slave.shoes = "none";
		return this._assemble(new App.Medicine.Surgery.Reactions.ReplaceTendons());
	}
};


code:
App.Medicine.Surgery.Reactions.Height = class extends App.Medicine.Surgery.SimpleReaction {
	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} exits the surgery very slowly, since ${he}'s terribly sore and isn't yet used to the novel lengths of the legs ${he} walks on. ${He}'ll be clumsy for some time. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else if (slave.devotion > 50) {
			r.push(`${He} exits the surgery very cautiously, since ${he}'s terribly sore and isn't yet used to the novel lengths of the legs ${he} walks on. ${He}'ll be clumsy and hesitant for some time, but ${he}'s happy with ${his} new body. ${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} exits the surgery very cautiously, since ${he}'s terribly sore and isn't yet used to the novel lengths of the legs ${he} walks on. ${He}'ll be clumsy and hesitant for some time, but ${he}'s accepted ${his} new body. ${He} isn't much affected mentally. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else {
			r.push(`${He} exits the surgery very cautiously, since ${he}'s terribly sore and isn't yet used to the novel lengths of the legs ${he} walks on. ${He}'ll be clumsy and hesitant for some time, and ${he} refuses to accept that this new body is really what ${he}'s been condemned to. 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.IncreaseHeight = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this._slave.heightImplant === 0) {
			return "Lengthen major bones";
		} else if (this._slave.heightImplant >= 1) {
			return "Advanced height gain surgery";
		} else if (this._slave.heightImplant === -1) {
			return "Reverse existing height surgery";
		} else {
			return "Revert a stage of existing height surgery";
		}
	}

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.heightImplant += 1;
		this._slave.height += 10;
		return this._assemble(new App.Medicine.Surgery.Reactions.ShortenTendons());
	}
};

App.Medicine.Surgery.Procedures.DecreaseHeight = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this._slave.heightImplant === 0) {
			return "Shorten major bones";
		} else if (this._slave.heightImplant <= -1) {
			return "Advanced height reduction surgery";
		} else if (this._slave.heightImplant === 1) {
			return "Reverse existing height surgery";
		} else {
			return "Revert a stage of existing height surgery";
		}
	}

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.heightImplant -= 1;
		this._slave.height -= 10;
		return this._assemble(new App.Medicine.Surgery.Reactions.ShortenTendons());
	}
};


code:
App.Medicine.Surgery.Reactions.Hips = class extends App.Medicine.Surgery.SimpleReaction {
	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} exits the surgery very slowly, since ${he}'s still in considerable pain and isn't yet used to the way ${his} pelvis now fits together with the rest of ${his} body. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else if (slave.devotion > 50) {
			r.push(`${He} exits the surgery very cautiously, since ${he}'s still in considerable pain and isn't yet used to the way ${his} pelvis now fits together with the rest of ${his} body. ${He}'ll be clumsy and hesitant for some time, but ${he}'s happy with ${his} new hips. ${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} exits the surgery very cautiously, since ${he}'s still in considerable pain and isn't yet used to the way ${his} pelvis now fits together with the rest of ${his} body. ${He}'ll be clumsy and hesitant for some time, but ${he}'s accepted ${his} new hips. ${He} isn't much affected mentally. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else {
			r.push(`${He} exits the surgery very cautiously, since ${he}'s still in considerable pain and isn't yet used to the way ${his} pelvis now fits together with the rest of ${his} body. ${He}'ll be clumsy and hesitant for some time, and ${he} refuses to accept that you are both willing and able to reshape ${him} down to ${his} very bones. 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.BroadenPelvis = class extends App.Medicine.Surgery.Procedure {
	get name() { return this._slave.shouldersImplant === 0 ? "Broaden pelvis" : "Advanced pelvis broadening"; }

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.hipsImplant++;
		this._slave.hips++;
		return this._assemble(new App.Medicine.Surgery.Reactions.Hips());
	}
};

App.Medicine.Surgery.Procedures.NarrowPelvis = class extends App.Medicine.Surgery.Procedure {
	get name() { return this._slave.shouldersImplant === 0 ? "Narrow pelvis" : "Advanced pelvis narrowing"; }

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.hipsImplant--;
		this._slave.hips--;
		return this._assemble(new App.Medicine.Surgery.Reactions.Hips());
	}
};


code:
App.Medicine.Surgery.Reactions.Shoulders = class extends App.Medicine.Surgery.SimpleReaction {
	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} exits the surgery gingerly, since the changes of proportion in ${his} upper body have seriously affected ${his} sense of balance. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else if (slave.devotion > 50) {
			r.push(`${He} exits the surgery gingerly, since the changes of proportion in ${his} upper body have seriously affected ${his} sense of balance, albeit temporarily. ${He}'ll be clumsy and hesitant for some time, but ${he}'s happy with ${his} new shoulders. ${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} exits the surgery gingerly, since the changes of proportion in ${his} upper body have seriously affected ${his} sense of balance, albeit temporarily. ${He}'ll be clumsy and hesitant for some time, but ${he}'s accepted ${his} new shoulders. ${He} isn't much affected mentally. Since the surgery was invasive, ${his} health has been greatly affected.`);
		} else {
			r.push(`${He} exits the surgery gingerly, since the changes of proportion in ${his} upper body have seriously affected ${his} sense of balance, albeit temporarily. ${He}'ll be clumsy and hesitant for some time, and ${he} refuses to accept that you are both willing and able to reshape ${him} down to ${his} very bones. 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.BroadenShoulders = class extends App.Medicine.Surgery.Procedure {
	get name() { return this._slave.shouldersImplant === 0 ? "Restructure shoulders more broadly" : "Advanced shoulder broadening surgery"; }

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.shouldersImplant++;
		this._slave.shoulders++;
		return this._assemble(new App.Medicine.Surgery.Reactions.Shoulders());
	}
};

App.Medicine.Surgery.Procedures.NarrowShoulders = class extends App.Medicine.Surgery.Procedure {
	get name() { return this._slave.shouldersImplant === 0 ? "Restructure shoulders more narrowly" : "Advanced shoulder narrowing surgery"; }

	get healthCost() { return 40; }

	apply(cheat) {
		this._slave.shouldersImplant--;
		this._slave.shoulders--;
		return this._assemble(new App.Medicine.Surgery.Reactions.Shoulders());
	}
};


code:
App.Medicine.Surgery.Reactions.Braces = class extends App.Medicine.Surgery.SimpleReaction {
	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;
	}
};

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

	get permanentChanges() {
		return false;
	}

	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} is quite quick to realize ${his} teeth are missing something.`);
		} else {
			r.push(`Quite aware that ${his} teeth are now free of ${his} braces,`);
			if (slave.devotion > 50) {
				r.push(`${he} smiles tentatively`);
				if (canSee(slave)) {
					r.push(`at ${himself} in the mirror`);
				} else {
					r.push(`and runs ${his} tongue across ${his} teeth`);
				}
				r.push(`only to find they are as crooked as ever. ${He} immediately shuts ${his} mouth, ${his} opinion of you souring, and carries on as if you had never put them on ${him} in the first place.`);
				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(`only to find they are as crooked as ever. ${He} immediately shuts ${his} mouth, ${his} opinion of you souring, and carries on as if you had never put them on ${him} in the first place.`);
				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} knows that straightening teeth is expensive and sighs, feeling that ${he}'s not worth the expense. No matter what ${he} thought of you, ${he} felt ${he} would at least benefit from having nice teeth, and now it's clear to ${him}: You don't care.`);
				reaction.devotion -= 5;
				reaction.trust -= 5;
			}
		}
		r.push(`Though unpleasant, orthodontia isn't particularly harmful; ${his} health is unaffected.`);

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

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

	get permanentChanges() {
		return false;
	}

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

		if (slave.fetish === "mindbroken") {
			r.push(`${He} is quite quick to realize ${his} teeth are missing something.`);
		} else {
			r.push(`Quite aware that ${his} teeth are now free of ${his} braces,`);
			if (slave.devotion > 50) {
				r.push(`${he} smiles tentatively`);
			} else {
				r.push(`${he} pulls ${his} lips back to`);
			}
			if (canSee(slave)) {
				r.push(`check them out`);
			} else {
				r.push(`feel them`);
			}
			r.push(`and finds they are now back to normal.`);
		}
		r.push(`Though unpleasant, orthodontia isn't particularly harmful; ${his} health is unaffected.`);

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

App.Medicine.Surgery.Procedures.ApplyBraces = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Apply braces";
	}

	apply(cheat) {
		this._slave.teeth = "straightening braces";
		return this._assemble(new App.Medicine.Surgery.Reactions.Braces());
	}
};

App.Medicine.Surgery.Procedures.RemoveBraces = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Remove braces";
	}

	apply(cheat) {
		this._slave.teeth = "crooked";
		return this._assemble(new App.Medicine.Surgery.Reactions.RemoveBraces());
	}
};

App.Medicine.Surgery.Procedures.AddCosmeticBraces = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Unnecessary braces";
	}

	apply(cheat) {
		this._slave.teeth = "cosmetic braces";
		return this._assemble(new App.Medicine.Surgery.Reactions.RemoveCosmeticBraces());
	}
};

App.Medicine.Surgery.Procedures.RemoveCosmeticBraces = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Remove braces";
	}

	apply(cheat) {
		this._slave.teeth = "normal";
		return this._assemble(new App.Medicine.Surgery.Reactions.RemoveCosmeticBraces());
	}
};


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

		r.push(`${He} clearly feels quite normal except for a vague ache around ${his} jaw. ${He}`);
		if (canSee(slave)) {
			r.push(`checks ${himself} in the mirror`);
		} else {
			r.push(`runs ${his} tongue over ${his} teeth`);
		}
		r.push(`repeatedly before accepting that nothing too unusual has happened, and that ${he} now appears to have a fully functional set of normal teeth. Though ${he}'s surprised that nothing outlandish has been done, ${he} carries on as usual. Since the surgery was moderately invasive, ${his} health has been somewhat affected.`);

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

App.Medicine.Surgery.Procedures.DentalImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Normal dental implants";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.teeth = "normal";
		return this._assemble(new App.Medicine.Surgery.Reactions.DentalImplant());
	}
};


code:
App.Medicine.Surgery.Reactions.FangImplant = 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} 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;
	}
};

App.Medicine.Surgery.Procedures.FangImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this.originalSlave.teeth === "fangs") {
			return "Remove a fang";
		} else {
			return "Add a fang";
		}
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.teeth = "fang";
		return this._assemble(new App.Medicine.Surgery.Reactions.FangImplant());
	}
};


code:
App.Medicine.Surgery.Reactions.FangsImplant = 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} 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;
	}
};

App.Medicine.Surgery.Procedures.FangsImplant = class extends App.Medicine.Surgery.Procedure {
	get name() {
		if (this.originalSlave.teeth === "fang") {
			return "Add another fang";
		} else {
			return "Replace them with fangs";
		}
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.teeth = "fangs";
		return this._assemble(new App.Medicine.Surgery.Reactions.FangsImplant());
	}
};


code:
App.Medicine.Surgery.Reactions.SharpTeeth = 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} 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 invasive, ${his} health has been greatly 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 teeth fit for a carnivore. ${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. ${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} 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 invasive, ${his} health has been greatly 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 teeth fit for a carnivore. ${He} gasps with shock, accidentally gets ${his} tongue 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 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.SharpTeeth = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Replace them with sharp teeth";
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.teeth = "pointy";
		return this._assemble(new App.Medicine.Surgery.Reactions.SharpTeeth());
	}
};


code:
App.Medicine.Surgery.Reactions.Teeth = 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} clearly feels quite normal except for a vague ache around ${his} jaw, yet fails to understand ${his} teeth are now fake. Since the surgery was invasive, ${his} health has been greatly 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} is wearing prosthetic teeth that ${he} can remove. ${He} gasps with shock, but figures out the idea quickly enough by experimentally`);
			if (hasAnyArms(slave)) {
				r.push(`sucking on two fingers.`);
			} else {
				r.push(`simulating oral sex with ${his} own tongue.`);
			}
			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} 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} is wearing prosthetic teeth that ${he} can remove. ${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} 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} is wearing prosthetic teeth that ${he} can remove. ${He} gasps with shock, gags, spits out the prosthetics,`);
			if (canSee(slave)) {
				r.push(`looks at ${himself} in the mirror,`);
			} else {
				r.push(`runs ${his} tongue across ${his} empty gums,`);
			}
			r.push(`and 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.RemovableTeeth = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Replace them with removable prosthetics";
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.teeth = "removable";
		return this._assemble(new App.Medicine.Surgery.Reactions.Teeth());
	}
};


code:
App.Medicine.Surgery.Reactions.Electrolarynx = class extends App.Medicine.Surgery.SimpleReaction {
	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;
	}
};

App.Medicine.Surgery.Procedures.Electrolarynx = class extends App.Medicine.Surgery.Procedure {
	get name() {
		const {him} = getPronouns(this.originalSlave);
		return `Give ${him} an electrolarynx`;
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.electrolarynx = 1;
		this._slave.voice = 2;
		return this._assemble(new App.Medicine.Surgery.Reactions.Electrolarynx());
	}
};


code:
App.Medicine.Surgery.Reactions.Mute = 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} clearly feels quite normal except for a vague ache around ${his} larynx. It takes a good while for ${him} to figure out what has happened, but eventually ${he} tries to speak and makes no sound. ${He} simply keeps trying for some time before accepting this is how things are. As with all surgery ${his} health has been slightly affected.`);
		} else if (slave.devotion > 50) {
			r.push(`${He} clearly feels quite normal except for a vague ache around ${his} larynx. It takes a good while for ${him} to figure out what has happened, but eventually ${he} tries to speak and makes no sound. ${He} panics, but manages to control ${himself} at length and begins to think.`);
			if (canSee(slave)) {
				r.push(`Seeing`);
			} else {
				r.push(`Finding`);
			}
			r.push(`you, ${he} tries to ask you for instruction and realizes ${he} cannot.`);
			if (hasBothLegs(slave)) {
				r.push(`After more thought, ${he} simply gets on ${his} knees facing away from you and spreads ${his} buttocks to offer ${himself} to you.`);
			} else {
				r.push(`After more thought, ${he} simply rolls over facing away from you and winks ${his} asshole to offer ${himself} to you.`);
			}
			r.push(`${He} has become more submissive due to your radical reshaping of ${his} being. As with all surgery ${his} health has been slightly affected.`);
			reaction.devotion += 4;
		} else if (slave.devotion > 20) {
			r.push(`${He} clearly feels quite normal except for a vague ache around ${his} larynx. It takes a good while for ${him} to figure out what has happened, but eventually ${he} tries to speak and makes no sound. ${He} panics, trying to scream or protest but only managing to cry. Eventually ${he} pulls ${himself} together. ${He} will struggle with ${his} medically created disability. 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 -= 10;
		} else {
			r.push(`${He} clearly feels quite normal except for a vague ache around ${his} larynx. It takes a good while for ${him} to figure out what has happened, but eventually ${he} tries to speak and makes no sound. ${He} panics, trying to scream or protest but only managing to cry. As long as ${he} remains unbent to your will, ${he} will have a constant, inescapable reminder of who and what you are. The surgical invasion has filled ${him} with horror and anger. As with all surgery ${his} health has been slightly affected. ${He} is cripplingly afraid of your total power over ${his} body.`);
			reaction.trust -= 20;
			reaction.devotion -= 50;
		}

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

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

		if (slave.behavioralFlaw === "bitchy") {
			reaction.longReaction.last()
				.push(`<span class="green">${He} can hardly make sharp remarks without a voice.</span>`);
			slave.behavioralFlaw = "none";
		}

		return reaction;
	}
};

App.Medicine.Surgery.Procedures.Mute = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Remove vocal cords";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		surgeryAmp(this._slave, "voicebox");
		return this._assemble(new App.Medicine.Surgery.Reactions.Mute());
	}
};


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

		if (slave.fetish === "mindbroken") {
			r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, but ${he} fails to recall that. ${He} doesn't notice anything different, though.`);
		} 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 as it gradually gains strength ${he} notices that it sounds more natural and human than ${his} old electrolarynx.`);
		}
		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.OFNewVoice = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Replace";
	}

	get description() {
		return "remove electrolarynx and implant organic vocal cords";
	}

	get healthCost() {
		return 20;
	}

	apply(cheat) {
		this._slave.electrolarynx = 0;
		if (this._slave.ovaries === 1 && this._slave.hormoneBalance >= 200) {
			this._slave.voice = 3;
		} else if (this._slave.balls > 0 || this._slave.hormoneBalance < -20) {
			this._slave.voice = 1;
		} else {
			this._slave.voice = 2;
		}

		return this._assemble(new App.Medicine.Surgery.Reactions.NewVoice());
	}
};


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

		if (slave.fetish === "mindbroken") {
			r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, but ${he} fails to recall that. ${He} doesn't any effort to speak either, though.`);
		} else 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;
		}
		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.OFRestoreVoice = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Implant";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		if (this._slave.ovaries === 1 && this._slave.hormoneBalance >= 200) {
			this._slave.voice = 3;
		} else if (this._slave.balls > 0 || this._slave.hormoneBalance < -20) {
			this._slave.voice = 1;
		} else {
			this._slave.voice = 2;
		}
		return this._assemble(new App.Medicine.Surgery.Reactions.RestoreVoice());
	}
};


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

		if (slave.fetish === "mindbroken") {
			r.push(`The autosurgery instructed ${him} in no uncertain terms not to speak during recovery, but ${he} fails to recall that. ${He} doesn't notice anything different. As with all surgery ${his} health has been slightly affected.`);
		} 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. It comes out`);
			if (slave.voice === 1) {
				r.push(`far`);
			}
			r.push(`lower and more manly than it was before, and ${he} laughs at ${himself} as ${he} gets used to it. ${He} has become more dominant, since this allows ${him} to think of ${himself} as`);
			if (slave.voice === 1) {
				r.push(`an action movie hero.`);
			} else if (slave.voice === 2) {
				r.push(`a mature career woman.`);
			}
			r.push(`As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`);
			reaction.devotion += 4;
		} 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. It comes out`);
			if (slave.voice === 1) {
				r.push(`far`);
			}
			r.push(`lower and more manly than it was before, and ${he} laughs grimly at ${himself} as ${he} gets used to it. ${He} carries on regardless, accepting it as one more thing to learn to accept. As with all surgery ${his} health has been slightly affected.`);
		} 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. It comes out`);
			if (slave.voice === 1) {
				r.push(`far`);
			}
			r.push(`lower and more manly than it was before. For now, <span class="devotion dec">${he} feels this`);
			if (slave.voice === 1) {
				r.push(`gravelly`);
			} else if (slave.voice === 2) {
				r.push(`subdued`);
			}
			r.push(`voice is not ${hers}, a cruel mockery. 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.VoiceLower = class extends App.Medicine.Surgery.Procedure {
	get name() {
		return "Perform surgery to lower voice";
	}

	get healthCost() {
		return 10;
	}

	apply(cheat) {
		this._slave.voice -= 1;
		this._slave.voiceImplant -= 1;
		return this._assemble(new App.Medicine.Surgery.Reactions.VoiceLower());
	}
};