From 8f373cca90ee9a705cfb39e2fd39071d3dfa84fe Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 24 Dec 2020 18:13:50 -0500 Subject: [PATCH] use function for shoe heel height --- js/003-data/slaveWearData.js | 29 +++++++---- src/endWeek/saLongTermMentalEffects.js | 2 +- src/endWeek/saLongTermPhysicalEffects.js | 4 +- src/events/RESS/muscles.js | 2 +- src/js/eventSelectionJS.js | 4 +- src/js/slaveSummaryHelpers.js | 2 +- src/js/statsChecker/statsChecker.js | 6 +-- src/js/utilsAssessSlave.js | 8 +++ src/npc/descriptions/heels.js | 2 +- src/uncategorized/RESS.tw | 63 ++++++++++++++++++----- src/uncategorized/reStandardPunishment.tw | 6 +-- 11 files changed, 92 insertions(+), 36 deletions(-) diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index f4af5ccda94..9a55564fb54 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1136,7 +1136,7 @@ App.Data.slaveWear = { * @property {FC.FutureSociety} [fs] Automatically unlocked with this FS. * @property {boolean} [requirements] * @property {boolean} [harsh] - * @property {boolean} [highHeels] Allows slaves who have had tendons cut to walk. + * @property {0|1|2|3} highHeels Allows slaves who have had tendons cut to walk. * @property {boolean} [boostsHeight] */ @@ -1144,32 +1144,42 @@ App.Data.slaveWear = { * @type {Map<string, slaveShoes>} slaveShoesCategory */ App.Data.shoes = new Map([ // TODO: add lift property - ["none", {name: "Barefoot"}], - ["flats", {name: "Flats"}], + ["none", + { + name: "Barefoot", + highHeels: 0, + } + ], + ["flats", + { + name: "Flats", + highHeels: 0, + } + ], ["heels", { name: "Heels", - highHeels: true, + highHeels: 2, boostsHeight: true } ], ["pumps", { name: "Pumps", - highHeels: true, + highHeels: 1, boostsHeight: true } ], ["boots", { name: "Thigh boots", - highHeels: true, + highHeels: 2, } ], ["extreme heels", { name: "Painfully extreme heels", - highHeels: true, + highHeels: 3, boostsHeight: true } ], @@ -1180,6 +1190,7 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, + highHeels: 0, boostsHeight: true } ], @@ -1190,7 +1201,7 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, - highHeels: true, + highHeels: 2, boostsHeight: true } ], @@ -1201,7 +1212,7 @@ App.Data.shoes = new Map([ // TODO: add lift property get requirements() { return (V.boughtItem.shoes.heels === 1); }, - highHeels: true, + highHeels: 2, boostsHeight: true } ], diff --git a/src/endWeek/saLongTermMentalEffects.js b/src/endWeek/saLongTermMentalEffects.js index 3d9753216ac..2663995290f 100644 --- a/src/endWeek/saLongTermMentalEffects.js +++ b/src/endWeek/saLongTermMentalEffects.js @@ -1861,7 +1861,7 @@ App.SlaveAssignment.longTermMentalEffects = (function() { } } if (slave.heels === 1) { - if (!(App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels)) { + if (shoeHeelHeight(slave) === 0) { if (slave.fetish !== "submissive") { if (slave.career === "a dairy cow" || slave.career === "a breeding bull") { r.push(`${He} sees ${himself} as an animal, and as such, is perfectly content`); diff --git a/src/endWeek/saLongTermPhysicalEffects.js b/src/endWeek/saLongTermPhysicalEffects.js index f57fbca9074..96393637040 100644 --- a/src/endWeek/saLongTermPhysicalEffects.js +++ b/src/endWeek/saLongTermPhysicalEffects.js @@ -1527,7 +1527,7 @@ App.SlaveAssignment.longTermPhysicalEffects = (function() { } else { r.push(`or would be if ${he} had both legs,`); } - } else if (slave.heels === 1 && App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels) { + } else if (slave.heels === 1 && shoeHeelHeight(slave) === 0) { if (hindrances.length > 1) { r.push(`but ultimately ${his} heels having been clipped,`); } else { @@ -1546,7 +1546,7 @@ App.SlaveAssignment.longTermPhysicalEffects = (function() { r.push(`leglessness renders`); } else if ((!hasBothLegs(slave))) { r.push(`missing leg renders`); - } else if (slave.heels === 1 && !(App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels)) { + } else if (slave.heels === 1 && shoeHeelHeight(slave) === 0) { r.push(`clipped heels render`); } } diff --git a/src/events/RESS/muscles.js b/src/events/RESS/muscles.js index 0010a7e02f1..cfff88a4458 100644 --- a/src/events/RESS/muscles.js +++ b/src/events/RESS/muscles.js @@ -31,7 +31,7 @@ App.Events.RESSMuscles = class RESSMuscles extends App.Events.BaseEvent { t.push(App.UI.DOM.slaveDescriptionDialog(eventSlave)); if (!canWalk(eventSlave)) { t.push(`crawls`); - } else if ((eventSlave.shoes === "heels") || (eventSlave.shoes === "pumps") || (eventSlave.shoes === "boots") || (eventSlave.shoes === "extreme heels")) { + } else if (shoeHeelHeight(eventSlave) > 1) { t.push(`totters`); } else if (eventSlave.belly >= 10000) { t.push(`waddles`); diff --git a/src/js/eventSelectionJS.js b/src/js/eventSelectionJS.js index 4bcce09bd7d..26776515c28 100644 --- a/src/js/eventSelectionJS.js +++ b/src/js/eventSelectionJS.js @@ -429,7 +429,7 @@ globalThis.generateRandomEventPoolStandard = function(eventSlave) { if (V.slaves.length > 2) { if (eventSlave.devotion >= -20) { if (eventSlave.heels === 1) { - if ((App.Data.shoes.get(eventSlave.shoes) && App.Data.shoes.get(eventSlave.shoes).highHeels)) { + if (shoeHeelHeight(eventSlave) > 0) { V.RESSevent.push("tendon fall"); } } @@ -1657,7 +1657,7 @@ globalThis.generateRandomEventPoolServant = function(eventSlave) { if (V.slaves.length > 2) { if (eventSlave.devotion >= -20) { if (eventSlave.heels === 1) { - if (App.Data.shoes.get(eventSlave.shoes) && App.Data.shoes.get(eventSlave.shoes).highHeels) { + if (shoeHeelHeight(eventSlave) > 0) { V.RESSevent.push("tendon fall"); } } diff --git a/src/js/slaveSummaryHelpers.js b/src/js/slaveSummaryHelpers.js index a0d8db579ba..96b241039e9 100644 --- a/src/js/slaveSummaryHelpers.js +++ b/src/js/slaveSummaryHelpers.js @@ -1175,7 +1175,7 @@ App.UI.SlaveSummaryImpl = function() { * @returns {void} */ function long_shoes(slave, c) { - if (App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels) { + if (shoeHeelHeight(slave) > 0) { makeSpan(c, slave.shoes, undefined, true); } else if (slave.heels === 1) { makeSpan(c, "Crawling.", "yellow"); diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 97fdaf77cbe..432f7f3713e 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -466,7 +466,7 @@ globalThis.bimboScore = function(slave) { if (modScore.tat > 3) { degree++; } - if (App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels) { + if (shoeHeelHeight(slave) > 0) { degree++; } if (slave.skin === "sun tanned" || slave.skin === "spray tanned") { @@ -817,7 +817,7 @@ globalThis.canWalk = function(slave) { return false; } else if (tooBigBelly(slave)) { return false; - } else if (slave.heels === 1 && !(App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels)) { + } else if (slave.heels === 1 && shoeHeelHeight(slave) === 0) { return false; } return true; @@ -834,7 +834,7 @@ globalThis.canStand = function(slave) { return false; } else if (!hasAnyLegs(slave)) { return false; - } else if (slave.heels === 1 && !(App.Data.shoes.get(slave.shoes) && App.Data.shoes.get(slave.shoes).highHeels)) { + } else if (slave.heels === 1 && shoeHeelHeight(slave) === 0) { return false; } else if (tooFatSlave(slave)) { return false; diff --git a/src/js/utilsAssessSlave.js b/src/js/utilsAssessSlave.js index f42e0ad0677..269dd29b1b8 100644 --- a/src/js/utilsAssessSlave.js +++ b/src/js/utilsAssessSlave.js @@ -241,3 +241,11 @@ globalThis.canMoveToRoom = function(slave) { const partnerHasRoom = partner && assignmentVisible(partner) && partner.rules.living === "luxurious"; return partnerHasRoom || V.rooms - V.roomsPopulation >= 1; }; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +globalThis.shoeHeelHeight = function(slave) { + return App.Data.shoes.get(slave.shoes) ? App.Data.shoes.get(slave.shoes).highHeels : 0; +}; diff --git a/src/npc/descriptions/heels.js b/src/npc/descriptions/heels.js index 23b1a47a5c6..7bfc9e65f84 100644 --- a/src/npc/descriptions/heels.js +++ b/src/npc/descriptions/heels.js @@ -19,7 +19,7 @@ App.Desc.heels = function(slave, {market, eventDescription} = {}) { } r.push(`so that ${he} must wear heels in order to walk.`); if (V.showClothing === 1 && !market) { - if (slave.shoes !== "none" && slave.shoes !== "flats") { + if (shoeHeelHeight(slave) > 0) { r.push(`${He} is, so ${he} can walk reasonably well.`); } else { r.push(`Since ${he} is without them, ${he}'s crawling on`); diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index 09a3e01e4c6..857afc36d6a 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -743,7 +743,17 @@ The source of the many-voiced personal assistant becomes clear: probably on the <<case "sore ass">> -One night, you see <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<if (!hasAnyLegs($activeSlave))>>scooting $himself from side to side uncomfortably<<elseif ($activeSlave.heels == 1) && ($activeSlave.shoes != "heels") && ($activeSlave.shoes != "pumps") && ($activeSlave.shoes != "boots") && ($activeSlave.shoes != "extreme heels")>>crawling gingerly<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "pumps") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>>tottering along painfully<<else>>walking a little funny<</if>>, as though $he has a sore butt. You call $him over to inspect $his backdoor to see if $he needs care, <<if (!hasAnyLegs($activeSlave))>>and set $his helpless body down, spreading $his buttocks to examine $his anus.<<else>>and order $him to spread $his buttocks for you so you can examine $his anus.<</if>> $His asshole is fine, just a little sore from hard buttfucks. $He complies with you, but as you probe $him gently with a finger, +One night, you see <<= App.UI.slaveDescriptionDialog($activeSlave)>> +<<if (!hasAnyLegs($activeSlave))>> + scooting $himself from side to side uncomfortably, +<<elseif ($activeSlave.heels == 1 && shoeHeelHeight($activeSlave) == 0))>> + crawling gingerly, +<<elseif (shoeHeelHeight($activeSlave) > 0))>> + tottering along painfully, +<<else>> + walking a little funny, +<</if>> +as though $he has a sore butt. You call $him over to inspect $his backdoor to see if $he needs care, <<if (!hasAnyLegs($activeSlave))>>and set $his helpless body down, spreading $his buttocks to examine $his anus.<<else>>and order $him to spread $his buttocks for you so you can examine $his anus.<</if>> $His asshole is fine, just a little sore from hard buttfucks. $He complies with you, but as you probe $him gently with a finger, <<if !canTalk($activeSlave) && (!hasAnyArms($activeSlave))>> $he wriggles desperately and turns to mouth "it hurts <<Master>> please don't assrape me" at you. <<elseif !canTalk($activeSlave)>> @@ -761,10 +771,10 @@ You're at your desk as $he arrives; $his predecessor passes $him on the way out. heels click against <<elseif $activeSlave.shoes == "extreme heels">> ridiculous heels click against -<<elseif $activeSlave.shoes == "flats">> - flats come up against -<<else>> +<<elseif $activeSlave.shoes == "none">> bare feet come up against +<<else>> + <<print $activeSlave.shoes>> come up against <</if>> the door frame to either side of $him. $He reaches out to press $his palms against the door frame to either side of $his body, and runs them slowly up the frame, gradually stretching out $his <<set _averageHeight = Height.mean($activeSlave)>> @@ -958,7 +968,15 @@ $He sets $his jaw and <<if canSee($activeSlave)>>manages to meet your eyes witho <<case "bondage gear">> -One day, you catch sight of <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<if ($activeSlave.heels == 1) && ($activeSlave.shoes != "heels") && ($activeSlave.shoes != "pumps") && ($activeSlave.shoes != "boots") && ($activeSlave.shoes != "extreme heels")>>crawling<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "pumps") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>>tottering<<else>>walking<</if>> around stark naked. This is unacceptable, as $he has been ordered to wear humiliating and uncomfortable bondage gear. When confronted, +One day, you catch sight of <<= App.UI.slaveDescriptionDialog($activeSlave)>> +<<if ($activeSlave.heels == 1 && shoeHeelHeight($activeSlave) == 0)>> + crawling +<<elseif shoeHeelHeight($activeSlave) > 0>> + tottering +<<else>> + walking +<</if>> +around stark naked. This is unacceptable, as $he has been ordered to wear humiliating and uncomfortable bondage gear. When confronted, <<if !canTalk($activeSlave)>> <<if !hasAnyArms($activeSlave)>> $he tries to communicate $his reluctance to wear the clothing as best as $he can with various head movements and facial expressions<<if $activeSlave.bellyPreg >= 5000>>, including several nods towards $his rounded middle<</if>>. @@ -1220,7 +1238,7 @@ $he is. You've been busy and haven't used $him for a while, and since $he's acce One morning, you see <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<if !canWalk($activeSlave)>> crawl -<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>> +<<elseif shoeHeelHeight($activeSlave) > 0>> totter <<elseif $activeSlave.belly >= 10000>> waddle @@ -1457,14 +1475,22 @@ It's time for $his routine inspection, and $he's standing before you, nude. $He As you are retiring for the night, <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<if !canWalk($activeSlave)>> crawls -<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>> +<<elseif shoeHeelHeight($activeSlave) > 1>> totters <<elseif $activeSlave.belly >= 10000>> waddles <<else>> walks <</if>> -into your bedroom. Since $he is not allowed to ask questions, $he says nothing, but $his reason for being here is obvious enough. $He's on a medically reckless dosage of aphrodisiacs, and $he's panting as $he <<if ($activeSlave.heels == 1) && ($activeSlave.shoes != "heels") && ($activeSlave.shoes != "pumps") && ($activeSlave.shoes != "boots") && ($activeSlave.shoes != "extreme heels")>>kneels<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "pumps") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>>teeters<<else>>stands<</if>> there. $His nipples are <<if $activeSlave.nipples != "fuckable">>hard<<else>>swollen shut<</if>>, and there's visible moisture on $his <<if $seeRace == 1>>$activeSlave.race <</if>><<if $activeSlave.vagina != -1>>pussylips<<else>><<if $activeSlave.dick != 0>>dickhead<<else>>tiny little front hole<</if>><</if>>. It's also against the rules for $him to masturbate, so $he clearly decided to come to you rather than break the rules. There's no way $he'll be able to sleep like this. +into your bedroom. Since $he is not allowed to ask questions, $he says nothing, but $his reason for being here is obvious enough. $He's on a medically reckless dosage of aphrodisiacs, and $he's panting as $he +<<if ($activeSlave.heels == 1 shoeHeelHeight($activeSlave) == 0)>> + kneels +<<elseif (shoeHeelHeight($activeSlave) > 0)>> + teeters +<<else>> + stands +<</if>> +there. $His nipples are <<if $activeSlave.nipples != "fuckable">>hard<<else>>swollen shut<</if>>, and there's visible moisture on $his <<if $seeRace == 1>>$activeSlave.race <</if>><<if $activeSlave.vagina != -1>>pussylips<<else>><<if $activeSlave.dick != 0>>dickhead<<else>>tiny little front hole<</if>><</if>>. It's also against the rules for $him to masturbate, so $he clearly decided to come to you rather than break the rules. There's no way $he'll be able to sleep like this. <<case "shaped areolae">> @@ -1507,7 +1533,7 @@ Going about your day, you see <<= App.UI.slaveDescriptionDialog($activeSlave)>> As you are retiring for the night, <<= App.UI.slaveDescriptionDialog($activeSlave)>> <<if !canWalk($activeSlave)>> crawls -<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "pumps") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>> +<<elseif shoeHeelHeight($activeSlave) > 1>> totters <<elseif $activeSlave.belly >= 10000>> waddles @@ -1742,7 +1768,7 @@ This is the result of not getting off for several days while on the slave diet p $He constantly passes by your desk as you work, going back and forth between the milkers and $his other tasks. Even if you didn't know which was which, it would be easy to tell which way $he was going. One way, $he <<if !canWalk($activeSlave)>> crawls -<<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "pumps") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>> +<<elseif shoeHeelHeight($activeSlave) > 1>> totters <<elseif $activeSlave.belly >= 10000>> waddles @@ -8829,7 +8855,18 @@ brought in to you. This time <<= App.UI.slaveDescriptionDialog($activeSlave)>> h <</link>> <br><<link "See how rough you can be and still get $him to cum">> <<replace "#result">> - The aphrodisiac dosage $he's on will let $him orgasm to almost anything. You spend a few minutes playing with $his nipples, skillfully edging $him away from climax, and $he's almost vibrating with discomfort. $He's so desperate that $he sobs with relief when you order $him to <<if ($activeSlave.heels == 1) && ($activeSlave.shoes != "heels")>>kneel<<elseif ($activeSlave.shoes == "heels")>>totter up<<else>>stand<</if>> <<if $activeSlave.belly >= 5000>>_belly belly <</if>>against a wall and spread $his buttocks. A little saliva and<<if $PC.vagina != -1>> a bit of your own pussyjuice, transferred by a couple of fingers, and<</if>> <<if $PC.dick == 0>>your vibrating strap-on<<else>>your dick<</if>> is up $his willing ass. The position is uncomfortable for $him, and you are not gentle, but $he comes anyway. By the end of the night $his butthole is so sore that $he <<if $activeSlave.belly >= 5000>>lies on $his side<<else>>lies on $his stomach<</if>> every chance $he gets. $His submissiveness @@.hotpink;has increased.@@ + The aphrodisiac dosage $he's on will let $him orgasm to almost anything. You spend a few minutes playing with $his nipples, skillfully edging $him away from climax, and $he's almost vibrating with discomfort. $He's so desperate that $he sobs with relief when you order $him to + <<if ($activeSlave.heels == 1) && shoeHeelHeight($activeSlave) == 0>> + kneel + <<elseif shoeHeelHeight($activeSlave) > 0>> + totter up + <<else>> + stand + <</if>> + <<if $activeSlave.belly >= 5000>> + _belly belly + <</if>> + against a wall and spread $his buttocks. A little saliva and<<if $PC.vagina != -1>> a bit of your own pussyjuice, transferred by a couple of fingers, and<</if>> <<if $PC.dick == 0>>your vibrating strap-on<<else>>your dick<</if>> is up $his willing ass. The position is uncomfortable for $him, and you are not gentle, but $he comes anyway. By the end of the night $his butthole is so sore that $he <<if $activeSlave.belly >= 5000>>lies on $his side<<else>>lies on $his stomach<</if>> every chance $he gets. $His submissiveness @@.hotpink;has increased.@@ <<set $activeSlave.devotion += 4>> <</replace>> <</link>> @@ -12973,9 +13010,9 @@ brought in to you. This time <<= App.UI.slaveDescriptionDialog($activeSlave)>> h <br> <<link "while in pain">> <<replace "#result">> You order $him to - <<if ($activeSlave.heels == 1) && ($activeSlave.shoes != "heels") && ($activeSlave.shoes != "boots") && ($activeSlave.shoes != "extreme heels")>> + <<if ($activeSlave.heels == 1) && shoeHeelHeight($activeSlave) == 0>> kneel - <<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "boots") || ($activeSlave.shoes == "extreme heels")>> + <<elseif shoeHeelHeight($activeSlave) > 0>> teeter <<else>> stand diff --git a/src/uncategorized/reStandardPunishment.tw b/src/uncategorized/reStandardPunishment.tw index a78564babdb..459cd65f3d3 100644 --- a/src/uncategorized/reStandardPunishment.tw +++ b/src/uncategorized/reStandardPunishment.tw @@ -269,10 +269,10 @@ <<link "Make $him run">> <<replace "#result">> You tell $him that $he clearly needs practice being prompt. Your tone is conversational, but $he doesn't mistake it for kindness. It's the tone you use with slaves when imparting guidance which is to be accepted and followed on pain of terrible punishment. You make $him explain where $he was and what $he was doing previously, and require $him to walk you there. $He does, <<if $activeSlave.trust > 20>>trustingly<<elseif $activeSlave.trust >= -20>>rather fearfully<<else>>shaking with fear<</if>>, and when you get there you tell $him to run to $his next task. $He hesitates for an instant, until you <<if $PC.title == 1>>bellow<<else>>shriek<</if>> at $him to run! $He takes off, - <<if $activeSlave.shoes == "extreme heels">> + <<if shoeHeelHeight($activeSlave) == 3>> tottering agonizingly along in $his extreme heels. $He isn't running, not really, but $his slutty shoes are so ridiculous that $he can't. $He's going as fast as $he possibly can. - <<elseif ($activeSlave.shoes == "heels") || ($activeSlave.shoes == "boots")>> - running awkwardly in $his <<if $activeSlave.shoes == "heels">>heels<<else>>heeled boots<</if>>. + <<elseif shoeHeelHeight($activeSlave) > 1>> + running awkwardly in $his $activeSlave.shoes. <<else>> running as fast as $his legs can carry $him. <</if>> -- GitLab