diff --git a/devNotes/tests/diffProxyTest.js b/devNotes/tests/diffProxyTest.js new file mode 100644 index 0000000000000000000000000000000000000000..39fa429ac39725a13974370ca00c00c9da7789f9 --- /dev/null +++ b/devNotes/tests/diffProxyTest.js @@ -0,0 +1,82 @@ +function tests() { + const getProxy = App.Utils.Diff.getProxy; + + function orig() { + return { + a: 1, + b: [1, 2], + c: {a: 1} + }; + } + + function log(name, p) { + console.log(name); + const original = p.diffOriginal; + const diff = p.diffChange; + console.log("Original:", _.cloneDeep(original)); + console.log("Diff: ", diff); + App.Utils.Diff.applyDiff(original, diff); + console.log("Apply: ", original); + } + + log("Proxy", getProxy(orig())); + + let o = getProxy(orig()); + o.a = 2; + log(1, o); + + o = getProxy(orig()); + delete o.a; + log(2, o); + + o = getProxy(orig()); + o.c.a = 2; + log(3, o); + + o = getProxy(orig()); + delete o.c.a; + log(4, o); + + o = getProxy(orig()); + delete o.c; + log(5, o); + + o = getProxy(orig()); + o.b[1] = 5; + log(6, o); + + o = getProxy(orig()); + o.b.push(5); + log(7, o); + + o = getProxy(orig()); + o.b.push(5); + console.log("EXPECT: 5, IS: ", o.b[2]); + log(8, o); + + o = getProxy(orig()); + console.log("POP 1:", o.b.pop()); + log(9, o); + + o = getProxy(orig()); + o.d = 7; + log(10, o); + + o = getProxy(orig()); + o.d = {a: 5}; + console.log("Expect 5:", o.d.a); + log(11, o); + o = getProxy(orig()); + + o.d = {a: [5]}; + o.d.a.unshift(9); + log(12, o); + + let slaveDummy = getProxy({eye: new App.Entity.EyeState()}); + eyeSurgery(slaveDummy, "left", "remove"); + log(20, slaveDummy); + + slaveDummy = getProxy({eye: new App.Entity.EyeState()}); + eyeSurgery(slaveDummy, "both", "remove"); + log(20, slaveDummy); +} diff --git a/devTools/types/FC/util.d.ts b/devTools/types/FC/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5dd8757958ccef4ca9823b5f3c38adaa4c9c415c --- /dev/null +++ b/devTools/types/FC/util.d.ts @@ -0,0 +1,16 @@ +declare namespace FC { + namespace Util { + interface DiffBase<T> { + /** + * The original object + */ + diffOriginal: T + /** + * The changes applied to the object + */ + diffChange: Partial<T> + } + + type DiffRecorder<T> = T & DiffBase<T> + } +} diff --git a/js/004-base/SurgeryEffect.js b/js/004-base/SurgeryEffect.js index 12d03d71e9a9d665ef219bebc6489fc5685ea1e8..e0f299b9ba84bd71983fad36ac4970c473e8756f 100644 --- a/js/004-base/SurgeryEffect.js +++ b/js/004-base/SurgeryEffect.js @@ -27,8 +27,9 @@ App.Medicine.Surgery.SimpleReaction = class { /** * @param {App.Entity.SlaveState} slave + * @param {Partial<App.Entity.SlaveState>} diff */ - intro(slave) { + intro(slave, diff) { const {he, his, himself} = getPronouns(slave); const r = []; @@ -73,18 +74,20 @@ App.Medicine.Surgery.SimpleReaction = class { /** * @param {App.Entity.SlaveState} slave + * @param {Partial<App.Entity.SlaveState>} diff * @returns {reactionResult} */ - reaction(slave) { + reaction(slave, diff) { return this._createReactionResult(); } /** * @param {App.Entity.SlaveState} slave + * @param {Partial<App.Entity.SlaveState>} diff * @param {reactionResult} previousReaction * @returns {reactionResult} */ - outro(slave, previousReaction) { + outro(slave, diff, previousReaction) { const reaction = this._createReactionResult(); if (V.PC.skill.medicine < 100) { return reaction; diff --git a/js/004-base/SurgeryProcedure.js b/js/004-base/SurgeryProcedure.js index 60f146ccabc081749c39f84f191f7f2de504c913..efbbdfc478f0ca894960420ab5f6d24a8fed5ae5 100644 --- a/js/004-base/SurgeryProcedure.js +++ b/js/004-base/SurgeryProcedure.js @@ -3,7 +3,15 @@ App.Medicine.Surgery.Procedure = class { * @param {App.Entity.SlaveState} slave */ constructor(slave) { - this.slave = slave; + /** + * @type {FC.Util.DiffRecorder<App.Entity.SlaveState>} + * @protected + */ + this._slave = App.Utils.Diff.getProxy(slave); + } + + get originalSlave() { + return this._slave.diffOriginal; } // eslint-disable-next-line jsdoc/require-returns-check @@ -33,7 +41,18 @@ App.Medicine.Surgery.Procedure = class { // eslint-disable-next-line jsdoc/require-returns-check /** * @param {boolean} cheat - * @returns {App.Medicine.Surgery.SimpleReaction} + * @returns {[Partial<App.Entity.SlaveState>, App.Medicine.Surgery.SimpleReaction]} */ apply(cheat) { throw new Error("Method 'apply()' must be implemented."); } + + /** + * Convenience function to prepare the return value for apply() + * + * @param {App.Medicine.Surgery.SimpleReaction} reaction + * @returns {[Partial<App.Entity.SlaveState>, App.Medicine.Surgery.SimpleReaction]} + * @protected + */ + _assemble(reaction) { + return [this._slave.diffChange, reaction]; + } }; diff --git a/js/diff.js b/js/diff.js new file mode 100644 index 0000000000000000000000000000000000000000..b5c00efc77c80ed15a9a3cdd2767b00f3141d2a6 --- /dev/null +++ b/js/diff.js @@ -0,0 +1,189 @@ +/** + * The diff proxy records all changes to the original object without changing the original object while emulating the + * changes for access from outside. The resulting diff object can then be applied on the original. The resulting object + * is the same as if the changes were applied directly to the original object. + */ +App.Utils.Diff = (function() { + const deletedSymbol = Symbol("deleted property"); + + /** + * @template {object} T + * @param {T} base + * @returns {FC.Util.DiffRecorder<T>} + */ + function getProxy(base) { + const diff = {}; + + /** + * @typedef {Array<string|symbol>} path + * Can only point to objects or arrays, never to primitives + */ + + /** + * @param {path} path + * @returns {any} + */ + function localDiff(path) { + let value = diff; + for (const key of path) { + if (key in value) { + value = value[key]; + } else { + return {}; + } + } + return value; + } + + /** + * @param {path} path + * @param {string|symbol} prop + * @param {any} value + */ + function setDiff(path, prop, value) { + let localDiff = diff; + /** + * @type {object} + */ + let original = base; + let originalLost = false; // True, if the original object does not have this path + for (const key of path) { + if (key in original) { + original = original[key]; + } else { + originalLost = true; + } + if (!(key in localDiff)) { + if (originalLost) { + // Should not happen + throw new TypeError("Neither original nor diff have this property: " + path); + } + + if (_.isArray(original)) { + // clone arrays to make sure push, pop, etc. operations don't mess anything up later + // Deep copy in case array entries get modified later + localDiff[key] = _.cloneDeep(original); + } else if (_.isObject(original)) { + localDiff[key] = {}; + } + } + localDiff = localDiff[key]; + } + localDiff[prop] = value; + } + + /** + * @template {object} T + * @param {T} target + * @param {path} path + * @returns {FC.Util.DiffRecorder<T>|T} + */ + function makeProxy(target, path) { + if (target == null) { // intentionally == + return target; + } + + if (_.isArray(target)) { + return new Proxy(target, { + get: function(o, prop) { + if (prop === "diffOriginal") { + return o; + } else if (prop === "diffChange") { + return localDiff(path); + } + + const value = prop in localDiff(path) ? localDiff(path)[prop] : o[prop]; + if (typeof value === "function") { + if (prop in localDiff(path)) { + return value.bind(localDiff(path)); + } + if (["push", "pop", "shift", "unshift", "splice", "fill", "reverse"].includes(prop)) { + // Deep copy in case array entries get modified later + const diffArray = _.cloneDeep(o); + setDiff(path.slice(0, -1), path.last(), diffArray); + return value.bind(diffArray); + } + return value.bind(o); + } + if (value === deletedSymbol) { + return undefined; + } + return makeProxy(value, [...path, prop]); + }, + set: function(o, prop, value) { + setDiff(path, prop, value); + return true; + }, + deleteProperty: function(o, prop) { + setDiff(path, prop, deletedSymbol); + return true; + } + }); + } + + if (_.isObject(target)) { + return new Proxy(target, { + get: function(o, prop) { + if (prop === "diffOriginal") { + return o; + } else if (prop === "diffChange") { + return localDiff(path); + } + + if (prop in localDiff(path)) { + if (localDiff(path)[prop] === deletedSymbol) { + return undefined; + } + return makeProxy(localDiff(path)[prop], [...path, prop]); + } + return makeProxy(o[prop], [...path, prop]); + }, + set: function(o, prop, value) { + setDiff(path, prop, value); + return true; + }, + deleteProperty: function(o, prop) { + setDiff(path, prop, deletedSymbol); + return true; + } + }); + } + + return target; + } + + // base is an object, therefore makeProxy() returns FC.Util.DiffRecorder + // @ts-ignore + return makeProxy(base, []); + } + + /** + * @template {object} T + * @param {T} base + * @param {Partial<T>} diff + */ + function applyDiff(base, diff) { + for (const key in diff) { + const value = diff[key]; + // @ts-ignore + if (value === deletedSymbol) { + delete base[key]; + } else if (!_.isObject(value)) { + base[key] = value; + } else if (_.isArray(value)) { + base[key] = value; + } else { + if (base[key] !== undefined) { + applyDiff(base[key], value); + } else { + base[key] = value; + } + } + } + } + + return { + getProxy: getProxy, + applyDiff: applyDiff, + }; +})(); diff --git a/js/medicine/surgery/eye/blind.js b/js/medicine/surgery/eye/blind.js index 0b02a9ff706e16ab515f90861a13117e1d66d76f..cc5f35337e08ff61e5e421dceefbf1f6e9aadeba 100644 --- a/js/medicine/surgery/eye/blind.js +++ b/js/medicine/surgery/eye/blind.js @@ -1,8 +1,8 @@ App.Medicine.Surgery.Reactions.Blind = class extends App.Medicine.Surgery.SimpleReaction { get removeJob() { return true; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; r.push(`The laser eye surgery is brief, with <span class="health dec">nothing more than minor health effects.</span> As soon as ${he} is allowed to open ${his} eyes and look around, ${he} begins to glance back and forth frantically, not immediately understanding that this darkness is ${his} new reality.`); @@ -38,7 +38,7 @@ App.Medicine.Surgery.Procedures.Blind = class extends App.Medicine.Surgery.Proce get healthCost() { return 5; } apply(cheat) { - eyeSurgery(this.slave, this.side, "blind"); - return new App.Medicine.Surgery.Reactions.Blind(); + eyeSurgery(this._slave, this.side, "blind"); + return this._assemble(new App.Medicine.Surgery.Reactions.Blind()); } }; diff --git a/js/medicine/surgery/eye/eyeBlur.js b/js/medicine/surgery/eye/eyeBlur.js index 12d4b8f004cb409c3c6fa2a3b6018853550069d4..84260238f43f54d1ddee8eabfc5a7c2cc886b366 100644 --- a/js/medicine/surgery/eye/eyeBlur.js +++ b/js/medicine/surgery/eye/eyeBlur.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.EyeBlur = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; @@ -38,7 +38,7 @@ App.Medicine.Surgery.Procedures.EyeBlur = class extends App.Medicine.Surgery.Pro get healthCost() { return 5; } apply(cheat) { - eyeSurgery(this.slave, this.side, "blur"); - return new App.Medicine.Surgery.Reactions.EyeBlur(); + eyeSurgery(this._slave, this.side, "blur"); + return this._assemble(new App.Medicine.Surgery.Reactions.EyeBlur()); } }; diff --git a/js/medicine/surgery/eye/eyeFix.js b/js/medicine/surgery/eye/eyeFix.js index f54b27c7245b1ba0d5bd529d46042e492c45fbd5..756904fa35a399ffe431a2ab4bf31ee77bd5a2b7 100644 --- a/js/medicine/surgery/eye/eyeFix.js +++ b/js/medicine/surgery/eye/eyeFix.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.EyeFix = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -37,7 +37,7 @@ App.Medicine.Surgery.Procedures.EyeFix = class extends App.Medicine.Surgery.Proc get healthCost() { return 5; } apply(cheat) { - eyeSurgery(this.slave, this.side, "fix"); - return new App.Medicine.Surgery.Reactions.EyeFix(); + eyeSurgery(this._slave, this.side, "fix"); + return this._assemble(new App.Medicine.Surgery.Reactions.EyeFix()); } }; diff --git a/js/medicine/surgery/eye/removeEyes.js b/js/medicine/surgery/eye/removeEyes.js index c363c8ce1348f04a48f27955ab318607b1aeff35..065c19b55dfd0eddb56f72a663df12ba92bd1bdc 100644 --- a/js/medicine/surgery/eye/removeEyes.js +++ b/js/medicine/surgery/eye/removeEyes.js @@ -1,8 +1,8 @@ App.Medicine.Surgery.Reactions.RemoveEyes = class extends App.Medicine.Surgery.SimpleReaction { get removeJob() { return true; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; r.push(`Surgery doesn't take long, but since it was invasive there are <span class="health dec">moderate health consequences.</span> As anesthesia wears off ${he} tries to open ${his} eyes and finds ${he} is unable to.`); @@ -24,8 +24,8 @@ App.Medicine.Surgery.Reactions.RemoveEyes = class extends App.Medicine.Surgery.S }; App.Medicine.Surgery.Reactions.RemoveBlindEyes = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {he, His, his} = getPronouns(slave); const r = []; r.push(`Surgery doesn't take long, but since it was invasive there are <span class="health dec">moderate health consequences.</span> As anesthesia wears off ${he} tries to open ${his} eyes and finds ${he} is unable to.`); @@ -58,10 +58,10 @@ App.Medicine.Surgery.Procedures.RemoveEyes = class extends App.Medicine.Surgery. get healthCost() { return 5; } apply(cheat) { - const reaction = getBestVision(this.slave) > 0 ? + const reaction = getBestVision(this._slave) > 0 ? new App.Medicine.Surgery.Reactions.RemoveEyes() : new App.Medicine.Surgery.Reactions.RemoveBlindEyes(); - eyeSurgery(this.slave, this.side, "remove"); - return reaction; + eyeSurgery(this._slave, this.side, "remove"); + return this._assemble(reaction); } }; diff --git a/js/medicine/surgery/face/age.js b/js/medicine/surgery/face/age.js index 72a06948f3cc9f5d55744bc7033ec9478656e063..44f9af6ccdcd118ac5cac9c80fa768941862fd4b 100644 --- a/js/medicine/surgery/face/age.js +++ b/js/medicine/surgery/face/age.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.Age = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -46,8 +46,8 @@ App.Medicine.Surgery.Procedures.AgeLift = class extends App.Medicine.Surgery.Pro get healthCost() { return 10; } apply(cheat) { - applyAgeImplant(this.slave); - this.slave.faceImplant = Math.clamp(this.slave.faceImplant + faceSurgeryArtificiality(), 0, 100); - return new App.Medicine.Surgery.Reactions.Age(); + applyAgeImplant(this._slave); + this._slave.faceImplant = Math.clamp(this._slave.faceImplant + faceSurgeryArtificiality(), 0, 100); + return this._assemble(new App.Medicine.Surgery.Reactions.Age()); } }; diff --git a/js/medicine/surgery/face/face.js b/js/medicine/surgery/face/face.js index cfbbae7aa30625280b94e44859a778a05648e7f8..b255e1bb88839119e7b5ec15b31b9e41fbc3d858 100644 --- a/js/medicine/surgery/face/face.js +++ b/js/medicine/surgery/face/face.js @@ -1,18 +1,10 @@ App.Medicine.Surgery.Reactions.Face = class extends App.Medicine.Surgery.SimpleReaction { - /** - * @param {number} oldFace - */ - constructor(oldFace) { - super(); - this.oldFace = oldFace; - } - - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; - r.push(faceIncreaseDesc(slave, this.oldFace)); + r.push(faceIncreaseDesc(slave, diff.face)); if (slave.fetish === "mindbroken") { r.push(`${He} doesn't notice the improvements to ${his} face, but ${he}'s not the one looking at it. As with all surgery <span class="health dec">${his} health has been slightly affected.</span>`); } else if (slave.devotion > 50) { @@ -61,7 +53,7 @@ App.Medicine.Surgery.Procedures.FaceShape = class extends App.Medicine.Surgery.P } get name() { - if (this.targetShape === "androgynous" && this.slave.faceShape === "masculine") { + if (this.targetShape === "androgynous" && this._slave.faceShape === "masculine") { return `Soften to androgynous`; } else if (this.targetShape === "normal") { return `Make conventionally feminine`; @@ -73,11 +65,11 @@ App.Medicine.Surgery.Procedures.FaceShape = class extends App.Medicine.Surgery.P get healthCost() { return 10; } apply(cheat) { - const oldFace = this.slave.face; - this.slave.faceShape = this.targetShape; - faceIncreaseAction(this.slave, 20); - this.slave.faceImplant = Math.clamp(this.slave.faceImplant + faceSurgeryArtificiality(), 0, 100); - return new App.Medicine.Surgery.Reactions.Face(oldFace); + this._slave.faceShape = this.targetShape; + faceIncreaseAction(this._slave, 20); + this._slave.faceImplant = Math.clamp(this._slave.faceImplant + faceSurgeryArtificiality(), 0, 100); + return this._assemble(new App.Medicine.Surgery.Reactions.Face()); + } }; @@ -87,9 +79,8 @@ App.Medicine.Surgery.Procedures.FaceAttractiveness = class extends App.Medicine. get healthCost() { return 10; } apply(cheat) { - const oldFace = this.slave.face; - faceIncreaseAction(this.slave, 20); - this.slave.faceImplant = Math.clamp(this.slave.faceImplant + faceSurgeryArtificiality(), 0, 100); - return new App.Medicine.Surgery.Reactions.Face(oldFace); + faceIncreaseAction(this._slave, 20); + this._slave.faceImplant = Math.clamp(this._slave.faceImplant + faceSurgeryArtificiality(), 0, 100); + return this._assemble(new App.Medicine.Surgery.Reactions.Face()); } }; diff --git a/js/medicine/surgery/hair/bodyHairRemoval.js b/js/medicine/surgery/hair/bodyHairRemoval.js index f61c65dbaffaae0eb7ad5f4af8cbf56021489bc0..f752c63b7e066d628ecac618c80deb0b81a83960 100644 --- a/js/medicine/surgery/hair/bodyHairRemoval.js +++ b/js/medicine/surgery/hair/bodyHairRemoval.js @@ -1,9 +1,8 @@ App.Medicine.Surgery.Reactions.BodyHairRemoval = class extends App.Medicine.Surgery.SimpleReaction { - get invasive() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); let r = []; @@ -48,19 +47,19 @@ App.Medicine.Surgery.Reactions.BodyHairRemoval = class extends App.Medicine.Surg App.Medicine.Surgery.Procedures.BodyHairRemoval = class extends App.Medicine.Surgery.Procedure { get name() { - const {his} = getPronouns(this.slave); + const {his} = getPronouns(this._slave); return `Surgically remove ${his} ability to grow body hair`; } get healthCost() { return 0; } apply(cheat) { - if (this.slave.underArmHStyle !== "hairless") { - this.slave.underArmHStyle = "bald"; + if (this._slave.underArmHStyle !== "hairless") { + this._slave.underArmHStyle = "bald"; } - if (this.slave.pubicHStyle !== "hairless") { - this.slave.pubicHStyle = "bald"; + if (this._slave.pubicHStyle !== "hairless") { + this._slave.pubicHStyle = "bald"; } - return new App.Medicine.Surgery.Reactions.BodyHairRemoval(); + return this._assemble(new App.Medicine.Surgery.Reactions.BodyHairRemoval()); } }; diff --git a/js/medicine/surgery/hair/eyebrowRemoval.js b/js/medicine/surgery/hair/eyebrowRemoval.js index 0bc21f7e570521089ba294581c846cee491136a6..30e98125c06fb607616eb1b47194cad5eb3483cb 100644 --- a/js/medicine/surgery/hair/eyebrowRemoval.js +++ b/js/medicine/surgery/hair/eyebrowRemoval.js @@ -1,9 +1,8 @@ App.Medicine.Surgery.Reactions.EyebrowRemoval = class extends App.Medicine.Surgery.SimpleReaction { - get invasive() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); let r = []; @@ -44,15 +43,15 @@ App.Medicine.Surgery.Reactions.EyebrowRemoval = class extends App.Medicine.Surge App.Medicine.Surgery.Procedures.EyebrowRemoval = class extends App.Medicine.Surgery.Procedure { get name() { - const {his} = getPronouns(this.slave); + const {his} = getPronouns(this._slave); return `Surgically remove ${his} ability to grow eyebrows`; } get healthCost() { return 0; } apply(cheat) { - this.slave.eyebrowHStyle = "bald"; - return new App.Medicine.Surgery.Reactions.EyebrowRemoval(); + this._slave.eyebrowHStyle = "bald"; + return this._assemble(new App.Medicine.Surgery.Reactions.EyebrowRemoval()); } }; diff --git a/js/medicine/surgery/hair/hairRemoval.js b/js/medicine/surgery/hair/hairRemoval.js index e53a6719db61c9b5f704f239e824a0b7a058aef7..316ba4e633871d0a5601a4048d3900a2936073b9 100644 --- a/js/medicine/surgery/hair/hairRemoval.js +++ b/js/medicine/surgery/hair/hairRemoval.js @@ -1,8 +1,8 @@ App.Medicine.Surgery.Reactions.HairRemoval = class extends App.Medicine.Surgery.SimpleReaction { get invasive() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); let r = []; @@ -53,16 +53,16 @@ App.Medicine.Surgery.Reactions.HairRemoval = class extends App.Medicine.Surgery. App.Medicine.Surgery.Procedures.HairRemoval = class extends App.Medicine.Surgery.Procedure { get name() { - const {his} = getPronouns(this.slave); + 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 new App.Medicine.Surgery.Reactions.HairRemoval(); + this._slave.bald = 1; + this._slave.hStyle = "bald"; + this._slave.eyebrowHStyle = "bald"; + return this._assemble(new App.Medicine.Surgery.Reactions.HairRemoval()); } }; diff --git a/js/medicine/surgery/reaction/addAnimalBalls.js b/js/medicine/surgery/reaction/addAnimalBalls.js index 2299fd284f27a454b13083640592162606a908d0..31267edc883870861ebe84fee72ce39f61a1f40a 100644 --- a/js/medicine/surgery/reaction/addAnimalBalls.js +++ b/js/medicine/surgery/reaction/addAnimalBalls.js @@ -2,8 +2,8 @@ class AddAnimalBalls extends App.Medicine.Surgery.Reaction { get key() { return "addAnimalBalls"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addAnimalOvaries.js b/js/medicine/surgery/reaction/addAnimalOvaries.js index ed4563ea5be43120cae2071c9ae2943c6e92d852..01d38eab7e326bc61a14bc81ffe880af8ecd0e39 100644 --- a/js/medicine/surgery/reaction/addAnimalOvaries.js +++ b/js/medicine/surgery/reaction/addAnimalOvaries.js @@ -2,8 +2,8 @@ class AddAnimalOvaries extends App.Medicine.Surgery.Reaction { get key() { return "addAnimalOvaries"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addBalls.js b/js/medicine/surgery/reaction/addBalls.js index 4fe6d0339c678922f266f90e9ecd433a79ffa5f0..df5f74a6f39f15accfe04b6b58c54491c75cf95b 100644 --- a/js/medicine/surgery/reaction/addBalls.js +++ b/js/medicine/surgery/reaction/addBalls.js @@ -2,8 +2,8 @@ class AddBalls extends App.Medicine.Surgery.Reaction { get key() { return "addBalls"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addDick.js b/js/medicine/surgery/reaction/addDick.js index b09f5315eaee53ada0ddbf6e06593fec00b0ca5b..33ca8ad74537ea0bd444520220c7e043d85fef79 100644 --- a/js/medicine/surgery/reaction/addDick.js +++ b/js/medicine/surgery/reaction/addDick.js @@ -2,8 +2,8 @@ class AddDick extends App.Medicine.Surgery.Reaction { get key() { return "addDick"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addForeskin.js b/js/medicine/surgery/reaction/addForeskin.js index 359bd6bd4e9c7677a7bd81c775197be4c1ef16e1..ed2275e3936791c53019f913f26fe3cacf56c798 100644 --- a/js/medicine/surgery/reaction/addForeskin.js +++ b/js/medicine/surgery/reaction/addForeskin.js @@ -2,8 +2,8 @@ class AddForeskin extends App.Medicine.Surgery.Reaction { get key() { return "addForeskin"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addOvaries.js b/js/medicine/surgery/reaction/addOvaries.js index a899fe3060dc903d0fb34bf9ff8ff88c5c15bb30..1898640f95cdc7ab9a35e44cd6763dec705847b1 100644 --- a/js/medicine/surgery/reaction/addOvaries.js +++ b/js/medicine/surgery/reaction/addOvaries.js @@ -2,8 +2,8 @@ class AddOvaries extends App.Medicine.Surgery.Reaction { get key() { return "addOvaries"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addProstate.js b/js/medicine/surgery/reaction/addProstate.js index 6a2bdcc91db3f37622190ee41f4ad37e1e3eb02a..ea6f0f7a4982f5f97dadde41a8f10bcac6036118 100644 --- a/js/medicine/surgery/reaction/addProstate.js +++ b/js/medicine/surgery/reaction/addProstate.js @@ -2,8 +2,8 @@ class AddProstate extends App.Medicine.Surgery.Reaction { get key() { return "addProstate"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addScrotum.js b/js/medicine/surgery/reaction/addScrotum.js index bb04c2a7a24f1f76bf3a61aea5a89bf4bad5951a..50994ee2f6c2fa47bb1bd4957cee2511fe60d472 100644 --- a/js/medicine/surgery/reaction/addScrotum.js +++ b/js/medicine/surgery/reaction/addScrotum.js @@ -2,8 +2,8 @@ class AddScrotum extends App.Medicine.Surgery.Reaction { get key() { return "addScrotum"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/addTesticles.js b/js/medicine/surgery/reaction/addTesticles.js index 467bc2c7c8a6865e50360b25e51e84cde2f86074..26b04a06fafca552ad91af7d31ffd9a5db72459f 100644 --- a/js/medicine/surgery/reaction/addTesticles.js +++ b/js/medicine/surgery/reaction/addTesticles.js @@ -2,8 +2,8 @@ class AddTesticles extends App.Medicine.Surgery.Reaction { get key() { return "addTesticles"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/amp.js b/js/medicine/surgery/reaction/amp.js index d0be8c29e1b656f965829a04d6cbde1e89c95a73..867e5449a4e5654bace773258e51a49f3d568bc0 100644 --- a/js/medicine/surgery/reaction/amp.js +++ b/js/medicine/surgery/reaction/amp.js @@ -2,8 +2,8 @@ class Amp extends App.Medicine.Surgery.Reaction { get key() { return "amp"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const r = []; V.nextButton = " "; diff --git a/js/medicine/surgery/reaction/anus.js b/js/medicine/surgery/reaction/anus.js index f0208d733943f0c71a6ff07b82e14b3a1537fe38..db50699466df30a114afe1f8689b14545ee5a041 100644 --- a/js/medicine/surgery/reaction/anus.js +++ b/js/medicine/surgery/reaction/anus.js @@ -2,8 +2,8 @@ class Anus extends App.Medicine.Surgery.Reaction { get key() { return "anus"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/areolae.js b/js/medicine/surgery/reaction/areolae.js index 3a28554f1039574744bb50aa0f0aebd41338b2aa..41209b94a9b18b9b3fb0edfe49a362c2422a8d0e 100644 --- a/js/medicine/surgery/reaction/areolae.js +++ b/js/medicine/surgery/reaction/areolae.js @@ -2,8 +2,8 @@ class Areolae extends App.Medicine.Surgery.Reaction { get key() { return "areolae"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/asexualReproOvaries.js b/js/medicine/surgery/reaction/asexualReproOvaries.js index f9b079591043eb4e255179376a3fd0b33e8ea4aa..73ee4768d649e420ba09aa959406c3c3d512d635 100644 --- a/js/medicine/surgery/reaction/asexualReproOvaries.js +++ b/js/medicine/surgery/reaction/asexualReproOvaries.js @@ -2,8 +2,8 @@ class AsexualReproOvaries extends App.Medicine.Surgery.Reaction { get key() { return "asexualReproOvaries"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, girl} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/bellyDown.js b/js/medicine/surgery/reaction/bellyDown.js index 0684142ae2b59ec0da38852d75db8dba5a3bd6df..0945756c41c347d848664e757d8485bd7fe26b25 100644 --- a/js/medicine/surgery/reaction/bellyDown.js +++ b/js/medicine/surgery/reaction/bellyDown.js @@ -2,8 +2,8 @@ class BellyDown extends App.Medicine.Surgery.Reaction { get key() { return "bellyDown"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/bellyIn.js b/js/medicine/surgery/reaction/bellyIn.js index 83a78f5d658cb001fd158438d8b09495fe757d16..4f9f66c442f82e1b2f5ef0e3c04abf8aecb24236 100644 --- a/js/medicine/surgery/reaction/bellyIn.js +++ b/js/medicine/surgery/reaction/bellyIn.js @@ -2,8 +2,8 @@ class BellyIn extends App.Medicine.Surgery.Reaction { get key() { return "bellyIn"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/bellyInMale.js b/js/medicine/surgery/reaction/bellyInMale.js index 37f239899d38125311eab9c1aacc9b57ffe9b2a6..0a1e2023739af5bdcedba3f01c7d9ddcf57c06fd 100644 --- a/js/medicine/surgery/reaction/bellyInMale.js +++ b/js/medicine/surgery/reaction/bellyInMale.js @@ -2,8 +2,8 @@ class BellyInMale extends App.Medicine.Surgery.Reaction { get key() { return "bellyInMale"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/bellyOut.js b/js/medicine/surgery/reaction/bellyOut.js index b0877d960b48ce0ca28bafbd1ad40abf9a7f2c9e..48145aad5cf0d488f4f0e2bb524b29e42058b794 100644 --- a/js/medicine/surgery/reaction/bellyOut.js +++ b/js/medicine/surgery/reaction/bellyOut.js @@ -2,8 +2,8 @@ class BellyOut extends App.Medicine.Surgery.Reaction { get key() { return "bellyOut"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/bellyUp.js b/js/medicine/surgery/reaction/bellyUp.js index c180352f6274965fd995caef4f5c5bba9d8c6cf5..c8b0a2f01829361727ce81d4f1d8b87af8ac4ab7 100644 --- a/js/medicine/surgery/reaction/bellyUp.js +++ b/js/medicine/surgery/reaction/bellyUp.js @@ -2,8 +2,8 @@ class BellyUp extends App.Medicine.Surgery.Reaction { get key() { return "bellyUp"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const heGlaresDaggers = canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`; const r = []; diff --git a/js/medicine/surgery/reaction/boobs.js b/js/medicine/surgery/reaction/boobs.js index b14c453838c995a36b83c21de9137e0d286409f8..1f156b867f1c8ac4fcb67f795e8f2f7ff28b67fa 100644 --- a/js/medicine/surgery/reaction/boobs.js +++ b/js/medicine/surgery/reaction/boobs.js @@ -2,8 +2,8 @@ class Boobs extends App.Medicine.Surgery.Reaction { get key() { return "boobs"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const heGlaresDaggers = canSee(slave) ? `${he} glares daggers` : `${his} face contorts with distaste`; const r = []; diff --git a/js/medicine/surgery/reaction/boobsLoss.js b/js/medicine/surgery/reaction/boobsLoss.js index d5f3ba5b67a8ac23443d35e3a05d3568ec27cbb8..6cc0e677df868a82bf0863bbd02a2f4fe4130d82 100644 --- a/js/medicine/surgery/reaction/boobsLoss.js +++ b/js/medicine/surgery/reaction/boobsLoss.js @@ -2,8 +2,8 @@ class BoobsLoss extends App.Medicine.Surgery.Reaction { get key() { return "boobsLoss"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/braces.js b/js/medicine/surgery/reaction/braces.js index beca381a2edc38cef1bf2ea4a12e2907b54f1dbf..975ee42bad7448f146d84b8e7c9e92f83930d978 100644 --- a/js/medicine/surgery/reaction/braces.js +++ b/js/medicine/surgery/reaction/braces.js @@ -6,8 +6,8 @@ get permanentChanges() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/breastLift.js b/js/medicine/surgery/reaction/breastLift.js index 385226a0521b249558e5259de598883abe9b16b6..a5ef5705736e1be44bedcdefee82b4c913806f40 100644 --- a/js/medicine/surgery/reaction/breastLift.js +++ b/js/medicine/surgery/reaction/breastLift.js @@ -2,8 +2,8 @@ class BreastLift extends App.Medicine.Surgery.Reaction { get key() { return "breastLift"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/breastReconstruction.js b/js/medicine/surgery/reaction/breastReconstruction.js index 4053e22b25c126dd77d409ec613f75a4de7f3b22..c594971c4d27b6bb8d99790900684e65e75bf44a 100644 --- a/js/medicine/surgery/reaction/breastReconstruction.js +++ b/js/medicine/surgery/reaction/breastReconstruction.js @@ -2,8 +2,8 @@ class BreastReconstruction extends App.Medicine.Surgery.Reaction { get key() { return "breastReconstruction"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/breastShapePreservation.js b/js/medicine/surgery/reaction/breastShapePreservation.js index b3c127357f7ef81953dbcef03e738119b707784f..8ba6a60628dadfe433ce17f8e54591e0634b31d6 100644 --- a/js/medicine/surgery/reaction/breastShapePreservation.js +++ b/js/medicine/surgery/reaction/breastShapePreservation.js @@ -2,8 +2,8 @@ class BreastShapePreservation extends App.Medicine.Surgery.Reaction { get key() { return "breastShapePreservation"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/breastShapePreservationFailure.js b/js/medicine/surgery/reaction/breastShapePreservationFailure.js index 137ae4f9a153d969abab23aa4b6136674f7bac3d..e467cd5b95a30b8326de23b4a46913018d7b09eb 100644 --- a/js/medicine/surgery/reaction/breastShapePreservationFailure.js +++ b/js/medicine/surgery/reaction/breastShapePreservationFailure.js @@ -6,8 +6,8 @@ return []; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; const heGlaresDaggers = (canSee(slave)) ? `${he} glares daggers` : `${his} face contorts with distaste`; diff --git a/js/medicine/surgery/reaction/butt.js b/js/medicine/surgery/reaction/butt.js index 3981c66c95f6b0168d1c460745ed97cb38707456..56b2ce1bdefa7c86bfc231f9b44ea0d3707b777c 100644 --- a/js/medicine/surgery/reaction/butt.js +++ b/js/medicine/surgery/reaction/butt.js @@ -2,8 +2,8 @@ class Butt extends App.Medicine.Surgery.Reaction { get key() { return "butt"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/buttLoss.js b/js/medicine/surgery/reaction/buttLoss.js index 2d8dcd134f9c38209f4325a0081941c271c2636b..98c27ad2df08f62c49824b8013c1f02f7aa03cd0 100644 --- a/js/medicine/surgery/reaction/buttLoss.js +++ b/js/medicine/surgery/reaction/buttLoss.js @@ -2,8 +2,8 @@ class ButtLoss extends App.Medicine.Surgery.Reaction { get key() { return "buttLoss"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/cervixPump.js b/js/medicine/surgery/reaction/cervixPump.js index d89699cb777232ad338a4239e58d7e03aecc47bb..7a721b2abfc4030925cdbaf9314b682d5b862d82 100644 --- a/js/medicine/surgery/reaction/cervixPump.js +++ b/js/medicine/surgery/reaction/cervixPump.js @@ -2,8 +2,8 @@ class CervixPump extends App.Medicine.Surgery.Reaction { get key() { return "cervixPump"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/cervixPumpAnus.js b/js/medicine/surgery/reaction/cervixPumpAnus.js index 958d80018116138d9679e2002edf614c03b87b60..baa39da746ee69e75b19e2ea66b4f92a84912a74 100644 --- a/js/medicine/surgery/reaction/cervixPumpAnus.js +++ b/js/medicine/surgery/reaction/cervixPumpAnus.js @@ -2,8 +2,8 @@ class CervixPumpAnus extends App.Medicine.Surgery.Reaction { get key() { return "cervixPumpA"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/chemCastrate.js b/js/medicine/surgery/reaction/chemCastrate.js index 731a0720a74fb3679bcf916707233a1b09b8042d..f78044f2bb3d5bec1a76637d34f509a7badb3b9e 100644 --- a/js/medicine/surgery/reaction/chemCastrate.js +++ b/js/medicine/surgery/reaction/chemCastrate.js @@ -4,8 +4,8 @@ get invasive() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/chop.js b/js/medicine/surgery/reaction/chop.js index e8281dff3df3d605281d05579d316964c1cdb354..9087341b223d9ad6e665efe8cb86f1be7aafc785 100644 --- a/js/medicine/surgery/reaction/chop.js +++ b/js/medicine/surgery/reaction/chop.js @@ -2,8 +2,8 @@ class Chop extends App.Medicine.Surgery.Reaction { get key() { return "chop"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/circumcision.js b/js/medicine/surgery/reaction/circumcision.js index 26ee4d4f2be5142731602f418dd945dfd0986c1c..f8e9eeda5962d527dfc127a192bff67b2605f0a4 100644 --- a/js/medicine/surgery/reaction/circumcision.js +++ b/js/medicine/surgery/reaction/circumcision.js @@ -2,8 +2,8 @@ class Circumcision extends App.Medicine.Surgery.Reaction { get key() { return "circumcision"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/clitoralEnlargement.js b/js/medicine/surgery/reaction/clitoralEnlargement.js index 2e2b494dd6e30bdefc775d6ca4ab93e549613522..85c7fb6c0dd77cb6ceaf5e227cf3f7fa2e5da408 100644 --- a/js/medicine/surgery/reaction/clitoralEnlargement.js +++ b/js/medicine/surgery/reaction/clitoralEnlargement.js @@ -2,8 +2,8 @@ class ClitoralEnlargement extends App.Medicine.Surgery.Reaction { get key() { return "clitoral enlargement"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/clitoralReduction.js b/js/medicine/surgery/reaction/clitoralReduction.js index 83c4d85ed965180ff46545e0c81ed7dd61c5f9af..8baeb65dce39403c30417992fca93ff3157a94e4 100644 --- a/js/medicine/surgery/reaction/clitoralReduction.js +++ b/js/medicine/surgery/reaction/clitoralReduction.js @@ -2,8 +2,8 @@ class ClitoralReduction extends App.Medicine.Surgery.Reaction { get key() { return "clitoral reduction"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/cochlearImplant.js b/js/medicine/surgery/reaction/cochlearImplant.js index 00dd3831fa2485a466ae1d042f4d4fa4c95200f4..d602e9331e7917c1a8809bfbece2faff1b16338c 100644 --- a/js/medicine/surgery/reaction/cochlearImplant.js +++ b/js/medicine/surgery/reaction/cochlearImplant.js @@ -2,8 +2,8 @@ class CochlearImplant extends App.Medicine.Surgery.Reaction { get key() { return "cochlear implant"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/deafen.js b/js/medicine/surgery/reaction/deafen.js index f4340c7ab5f5a72e24c0d51bd6011cd97e15ee8f..b9aa9178b3f254971c47f47d5285f20df49662fe 100644 --- a/js/medicine/surgery/reaction/deafen.js +++ b/js/medicine/surgery/reaction/deafen.js @@ -2,8 +2,8 @@ class Deafen extends App.Medicine.Surgery.Reaction { get key() { return "deafen"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/desmell.js b/js/medicine/surgery/reaction/desmell.js index 812e314f443b8ef40173043b4bfc5234133ea0f4..812fbec2c856b35f6967e7a7752559314459e174 100644 --- a/js/medicine/surgery/reaction/desmell.js +++ b/js/medicine/surgery/reaction/desmell.js @@ -2,8 +2,8 @@ class Desmell extends App.Medicine.Surgery.Reaction { get key() { return "desmell"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/detaste.js b/js/medicine/surgery/reaction/detaste.js index 920b0d0c852496a3a1b5d4841b87118dcbf83ad9..5c8e5e3bfdc05b32bfbdc4e749e525df64f9b580 100644 --- a/js/medicine/surgery/reaction/detaste.js +++ b/js/medicine/surgery/reaction/detaste.js @@ -2,8 +2,8 @@ class Detaste extends App.Medicine.Surgery.Reaction { get key() { return "detaste"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earFix.js b/js/medicine/surgery/reaction/earFix.js index bd2854ed52e6a47318aa815b56f52f6c0ff4497a..96e1a816958b237d2913a7005ae34b95d60ed1d2 100644 --- a/js/medicine/surgery/reaction/earFix.js +++ b/js/medicine/surgery/reaction/earFix.js @@ -2,8 +2,8 @@ class EarFix extends App.Medicine.Surgery.Reaction { get key() { return "earFix"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earGone.js b/js/medicine/surgery/reaction/earGone.js index 20b2a344deb44807262190c059bc1683ef20eea3..eca7400bae70d6717e349b2c462d27660f93c0b4 100644 --- a/js/medicine/surgery/reaction/earGone.js +++ b/js/medicine/surgery/reaction/earGone.js @@ -2,8 +2,8 @@ class EarGone extends App.Medicine.Surgery.Reaction { get key() { return "earGone"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earMajor.js b/js/medicine/surgery/reaction/earMajor.js index 1c28a90029b5b7cd89b2c0eba97608ef24a8180d..ba0ce0e6b18761e8cfa41b118a90a83c1a74f092 100644 --- a/js/medicine/surgery/reaction/earMajor.js +++ b/js/medicine/surgery/reaction/earMajor.js @@ -2,8 +2,8 @@ class EarMajor extends App.Medicine.Surgery.Reaction { get key() { return "earMajor"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earMinor.js b/js/medicine/surgery/reaction/earMinor.js index 3be3fb381464e3d1d05b0b3aa2dfd47f69f394bd..a480f7d78c44b678f6d71033cc23addb943a23cb 100644 --- a/js/medicine/surgery/reaction/earMinor.js +++ b/js/medicine/surgery/reaction/earMinor.js @@ -2,8 +2,8 @@ class EarMinor extends App.Medicine.Surgery.Reaction { get key() { return "earMinor"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earMuffle.js b/js/medicine/surgery/reaction/earMuffle.js index f751392a7c5d91d04cd9bba0db5a801133fe4925..cfbf772e9cc817d526ab413386410dac42d4280d 100644 --- a/js/medicine/surgery/reaction/earMuffle.js +++ b/js/medicine/surgery/reaction/earMuffle.js @@ -2,8 +2,8 @@ class EarMuffle extends App.Medicine.Surgery.Reaction { get key() { return "earMuffle"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/earRestore.js b/js/medicine/surgery/reaction/earRestore.js index 08593020029d96b42062c9331966e8707f170496..8ff076bfa2bfd8078d3dc031c35d6ecf2ff1fe3e 100644 --- a/js/medicine/surgery/reaction/earRestore.js +++ b/js/medicine/surgery/reaction/earRestore.js @@ -2,8 +2,8 @@ class EarRestore extends App.Medicine.Surgery.Reaction { get key() { return "earRestore"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/ejaculation.js b/js/medicine/surgery/reaction/ejaculation.js index 9725306a590e51e5e8d254fc8eb8d701a6fef954..545b5d2358b10adfa2be9e842492079fd2046387 100644 --- a/js/medicine/surgery/reaction/ejaculation.js +++ b/js/medicine/surgery/reaction/ejaculation.js @@ -2,8 +2,8 @@ class Ejaculation extends App.Medicine.Surgery.Reaction { get key() { return "ejaculation"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/electrolarynx.js b/js/medicine/surgery/reaction/electrolarynx.js index da09e237e2f2d61ad045f4ae1dfd9b45b23c008b..15e0f76159241510c2e13375b494e32fc0b41785 100644 --- a/js/medicine/surgery/reaction/electrolarynx.js +++ b/js/medicine/surgery/reaction/electrolarynx.js @@ -2,8 +2,8 @@ class Electrolarynx extends App.Medicine.Surgery.Reaction { get key() { return "electrolarynx"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/endEjaculation.js b/js/medicine/surgery/reaction/endEjaculation.js index fed430448b1eba4d0a45062e38964e00981423e2..ea4d1c620d45e15781682a783438e5a53d5b836b 100644 --- a/js/medicine/surgery/reaction/endEjaculation.js +++ b/js/medicine/surgery/reaction/endEjaculation.js @@ -2,8 +2,8 @@ class EndEjaculation extends App.Medicine.Surgery.Reaction { get key() { return "endejac"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/endLactation.js b/js/medicine/surgery/reaction/endLactation.js index a649b8e24d71917560dc2a1f56149d5a0c3d58c5..0d6f0ea8afb4c2d08526634c0a01914ba7f51573 100644 --- a/js/medicine/surgery/reaction/endLactation.js +++ b/js/medicine/surgery/reaction/endLactation.js @@ -2,8 +2,8 @@ class EndLactation extends App.Medicine.Surgery.Reaction { get key() { return "endlac"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/endPrecum.js b/js/medicine/surgery/reaction/endPrecum.js index 407ca25b31125aa5ddb08ea02ef08ecd1ee2a77b..4cc7471bea60e11b4cafd77d7d6e18642fd00bb3 100644 --- a/js/medicine/surgery/reaction/endPrecum.js +++ b/js/medicine/surgery/reaction/endPrecum.js @@ -2,8 +2,8 @@ class EndPrecum extends App.Medicine.Surgery.Reaction { get key() { return "endprecum"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/fang.js b/js/medicine/surgery/reaction/fang.js index a77912ca1bff0043ed9a32700c1fce877c4ca051..ce228c3974bed19249810ef9e15fe4b36c92e94c 100644 --- a/js/medicine/surgery/reaction/fang.js +++ b/js/medicine/surgery/reaction/fang.js @@ -2,8 +2,8 @@ class Fang extends App.Medicine.Surgery.Reaction { get key() { return "fang"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/fangs.js b/js/medicine/surgery/reaction/fangs.js index 38eaaa1a7ce6e59a65b12ba71a6a16d4cad8c3bd..f7ecf2abadc93470f8a2856175d65043f51cc418 100644 --- a/js/medicine/surgery/reaction/fangs.js +++ b/js/medicine/surgery/reaction/fangs.js @@ -2,8 +2,8 @@ class Fangs extends App.Medicine.Surgery.Reaction { get key() { return "fangs"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/fatGraft.js b/js/medicine/surgery/reaction/fatGraft.js index 2415c49e37adb85f346b91167eadcdf984288371..d2e598556871de579241d451dc4c14b296b302a1 100644 --- a/js/medicine/surgery/reaction/fatGraft.js +++ b/js/medicine/surgery/reaction/fatGraft.js @@ -2,8 +2,8 @@ class FatGraft extends App.Medicine.Surgery.Reaction { get key() { return "fat graft"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/fertility.js b/js/medicine/surgery/reaction/fertility.js index 891b9c8ddc9277d916259b313ec22f64fede3545..9463965e55924d52a7ce9b16566d2a153bcecc95 100644 --- a/js/medicine/surgery/reaction/fertility.js +++ b/js/medicine/surgery/reaction/fertility.js @@ -2,8 +2,8 @@ class Fertility extends App.Medicine.Surgery.Reaction { get key() { return "fert"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/foreskinTuck.js b/js/medicine/surgery/reaction/foreskinTuck.js index fc2bbbcca3ba28bd11aff6a5bdaa7d45487fc080..21e4bb858c45b74995b3aa647c3818d57d2a49b8 100644 --- a/js/medicine/surgery/reaction/foreskinTuck.js +++ b/js/medicine/surgery/reaction/foreskinTuck.js @@ -2,8 +2,8 @@ class ForeskinTuck extends App.Medicine.Surgery.Reaction { get key() { return "foreskinTuck"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/freshOvaries.js b/js/medicine/surgery/reaction/freshOvaries.js index 9bc9f5a47165e5495d90389ca5f9dbb7ebfe0c03..72a223c966aca8546c666235ac10c38f4a8313c6 100644 --- a/js/medicine/surgery/reaction/freshOvaries.js +++ b/js/medicine/surgery/reaction/freshOvaries.js @@ -2,8 +2,8 @@ class FreshOvaries extends App.Medicine.Surgery.Reaction { get key() { return "freshOvaries"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/fuckdoll.js b/js/medicine/surgery/reaction/fuckdoll.js index 3e37ba1027add70a760ecbfc96e5628c8fcb7d78..2eae08d38d639e4dbd912093663f75c2225d5d24 100644 --- a/js/medicine/surgery/reaction/fuckdoll.js +++ b/js/medicine/surgery/reaction/fuckdoll.js @@ -21,8 +21,8 @@ return r; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, sister, wife} = getPronouns(slave); const relations = V.slaves.filter((s) => areRelated(s, slave) && (s.ID !== slave.relationshipTarget)); let r = []; diff --git a/js/medicine/surgery/reaction/fuckdollExtraction.js b/js/medicine/surgery/reaction/fuckdollExtraction.js index 9ec9c26d6fbbf81effd8e8220274a1ea810ce167..f782591a350680e82f7bb364a2b9c67de6360a08 100644 --- a/js/medicine/surgery/reaction/fuckdollExtraction.js +++ b/js/medicine/surgery/reaction/fuckdollExtraction.js @@ -16,8 +16,8 @@ return r; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; r.push(`If you were expecting a great return to humanity after extracting ${him} from ${his} Fuckdoll suit, you're to be disappointed.`); diff --git a/js/medicine/surgery/reaction/geld.js b/js/medicine/surgery/reaction/geld.js index df1a0d50361daabbb8b96d7c1c1b732485571b39..4beca584b6933a70e932abb4f627074b7b6168e4 100644 --- a/js/medicine/surgery/reaction/geld.js +++ b/js/medicine/surgery/reaction/geld.js @@ -2,8 +2,8 @@ class Geld extends App.Medicine.Surgery.Reaction { get key() { return "geld"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/herm.js b/js/medicine/surgery/reaction/herm.js index 33618c5a373d75823056b0ecf025c53ffb48e2ad..87000a768384a050e20201b175c4575f16f052e7 100644 --- a/js/medicine/surgery/reaction/herm.js +++ b/js/medicine/surgery/reaction/herm.js @@ -2,8 +2,8 @@ class Herm extends App.Medicine.Surgery.Reaction { get key() { return "herm"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const {he: heP} = getPronouns(V.PC); const r = []; diff --git a/js/medicine/surgery/reaction/horn.js b/js/medicine/surgery/reaction/horn.js index 31e3c22070b9d63cee673ede1d0d127fabe3b227..0b0c91b7279b8697cbf470ee8bcd450897aa324f 100644 --- a/js/medicine/surgery/reaction/horn.js +++ b/js/medicine/surgery/reaction/horn.js @@ -2,8 +2,8 @@ class Horn extends App.Medicine.Surgery.Reaction { get key() { return "horn"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/hornGone.js b/js/medicine/surgery/reaction/hornGone.js index 96d62f480104f783baefc0e861eb1a456b146949..7127c8b0f9da2821f633005fa9e6363388f84d16 100644 --- a/js/medicine/surgery/reaction/hornGone.js +++ b/js/medicine/surgery/reaction/hornGone.js @@ -2,8 +2,8 @@ class HornGone extends App.Medicine.Surgery.Reaction { get key() { return "hornGone"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/insemination.js b/js/medicine/surgery/reaction/insemination.js index d8ea79990593b2fe8040a60fb170cb4da081404a..7a35cdb6828c02c4657da5b7d25876ed50bbe25e 100644 --- a/js/medicine/surgery/reaction/insemination.js +++ b/js/medicine/surgery/reaction/insemination.js @@ -6,8 +6,8 @@ get permanentChanges() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/labiaplasty.js b/js/medicine/surgery/reaction/labiaplasty.js index 87a8f5a5d75fae34669c7bbce3235b65792b5203..a4480fe5d39d6f2f5cda4222004e23f960f8fee8 100644 --- a/js/medicine/surgery/reaction/labiaplasty.js +++ b/js/medicine/surgery/reaction/labiaplasty.js @@ -2,8 +2,8 @@ class Labiaplasty extends App.Medicine.Surgery.Reaction { get key() { return "labiaplasty"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/lactation.js b/js/medicine/surgery/reaction/lactation.js index f19997830ea860e0e825aff15606155d7d5ed8ad..c6e99eac5e82f370581ba78e9d20f583b6a320c5 100644 --- a/js/medicine/surgery/reaction/lactation.js +++ b/js/medicine/surgery/reaction/lactation.js @@ -2,8 +2,8 @@ class Lactation extends App.Medicine.Surgery.Reaction { get key() { return "lactation"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/lipo.js b/js/medicine/surgery/reaction/lipo.js index 4d15e32d08cd9ad894764bcf3f1763c82a9e1e34..535413ef1ba0fd2a129a5635b21c86f253382725 100644 --- a/js/medicine/surgery/reaction/lipo.js +++ b/js/medicine/surgery/reaction/lipo.js @@ -2,8 +2,8 @@ class Lipo extends App.Medicine.Surgery.Reaction { get key() { return "lipo"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/liposuction.js b/js/medicine/surgery/reaction/liposuction.js index 5b1829e0bccffcde0283f65b001abed0ee3f49c8..6e7cd41e9cfb65f75d524a36bb67924d66e32648 100644 --- a/js/medicine/surgery/reaction/liposuction.js +++ b/js/medicine/surgery/reaction/liposuction.js @@ -2,8 +2,8 @@ class Liposuction extends App.Medicine.Surgery.Reaction { get key() { return "liposuction"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/lips.js b/js/medicine/surgery/reaction/lips.js index 801dc62b813965a68ebb7b84f650c41722c381e9..d790a1be1bcefb83f9d91db15fd1c5fdf26058e8 100644 --- a/js/medicine/surgery/reaction/lips.js +++ b/js/medicine/surgery/reaction/lips.js @@ -2,8 +2,8 @@ class Lips extends App.Medicine.Surgery.Reaction { get key() { return "lips"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/maleToFemale.js b/js/medicine/surgery/reaction/maleToFemale.js index 0f187848e9514814b8d81767940edb85c485c2df..48b2aaa24946ffdccc802dd9c3716855527cfe43 100644 --- a/js/medicine/surgery/reaction/maleToFemale.js +++ b/js/medicine/surgery/reaction/maleToFemale.js @@ -2,8 +2,8 @@ class MaletoFemale extends App.Medicine.Surgery.Reaction { get key() { return "mtf"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mastectomy.js b/js/medicine/surgery/reaction/mastectomy.js index 91c897c3b09934d2510647f2737dc6d00ad9dddb..f0acf350dc175157a9e8aeee4a5b3e7430257a0a 100644 --- a/js/medicine/surgery/reaction/mastectomy.js +++ b/js/medicine/surgery/reaction/mastectomy.js @@ -2,8 +2,8 @@ class Mastectomy extends App.Medicine.Surgery.Reaction { get key() { return "mastectomy"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mastectomyPlus.js b/js/medicine/surgery/reaction/mastectomyPlus.js index 94f54aaad50ae21b4c4058a3ed33c4c619d2d92e..e1223d403c76d7ae86650c5c43c79b215297a96d 100644 --- a/js/medicine/surgery/reaction/mastectomyPlus.js +++ b/js/medicine/surgery/reaction/mastectomyPlus.js @@ -2,8 +2,8 @@ class MastectomyPlus extends App.Medicine.Surgery.Reaction { get key() { return "mastectomy+"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mindbreak.js b/js/medicine/surgery/reaction/mindbreak.js index 5a8af13da0e5cfa172fe9cf9cff257f295cfd8cf..c3a63cc8d3610f88ce62350d6a0921c27120127b 100644 --- a/js/medicine/surgery/reaction/mindbreak.js +++ b/js/medicine/surgery/reaction/mindbreak.js @@ -4,8 +4,8 @@ get removeJob() { return true; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, His, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mpreg.js b/js/medicine/surgery/reaction/mpreg.js index 4ef887f510a33a9a15bec49cf3dc67aa5562447e..7152eda77f2e2fb8cc5a4021ccabbf9f4e552e25 100644 --- a/js/medicine/surgery/reaction/mpreg.js +++ b/js/medicine/surgery/reaction/mpreg.js @@ -2,8 +2,8 @@ class MPreg extends App.Medicine.Surgery.Reaction { get key() { return "mpreg"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mpregRemoved.js b/js/medicine/surgery/reaction/mpregRemoved.js index f646617d009f6bd252cc01b6dac2a28c6526bd56..5b22f1d9629bb94619edb04fc74af4028489d875 100644 --- a/js/medicine/surgery/reaction/mpregRemoved.js +++ b/js/medicine/surgery/reaction/mpregRemoved.js @@ -2,8 +2,8 @@ class MPregRemoved extends App.Medicine.Surgery.Reaction { get key() { return "mpreg removed"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/mute.js b/js/medicine/surgery/reaction/mute.js index 8874edca4fb2e9969f7a1f4eff8f361a3d278983..9bc41e03476ab1f30fb78b11af9dfd6cc688e4fc 100644 --- a/js/medicine/surgery/reaction/mute.js +++ b/js/medicine/surgery/reaction/mute.js @@ -2,8 +2,8 @@ class Mute extends App.Medicine.Surgery.Reaction { get key() { return "mute"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/newEars.js b/js/medicine/surgery/reaction/newEars.js index b4cb684f1c89370c15e985c8a2d9a2fcf84a4a02..0eb0d39613121145b39c51378d02d3c4d7e1d1b2 100644 --- a/js/medicine/surgery/reaction/newEars.js +++ b/js/medicine/surgery/reaction/newEars.js @@ -2,8 +2,8 @@ class NewEars extends App.Medicine.Surgery.Reaction { get key() { return "newEars"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/newEyes.js b/js/medicine/surgery/reaction/newEyes.js index c8d37f82f442a24a19b1df29e2704dae5d55d6cf..b9213bfd677acc61a337f0476968add2caad12ad 100644 --- a/js/medicine/surgery/reaction/newEyes.js +++ b/js/medicine/surgery/reaction/newEyes.js @@ -2,8 +2,8 @@ class NewEyes extends App.Medicine.Surgery.Reaction { get key() { return "newEyes"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/newVoice.js b/js/medicine/surgery/reaction/newVoice.js index dce1e1b7f3a69f47f3e77445cc6a24a48a0d033b..711e47b36a7acdd2db43a7609bcc043ab850ea3e 100644 --- a/js/medicine/surgery/reaction/newVoice.js +++ b/js/medicine/surgery/reaction/newVoice.js @@ -2,8 +2,8 @@ class NewVoice extends App.Medicine.Surgery.Reaction { get key() { return "newVoice"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/nippleCunts.js b/js/medicine/surgery/reaction/nippleCunts.js index 453de0b60632acbffdc508db6de6e167c971fc46..838471ca4429331e78b7ace257a9ccd1552f764c 100644 --- a/js/medicine/surgery/reaction/nippleCunts.js +++ b/js/medicine/surgery/reaction/nippleCunts.js @@ -2,8 +2,8 @@ class NippleCunts extends App.Medicine.Surgery.Reaction { get key() { return "nippleCunts"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/noneToFemale.js b/js/medicine/surgery/reaction/noneToFemale.js index e1ba89f0878c9af81ab1630ded6459e40f2d1872..5ba77dba98376993c3b0c433652d58aaad055277 100644 --- a/js/medicine/surgery/reaction/noneToFemale.js +++ b/js/medicine/surgery/reaction/noneToFemale.js @@ -2,8 +2,8 @@ class NoneToFemale extends App.Medicine.Surgery.Reaction { get key() { return "ntf"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself, hers} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/ocularImplant.js b/js/medicine/surgery/reaction/ocularImplant.js index b87247a9e7e35b43f844cd5467b3b98a645b7b9d..c477c4af3dcbdca05a2c2b808040e3c4d808893e 100644 --- a/js/medicine/surgery/reaction/ocularImplant.js +++ b/js/medicine/surgery/reaction/ocularImplant.js @@ -2,8 +2,8 @@ class OcularImplant extends App.Medicine.Surgery.Reaction { get key() { return "ocular implant"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/ocularImplantForBlind.js b/js/medicine/surgery/reaction/ocularImplantForBlind.js index 44fe5fb1861e495826b194fffa7c693daedd243c..1b78e510901a2ce08cb3eaa3d62d58dd499c9911 100644 --- a/js/medicine/surgery/reaction/ocularImplantForBlind.js +++ b/js/medicine/surgery/reaction/ocularImplantForBlind.js @@ -2,8 +2,8 @@ class OcularImplantForBlind extends App.Medicine.Surgery.Reaction { get key() { return "ocular implant for blind"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; r.push(`The implant surgery is <span class="health dec">invasive</span> and ${he} spends some time in the autosurgery recovering. As soon as ${he} is allowed to open ${his} eyes and look around, ${his} gaze flicks from object to object with manic speed as ${his} new eyes deliver nearly overwhelming amount of visual information. Seeing the world as it is is a gift that those who do not need it cannot properly understand.`); diff --git a/js/medicine/surgery/reaction/oral.js b/js/medicine/surgery/reaction/oral.js index 082f818b0524677d687ce3084d2e29bf9dc1326e..13cc9de8abfa3ef02a109d04d5db441077ad251d 100644 --- a/js/medicine/surgery/reaction/oral.js +++ b/js/medicine/surgery/reaction/oral.js @@ -2,8 +2,8 @@ class Oral extends App.Medicine.Surgery.Reaction { get key() { return "oral"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/ovaImplantChanged.js b/js/medicine/surgery/reaction/ovaImplantChanged.js index 1b41538b9a15bb28794d915794a3f70265dfa532..6943d9fc3e944d573b324c522f93c21f59ef20fb 100644 --- a/js/medicine/surgery/reaction/ovaImplantChanged.js +++ b/js/medicine/surgery/reaction/ovaImplantChanged.js @@ -2,8 +2,8 @@ class OvaImplantChanged extends App.Medicine.Surgery.Reaction { get key() { return "ovaImplant changed"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/pLimbInterface.js b/js/medicine/surgery/reaction/pLimbInterface.js index 4b1e1a909ba1aad242d25cd3234b26cc960e7259..20038351b0cfb5688c3a393ff68cbeeb75251d70 100644 --- a/js/medicine/surgery/reaction/pLimbInterface.js +++ b/js/medicine/surgery/reaction/pLimbInterface.js @@ -2,8 +2,8 @@ class PLimbInterface extends App.Medicine.Surgery.Reaction { get key() { return "PLimb interface"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const r = []; V.nextButton = " "; diff --git a/js/medicine/surgery/reaction/pLimbInterface1.js b/js/medicine/surgery/reaction/pLimbInterface1.js index 16020fdff6a3598880fca27afa181b4b4b9cd479..d694c871280286cb7bfe2ab86d747be54dad0a23 100644 --- a/js/medicine/surgery/reaction/pLimbInterface1.js +++ b/js/medicine/surgery/reaction/pLimbInterface1.js @@ -2,8 +2,8 @@ class PLimbInterface1 extends App.Medicine.Surgery.Reaction { get key() { return "PLimb interface1"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, hers} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/pLimbInterface2.js b/js/medicine/surgery/reaction/pLimbInterface2.js index f7756b3c1682db934d82860f5692c4b8557faea8..57d26f7859228de88e23e9cc9de8b168d6b08146 100644 --- a/js/medicine/surgery/reaction/pLimbInterface2.js +++ b/js/medicine/surgery/reaction/pLimbInterface2.js @@ -2,8 +2,8 @@ class PLimbInterface2 extends App.Medicine.Surgery.Reaction { get key() { return "PLimb interface2"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, hers} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/pLimbInterface3.js b/js/medicine/surgery/reaction/pLimbInterface3.js index 475ac751248a1475aa2e3a820578570c5ba5ab86..3d7bbb1430323bfb1b6487cfb92ecb9607572f78 100644 --- a/js/medicine/surgery/reaction/pLimbInterface3.js +++ b/js/medicine/surgery/reaction/pLimbInterface3.js @@ -2,8 +2,8 @@ class PLimbInterface3 extends App.Medicine.Surgery.Reaction { get key() { return "PLimb interface3"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, hers, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/precum.js b/js/medicine/surgery/reaction/precum.js index 07f4a0464b603ea6833464371299d7ccba7db6bc..8c330a430f73f3af0e013f890dad0f585a7a6b26 100644 --- a/js/medicine/surgery/reaction/precum.js +++ b/js/medicine/surgery/reaction/precum.js @@ -2,8 +2,8 @@ class Precum extends App.Medicine.Surgery.Reaction { get key() { return "precum"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/preg.js b/js/medicine/surgery/reaction/preg.js index 3ff922700a1d6f8a324c7967d205a2329b29071f..15ab52579bf4a17602010159dd3ca79fc2326387 100644 --- a/js/medicine/surgery/reaction/preg.js +++ b/js/medicine/surgery/reaction/preg.js @@ -2,8 +2,8 @@ class Preg extends App.Medicine.Surgery.Reaction { get key() { return "preg"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); let r = []; diff --git a/js/medicine/surgery/reaction/preg1hack.js b/js/medicine/surgery/reaction/preg1hack.js index e3951e9ffd8183d90fa63b8f51a523f7af272392..fef10868dd85b7136d43bf5394d4bcabde4356e3 100644 --- a/js/medicine/surgery/reaction/preg1hack.js +++ b/js/medicine/surgery/reaction/preg1hack.js @@ -2,8 +2,8 @@ class Preg1Hack extends App.Medicine.Surgery.Reaction { get key() { return "preg1hack"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/pregRemove.js b/js/medicine/surgery/reaction/pregRemove.js index 7c5529c747b8b9cb37e508064200f38e9960fccb..89e0b099b4a0c6d37f4035cf7da2e991e62555a8 100644 --- a/js/medicine/surgery/reaction/pregRemove.js +++ b/js/medicine/surgery/reaction/pregRemove.js @@ -2,8 +2,8 @@ class PregRemove extends App.Medicine.Surgery.Reaction { get key() { return "pregRemove"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/prostate.js b/js/medicine/surgery/reaction/prostate.js index 32f06d7d03894c153e110b928f35b73512624ccb..664c7b532dbdf54822a64290d655f1a13a27f667 100644 --- a/js/medicine/surgery/reaction/prostate.js +++ b/js/medicine/surgery/reaction/prostate.js @@ -2,8 +2,8 @@ class Prostate extends App.Medicine.Surgery.Reaction { get key() { return "prostate"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/race.js b/js/medicine/surgery/reaction/race.js index 238ff4e3663fe261b929222242a7f476f3c74b24..af852fa640e30641c9f0e56e2b1b52c6294cf731 100644 --- a/js/medicine/surgery/reaction/race.js +++ b/js/medicine/surgery/reaction/race.js @@ -2,8 +2,8 @@ class Race extends App.Medicine.Surgery.Reaction { get key() { return "race"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/relocate.js b/js/medicine/surgery/reaction/relocate.js index 27d75ed661eb6645e1d3c73832ac28b6c67dea80..e8dc27bb9e24e9d6090fcdc6458af27f3d2a7eb6 100644 --- a/js/medicine/surgery/reaction/relocate.js +++ b/js/medicine/surgery/reaction/relocate.js @@ -2,8 +2,8 @@ class Relocate extends App.Medicine.Surgery.Reaction { get key() { return "relocate"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/removeBraces.js b/js/medicine/surgery/reaction/removeBraces.js index 5b35aa2c9c73e8dc45c6fc4b2cc56d021379223f..81afca27be3671fa1adeae4bb471763d29124352 100644 --- a/js/medicine/surgery/reaction/removeBraces.js +++ b/js/medicine/surgery/reaction/removeBraces.js @@ -6,8 +6,8 @@ get permanentChanges() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/removeCosmeticBraces.js b/js/medicine/surgery/reaction/removeCosmeticBraces.js index 29276eda4d4e292e91e8f243f60d25935fe859de..979b9c66528f864d726f047b32e5227037ffb005 100644 --- a/js/medicine/surgery/reaction/removeCosmeticBraces.js +++ b/js/medicine/surgery/reaction/removeCosmeticBraces.js @@ -6,8 +6,8 @@ get permanentChanges() { return false; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/resmell.js b/js/medicine/surgery/reaction/resmell.js index 6924d60d5097a5559a70e41ae80484c73aff1a37..53d8485fed73f328d397a016c92a759b2393e656 100644 --- a/js/medicine/surgery/reaction/resmell.js +++ b/js/medicine/surgery/reaction/resmell.js @@ -2,8 +2,8 @@ class Resmell extends App.Medicine.Surgery.Reaction { get key() { return "resmell"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/restoreHairBrow.js b/js/medicine/surgery/reaction/restoreHairBrow.js index 73af6f18f374fde6877609abed308b8ab0f81e1a..8c28dca9110b8ed1b2461bd99992162f4b317646 100644 --- a/js/medicine/surgery/reaction/restoreHairBrow.js +++ b/js/medicine/surgery/reaction/restoreHairBrow.js @@ -7,8 +7,8 @@ return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`]; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/restoreHairHead.js b/js/medicine/surgery/reaction/restoreHairHead.js index f68528a327a3491bbad29a2329ee07861395d2db..2f685824921a291f3d203faa129955f4616b3939 100644 --- a/js/medicine/surgery/reaction/restoreHairHead.js +++ b/js/medicine/surgery/reaction/restoreHairHead.js @@ -7,8 +7,8 @@ return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`]; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/restoreHairPits.js b/js/medicine/surgery/reaction/restoreHairPits.js index 018b1970fcaa8a9894ba019442ad322905fe1c03..f844dd361cffcc84e0d9023a5040092482fed404 100644 --- a/js/medicine/surgery/reaction/restoreHairPits.js +++ b/js/medicine/surgery/reaction/restoreHairPits.js @@ -7,8 +7,8 @@ return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`]; } - reaction(slave) { - const reaction = super.reaction(slave); + 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 = []; diff --git a/js/medicine/surgery/reaction/restoreHairPubes.js b/js/medicine/surgery/reaction/restoreHairPubes.js index cf9b95450332646ea3980887f1031f9964f34ea2..48491a9ca32d46e1406696ee5abfa92e32ab14b1 100644 --- a/js/medicine/surgery/reaction/restoreHairPubes.js +++ b/js/medicine/surgery/reaction/restoreHairPubes.js @@ -7,8 +7,8 @@ return [`As the remote surgery's long recovery cycle completes, ${slave.slaveName} begins to stir.`]; } - reaction(slave) { - const reaction = super.reaction(slave); + 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 = []; diff --git a/js/medicine/surgery/reaction/restoreVoice.js b/js/medicine/surgery/reaction/restoreVoice.js index 149e95d55befcc206f2180cf7249cee04e23971d..3ad5537d80d07dac9c71452dc2aa9c9360ac7797 100644 --- a/js/medicine/surgery/reaction/restoreVoice.js +++ b/js/medicine/surgery/reaction/restoreVoice.js @@ -2,8 +2,8 @@ class RestoreVoice extends App.Medicine.Surgery.Reaction { get key() { return "restoreVoice"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/retaste.js b/js/medicine/surgery/reaction/retaste.js index a4129427a0c1cefd974bf0c714f45a49bca2d6a7..df86d09cbf40115bfad7535912c52eeedb7cd783 100644 --- a/js/medicine/surgery/reaction/retaste.js +++ b/js/medicine/surgery/reaction/retaste.js @@ -2,8 +2,8 @@ class Retaste extends App.Medicine.Surgery.Reaction { get key() { return "retaste"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/retrogradeVirusInjectionNCS.js b/js/medicine/surgery/reaction/retrogradeVirusInjectionNCS.js index 02c467c9196236c89ef83636cd72c35901f6338b..79290c761710ec10ddfb80ad5020b1622829dbe4 100644 --- a/js/medicine/surgery/reaction/retrogradeVirusInjectionNCS.js +++ b/js/medicine/surgery/reaction/retrogradeVirusInjectionNCS.js @@ -2,8 +2,8 @@ class RetrogradeVirusInjectionNCS extends App.Medicine.Surgery.Reaction { get key() { return "retrograde virus injection NCS"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const pubertyAge = Math.min(slave.pubertyAgeXX, slave.pubertyAgeXY); const genitalChanges = []; diff --git a/js/medicine/surgery/reaction/ribs.js b/js/medicine/surgery/reaction/ribs.js index 397c64cf0fada24cee9d889fea539b8e4848c9db..bc4aaabbbcd03bdd6f30f624edd5ad0fe4e89b31 100644 --- a/js/medicine/surgery/reaction/ribs.js +++ b/js/medicine/surgery/reaction/ribs.js @@ -2,8 +2,8 @@ class Ribs extends App.Medicine.Surgery.Reaction { get key() { return "ribs"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/scrotalTuck.js b/js/medicine/surgery/reaction/scrotalTuck.js index c108746d120afd1a9b01bd4657a81886b56ebf66..c6dd71d3de6518c1c1514da40eb623d186c51138 100644 --- a/js/medicine/surgery/reaction/scrotalTuck.js +++ b/js/medicine/surgery/reaction/scrotalTuck.js @@ -2,8 +2,8 @@ class ScrotalTuck extends App.Medicine.Surgery.Reaction { get key() { return "scrotalTuck"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/sharp.js b/js/medicine/surgery/reaction/sharp.js index 6e4cf8a167fa6633435b7f5057159de4867f5219..213349656ada96660049199b08a7da16b30b00ad 100644 --- a/js/medicine/surgery/reaction/sharp.js +++ b/js/medicine/surgery/reaction/sharp.js @@ -2,8 +2,8 @@ class Sharp extends App.Medicine.Surgery.Reaction { get key() { return "sharp"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/sterilize.js b/js/medicine/surgery/reaction/sterilize.js index e5c089faac52c98bb3637402f774f01abc9a9d79..475c43a3e84153353233e2971a42ded0e519689d 100644 --- a/js/medicine/surgery/reaction/sterilize.js +++ b/js/medicine/surgery/reaction/sterilize.js @@ -2,8 +2,8 @@ class Sterilize extends App.Medicine.Surgery.Reaction { get key() { return "ster"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/tailInterface.js b/js/medicine/surgery/reaction/tailInterface.js index 42a5c303c1bae1a8152694b7502da99b07b326fe..591047ec685946624caf4d43f3ad33c79679c9fb 100644 --- a/js/medicine/surgery/reaction/tailInterface.js +++ b/js/medicine/surgery/reaction/tailInterface.js @@ -2,8 +2,8 @@ class TailInterface extends App.Medicine.Surgery.Reaction { get key() { return "tailInterface"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/teeth.js b/js/medicine/surgery/reaction/teeth.js index 0e89280c6363f521880b1dd2448ae172143f7e02..40d1c81b5a9eb14a1c8b1a27718ee2d5cd2bf50f 100644 --- a/js/medicine/surgery/reaction/teeth.js +++ b/js/medicine/surgery/reaction/teeth.js @@ -2,8 +2,8 @@ class Teeth extends App.Medicine.Surgery.Reaction { get key() { return "teeth"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/treatment.js b/js/medicine/surgery/reaction/treatment.js index a169bf8f17629755e0848b0f9d9dc5b25227142c..fac094c49e32c7e5211458ffe57119cbbbc08699 100644 --- a/js/medicine/surgery/reaction/treatment.js +++ b/js/medicine/surgery/reaction/treatment.js @@ -3,8 +3,8 @@ // unifies "elasticity treatment", "immortality treatment" and "gene treatment" get key() { return "gene treatment"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/tummyTuck.js b/js/medicine/surgery/reaction/tummyTuck.js index fe658950dec84b9bbca8d0735ec863370aa2f906..3ea39e57162b278a90e9ed8563a95dd0870d5a85 100644 --- a/js/medicine/surgery/reaction/tummyTuck.js +++ b/js/medicine/surgery/reaction/tummyTuck.js @@ -2,8 +2,8 @@ class TummyTuck extends App.Medicine.Surgery.Reaction { get key() { return "tummyTuck"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/unblind.js b/js/medicine/surgery/reaction/unblind.js index 4ef399825c45ede7821ea337ea4d0f45a3924606..b4d911f4adf72349a5b379302bf4c275d5afc064 100644 --- a/js/medicine/surgery/reaction/unblind.js +++ b/js/medicine/surgery/reaction/unblind.js @@ -2,8 +2,8 @@ class Unblind extends App.Medicine.Surgery.Reaction { get key() { return "unblind"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; r.push(`The eye surgery is <span class="health dec">invasive</span> and ${he} spends some time in the autosurgery recovering. As soon as ${he} is allowed to open ${his} eyes and look around, ${his} gaze flicks from object to object with manic speed as ${he} processes ${his} new vision. Seeing the world as it is is a gift that those who do not need it cannot properly understand.`); diff --git a/js/medicine/surgery/reaction/undeafen.js b/js/medicine/surgery/reaction/undeafen.js index 842aa16cf3e3e860ad2bdc99ee32ab5e3fefd209..9ace8a302d59230cd856843d756d4065af4a6705 100644 --- a/js/medicine/surgery/reaction/undeafen.js +++ b/js/medicine/surgery/reaction/undeafen.js @@ -2,8 +2,8 @@ class Undeafen extends App.Medicine.Surgery.Reaction { get key() { return "undeafen"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; r.push(`The inner ear surgery is <span class="health dec">invasive</span> and ${he} spends some time in the autosurgery recovering. As soon as the bandages around ${his} ears are removed, ${his} head tilts towards any source of sound with manic speed as ${he} processes ${his} new hearing. Hearing the world as it is is a gift that those who do not need it cannot properly understand.`); diff --git a/js/medicine/surgery/reaction/vagina.js b/js/medicine/surgery/reaction/vagina.js index cd5087e75255f40870bc0410f189c6c3df769e14..618caf6670724af6e9d5cb2c41f90664fa917bf8 100644 --- a/js/medicine/surgery/reaction/vagina.js +++ b/js/medicine/surgery/reaction/vagina.js @@ -2,8 +2,8 @@ class Vagina extends App.Medicine.Surgery.Reaction { get key() { return "vagina"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/vaginalRemoval.js b/js/medicine/surgery/reaction/vaginalRemoval.js index dd78d84a4055d98c86501ae4e42cc8be0f47a93d..d4b6537d73a953d8e46b0a4c445aa9b6d56399c4 100644 --- a/js/medicine/surgery/reaction/vaginalRemoval.js +++ b/js/medicine/surgery/reaction/vaginalRemoval.js @@ -2,8 +2,8 @@ class VaginaRemoval extends App.Medicine.Surgery.Reaction { get key() { return "vaginaRemoval"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him, himself} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/vasectomy.js b/js/medicine/surgery/reaction/vasectomy.js index db71e80a7a2df59e50c89e0b20811ed7d4d5c7a9..8b3d5086a13de22e4e34b15209329eb54c7e2025 100644 --- a/js/medicine/surgery/reaction/vasectomy.js +++ b/js/medicine/surgery/reaction/vasectomy.js @@ -2,8 +2,8 @@ class Vasectomy extends App.Medicine.Surgery.Reaction { get key() { return "vasectomy"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/vasectomyUndo.js b/js/medicine/surgery/reaction/vasectomyUndo.js index 6a1248601caca3012cfbfe3e1ce5ca1d12ae937e..714145dd43c09f67f26f7422f1158b4011cc83fd 100644 --- a/js/medicine/surgery/reaction/vasectomyUndo.js +++ b/js/medicine/surgery/reaction/vasectomyUndo.js @@ -2,8 +2,8 @@ class VasectomyUndo extends App.Medicine.Surgery.Reaction { get key() { return "vasectomy undo"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/voiceLower.js b/js/medicine/surgery/reaction/voiceLower.js index 6c681158656cdb89337bde79d861010da74637bb..af789d351f37d78323fcf5fceaf3efd5bf66daa6 100644 --- a/js/medicine/surgery/reaction/voiceLower.js +++ b/js/medicine/surgery/reaction/voiceLower.js @@ -2,8 +2,8 @@ class VoiceLower extends App.Medicine.Surgery.Reaction { get key() { return "voice2"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself, hers} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/voiceRaise.js b/js/medicine/surgery/reaction/voiceRaise.js index 3c06e2c7eb5659bd23cbc9d8b9ad1102239504e4..14a4666387002fcc12e60aa659adfbd67c63163f 100644 --- a/js/medicine/surgery/reaction/voiceRaise.js +++ b/js/medicine/surgery/reaction/voiceRaise.js @@ -2,8 +2,8 @@ class VoiceRaise extends App.Medicine.Surgery.Reaction { get key() { return "voice"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him, himself, hers} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/reaction/womb.js b/js/medicine/surgery/reaction/womb.js index 5a40a650f43692b8f63afb143eba4146f44a4b8f..3970231e394509f07608d824447a0284ba6f56e4 100644 --- a/js/medicine/surgery/reaction/womb.js +++ b/js/medicine/surgery/reaction/womb.js @@ -2,8 +2,8 @@ class Womb extends App.Medicine.Surgery.Reaction { get key() { return "womb"; } - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {he, his, him} = getPronouns(slave); const r = []; diff --git a/js/medicine/surgery/structural/heels.js b/js/medicine/surgery/structural/heels.js index 924b170407dce8671b77df09ba20886bb359c207..32dc4cc9e5a70debe9384cc11aeb4de992e93022 100644 --- a/js/medicine/surgery/structural/heels.js +++ b/js/medicine/surgery/structural/heels.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.ShortenTendons = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, His, his, him} = getPronouns(slave); const r = []; @@ -41,8 +41,8 @@ App.Medicine.Surgery.Reactions.ShortenTendons = class extends App.Medicine.Surge }; App.Medicine.Surgery.Reactions.ReplaceTendons = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -65,16 +65,16 @@ App.Medicine.Surgery.Procedures.ShortenTendons = class extends App.Medicine.Surg get name() { return "Shorten tendons"; } get description() { - const {him} = getPronouns(this.slave); + 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 new App.Medicine.Surgery.Reactions.ShortenTendons(); + this._slave.heels = 1; + this._slave.shoes = "heels"; + return this._assemble(new App.Medicine.Surgery.Reactions.ShortenTendons()); } }; @@ -85,8 +85,8 @@ App.Medicine.Surgery.Procedures.ReplaceTendons = class extends App.Medicine.Surg get healthCost() { return 10; } apply(cheat) { - this.slave.heels = 0; - this.slave.shoes = "none"; - return new App.Medicine.Surgery.Reactions.ReplaceTendons(); + this._slave.heels = 0; + this._slave.shoes = "none"; + return this._assemble(new App.Medicine.Surgery.Reactions.ReplaceTendons()); } }; diff --git a/js/medicine/surgery/structural/height.js b/js/medicine/surgery/structural/height.js index 0ca2bc438f38cbe117f1158fa6c89a71f6aa3096..ec9af2f59533488545342c527d709ddbc04b440d 100644 --- a/js/medicine/surgery/structural/height.js +++ b/js/medicine/surgery/structural/height.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.Height = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -25,11 +25,11 @@ App.Medicine.Surgery.Reactions.Height = class extends App.Medicine.Surgery.Simpl App.Medicine.Surgery.Procedures.IncreaseHeight = class extends App.Medicine.Surgery.Procedure { get name() { - if (this.slave.heightImplant === 0) { + if (this._slave.heightImplant === 0) { return "Lengthen major bones"; - } else if (this.slave.heightImplant >= 1) { + } else if (this._slave.heightImplant >= 1) { return "Advanced height gain surgery"; - } else if (this.slave.heightImplant === -1) { + } else if (this._slave.heightImplant === -1) { return "Reverse existing height surgery"; } else { return "Revert a stage of existing height surgery"; @@ -39,20 +39,20 @@ App.Medicine.Surgery.Procedures.IncreaseHeight = class extends App.Medicine.Surg get healthCost() { return 40; } apply(cheat) { - this.slave.heightImplant += 1; - this.slave.height += 10; - return new App.Medicine.Surgery.Reactions.ShortenTendons(); + 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) { + if (this._slave.heightImplant === 0) { return "Shorten major bones"; - } else if (this.slave.heightImplant <= -1) { + } else if (this._slave.heightImplant <= -1) { return "Advanced height reduction surgery"; - } else if (this.slave.heightImplant === 1) { + } else if (this._slave.heightImplant === 1) { return "Reverse existing height surgery"; } else { return "Revert a stage of existing height surgery"; @@ -62,8 +62,8 @@ App.Medicine.Surgery.Procedures.DecreaseHeight = class extends App.Medicine.Surg get healthCost() { return 40; } apply(cheat) { - this.slave.heightImplant -= 1; - this.slave.height -= 10; - return new App.Medicine.Surgery.Reactions.ShortenTendons(); + this._slave.heightImplant -= 1; + this._slave.height -= 10; + return this._assemble(new App.Medicine.Surgery.Reactions.ShortenTendons()); } }; diff --git a/js/medicine/surgery/structural/hips.js b/js/medicine/surgery/structural/hips.js index 47b0eaee477dab002c3b2d1fa90896dc478f4006..be184d8e1d433c46531cfb77ff6aef73b81415a3 100644 --- a/js/medicine/surgery/structural/hips.js +++ b/js/medicine/surgery/structural/hips.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.Hips = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -23,26 +23,26 @@ App.Medicine.Surgery.Reactions.Hips = class extends App.Medicine.Surgery.SimpleR }; App.Medicine.Surgery.Procedures.BroadenPelvis = class extends App.Medicine.Surgery.Procedure { - get name() { return this.slave.shouldersImplant === 0 ? "Broaden pelvis" : "Advanced pelvis broadening"; } + 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 new App.Medicine.Surgery.Reactions.Hips(); + 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 name() { return this._slave.shouldersImplant === 0 ? "Narrow pelvis" : "Advanced pelvis narrowing"; } get healthCost() { return 40; } apply(cheat) { - this.slave.hipsImplant--; - this.slave.hips--; - return new App.Medicine.Surgery.Reactions.Hips(); + this._slave.hipsImplant--; + this._slave.hips--; + return this._assemble(new App.Medicine.Surgery.Reactions.Hips()); } }; diff --git a/js/medicine/surgery/structural/shoulders.js b/js/medicine/surgery/structural/shoulders.js index 587971e0095b7a023878a9cdac6b52b9a7152e40..4ebd4d154cfbd101f34af7d542f85141f92a0020 100644 --- a/js/medicine/surgery/structural/shoulders.js +++ b/js/medicine/surgery/structural/shoulders.js @@ -1,6 +1,6 @@ App.Medicine.Surgery.Reactions.Shoulders = class extends App.Medicine.Surgery.SimpleReaction { - reaction(slave) { - const reaction = super.reaction(slave); + reaction(slave, diff) { + const reaction = super.reaction(slave, diff); const {He, he, his, him} = getPronouns(slave); const r = []; @@ -24,25 +24,25 @@ App.Medicine.Surgery.Reactions.Shoulders = class extends App.Medicine.Surgery.Si 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 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 new App.Medicine.Surgery.Reactions.Shoulders(); + 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 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 new App.Medicine.Surgery.Reactions.Shoulders(); + this._slave.shouldersImplant--; + this._slave.shoulders--; + return this._assemble(new App.Medicine.Surgery.Reactions.Shoulders()); } }; diff --git a/src/js/utilsSlave.js b/src/js/utilsSlave.js index 05f7401ddcc8774b3d990b2d516ab41031648c08..8740161a1e0e2436bb0572d2553d8af9fa36f233 100644 --- a/src/js/utilsSlave.js +++ b/src/js/utilsSlave.js @@ -3009,7 +3009,11 @@ globalThis.parentNames = function(parent, child) { globalThis.faceIncrease = function(slave, amount) { const oldFace = slave.face; faceIncreaseAction(slave, amount); - return faceIncreaseDesc(slave, oldFace); + const newFace = slave.face; + slave.face = oldFace; + const desc = faceIncreaseDesc(slave, newFace); + slave.face = newFace; + return desc; }; /** @@ -3024,28 +3028,28 @@ globalThis.faceIncreaseAction = function(slave, amount) { }; /** - * Describes the slave face changes AFTER they were applied to the slave + * Describes the slave face changes BEFORE they are applied to the slave * * @param {App.Entity.SlaveState} slave - * @param {number} oldFace + * @param {number} newFace * @returns {string} */ -globalThis.faceIncreaseDesc = function(slave, oldFace) { +globalThis.faceIncreaseDesc = function(slave, newFace) { const pronouns = getPronouns(slave); const his = pronouns.possessive; const His = capFirstChar(his); let r = ""; - if (oldFace <= -95) { + if (slave.face <= -95) { r += `<span class="green">${His} face is no longer horrifying,</span> and is now merely ugly.`; - } else if (oldFace <= -40 && slave.face > -40) { + } else if (slave.face <= -40 && newFace > -40) { r += `<span class="green">${His} face is no longer ugly,</span> and is now merely unattractive.`; - } else if (oldFace <= -10 && slave.face > -10) { + } else if (slave.face <= -10 && newFace > -10) { r += `<span class="green">${His} face is no longer unattractive,</span> and is now somewhat tolerable.`; - } else if (oldFace <= 10 && slave.face > 10) { + } else if (slave.face <= 10 && newFace > 10) { r += `<span class="green">${His} face is now decently attractive,</span> rather than merely tolerable.`; - } else if (oldFace <= 40 && slave.face > 40) { + } else if (slave.face <= 40 && newFace > 40) { r += `<span class="green">${His} face is now quite beautiful,</span> rather than merely pretty.`; - } else if (oldFace <= 95 && slave.face > 95) { + } else if (slave.face <= 95 && newFace > 95) { r += `<span class="green">${His} face is now perfect.</span> It's difficult to imagine how it could be any more beautiful.`; } return r; diff --git a/src/npc/surgery/surgery.js b/src/npc/surgery/surgery.js index 28a08180ed060d80a7eb9fee2ee64357c74e7be2..4e997fe5ce4ae78d2d8303b74a3945c0a03a3029 100644 --- a/src/npc/surgery/surgery.js +++ b/src/npc/surgery/surgery.js @@ -128,7 +128,7 @@ App.Medicine.Surgery.makeObjectLink = function(passage, surgery, slave, cheat = * @param {boolean} cheat */ App.Medicine.Surgery.makeLink = function(procedure, refresh, cheat) { - const slave = procedure.slave; + const slave = procedure.originalSlave; return App.UI.DOM.link(procedure.name, apply, [], "", tooltip()); function healthCosts() { @@ -167,20 +167,32 @@ App.Medicine.Surgery.makeLink = function(procedure, refresh, cheat) { } } - const reaction = procedure.apply(cheat); - showSlaveReaction(reaction); + const [diff, reaction] = procedure.apply(cheat); + const f = makeSlaveReaction(diff, reaction); + + App.Utils.Diff.applyDiff(slave, diff); + + // Refresh the surgery options or wherever the surgery originated + refresh(); + + // Finally show the slaves reaction + Dialog.setup(procedure.name); + Dialog.append(f); + Dialog.open(); } /** + * @param {Partial<App.Entity.SlaveState>} diff * @param {App.Medicine.Surgery.SimpleReaction} reaction + * @returns {DocumentFragment} */ - function showSlaveReaction(reaction) { + function makeSlaveReaction(diff, reaction) { const f = new DocumentFragment(); let r = []; - r.push(...reaction.intro(slave)); + r.push(...reaction.intro(slave, diff)); - const resultMain = reaction.reaction(slave); + const resultMain = reaction.reaction(slave, diff); for (const p of resultMain.longReaction) { r.push(...p); App.Events.addParagraph(f, r); @@ -189,7 +201,7 @@ App.Medicine.Surgery.makeLink = function(procedure, refresh, cheat) { slave.devotion += resultMain.devotion; slave.trust += resultMain.trust; - const resultOutro = reaction.outro(slave, resultMain); + const resultOutro = reaction.outro(slave, diff, resultMain); for (const p of resultOutro.longReaction) { r.push(...p); App.Events.addParagraph(f, r); @@ -204,13 +216,7 @@ App.Medicine.Surgery.makeLink = function(procedure, refresh, cheat) { removeJob(slave, slave.assignment); } - // Refresh the surgery options or wherever the surgery originated - refresh(); - - // Finally show the slaves reaction - Dialog.setup(procedure.name); - Dialog.append(f); - Dialog.open(); + return f; } }; diff --git a/src/npc/surgery/surgeryDegradation.js b/src/npc/surgery/surgeryDegradation.js index 8faca667bca92affea0cdc844107fc113a0f0ac0..a7983a8dd3e1d216a8fac4a7740f415a1560dd42 100644 --- a/src/npc/surgery/surgeryDegradation.js +++ b/src/npc/surgery/surgeryDegradation.js @@ -49,9 +49,9 @@ App.UI.SlaveInteract.surgeryDegradation = function(slave) { removeJob(slave, slave.assignment); } - r.push(...reaction.intro(slave)); + r.push(...reaction.intro(slave, {})); - const resultMain = reaction.reaction(slave); + const resultMain = reaction.reaction(slave, {}); for (const p of resultMain.longReaction) { r.push(...p); App.Events.addParagraph(el, r); @@ -60,7 +60,7 @@ App.UI.SlaveInteract.surgeryDegradation = function(slave) { slave.devotion += resultMain.devotion; slave.trust += resultMain.trust; - const resultOutro = reaction.outro(slave, resultMain); + const resultOutro = reaction.outro(slave, {}, resultMain); for (const p of resultOutro.longReaction) { r.push(...p); App.Events.addParagraph(el, r);