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

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

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

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

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

	get healthCost() { return 0; }

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


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

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

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

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

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

	get healthCost() { return 0; }

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

repo_name: Arkerthan/fc

license: mit


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

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

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

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

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

	get healthCost() {
		return 5;
	}

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


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

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

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

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

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

	get healthCost() {
		return 10;
	}

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


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

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

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

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

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

	get healthCost() {
		return 5;
	}

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


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

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

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

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

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

	get healthCost() {
		return 5;
	}

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


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

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

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

	get name() {
		return this._name;
	}

	get healthCost() {
		return 10;
	}

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


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

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

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

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

	get healthCost() {
		return 10;
	}

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


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

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

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

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

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

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


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

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

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

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

	get healthCost() {
		return 40;
	}

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


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

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

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

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

	get healthCost() {
		return 10;
	}

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


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

		if (slave.fetish === 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, Fetish.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 = NippleShape.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());
	}
};


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 === 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 === 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, Fetish.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 = NippleShape.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 !== 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 !== 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 === 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 === 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 === 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 === BehavioralFlaw.ARROGANT) {
			const r = `<span class="flaw break">${He} can hardly be arrogant relying on others to feed, bathe and carry ${him}.</span>`;
			if (reaction.longReaction.length > 0) {
				reaction.longReaction.last()
					.push(r);
			} else {
				reaction.longReaction.push([r]);
			}
			slave.behavioralFlaw = 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 === 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 === 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 === 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 === 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 === 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 === 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 (diff.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 (diff.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 === 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 === 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.Braces());
	}
};

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 === 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());
	}
};