diff --git a/game/03-JavaScript/bedroomPills.js b/game/03-JavaScript/bedroomPills.js index 48752295bdd8ff7f8cb6fd0593a0676f7610a60f..09f6c0aafbe256818265538cb761510e15c919f4 100644 --- a/game/03-JavaScript/bedroomPills.js +++ b/game/03-JavaScript/bedroomPills.js @@ -541,7 +541,54 @@ setup.pills = [ }, effects: [`<<awareness -1>>`, `<<control 10>>`, `<<set $medicated += 1>>`], }, + { + name: "Hair Growth Formula", + description: + "A spray containing Minoxidil and other ingredients to promote faster growth and healthier hair when applied directly to hair. Effective for 3 days on application.", + onTakeMessage: "You apply the spray. You hope it helps grow your hair quickly.", + warning_label: + "Warning: Please consult your doctor if you have an allergic reaction shortly after application. Contact your doctor immediately if you get the spray in your mouth or eyes.", + autoTake() { + return V.sexStats.pills["pills"][this.name].autoTake; + }, + doseTaken() { + return V.sexStats.pills["pills"][this.name].doseTaken; + }, + owned() { + return V.sexStats.pills["pills"][this.name].owned; + }, + hpi_take_pills() { + return "Apply to hair"; + }, + hpi_doseTaken() { + if (V.sexStats.pills["pills"][this.name].doseTaken) { + return ( + "Effective for " + V.sexStats.pills["pills"][this.name].doseTaken + " day" + (V.sexStats.pills["pills"][this.name].doseTaken > 1 ? "s" : "") + ); + } else { + return "Not Applied"; + } + }, + hpi_take_every_morning() { + return this.autoTake() ? "Stop Applying it" : "Apply when required"; + }, + type: "hair", + subtype: "Hair Growth Formula", + shape: "spray", + overdose() { + return V.sexStats.pills["pills"][this.name].overdose; + }, + icon: "img/misc/icon/hairspray.png", + display_condition() { + return this.owned() > 0 ? 1 : 0; + }, + take_condition() { + return this.doseTaken() === 0 ? 1 : 0; + }, + effects: [], + }, ]; +// ToDo: figure out a means to allow applying the Hair Growth Formula to pubic hair as well function generateHomePillsInventory() { $(function () { @@ -737,12 +784,16 @@ function onTakeClick(itemName) { case "Anti-Parasite Cream": V.sexStats.pills["pills"][itemName].doseTaken += 14; break; + case "Hair Growth Formula": + V.sexStats.pills["pills"][itemName].doseTaken += 3; + break; default: + // Stat for total pills consumption + V.pillsConsumed = (V.pillsConsumed || 0) + 1; V.sexStats.pills["pills"][itemName].doseTaken += 1; break; // Stat for specific pill consumptionbreak; } - V.pillsConsumed = typeof V.pillsConsumed === "undefined" || V.pillsConsumed == null ? 1 : V.pillsConsumed + 1; // Stat for total pills consumption for (const item of setup.pills) { if (item.name === itemName) { for (const widget of item.effects) // run the widgets associated with a pill @@ -752,6 +803,7 @@ function onTakeClick(itemName) { if (item.doseTaken() > 1 && item.name.contains("blocker") === false) { switch (item.type) { case "parasite": + case "hair": break; case "pregnancy": V.overdosePillsTaken = item.name; @@ -938,6 +990,7 @@ function resetAllDoseTaken() { case "Anti-Parasite Cream": case "fertility booster": case "contraceptive": + case "Hair Growth Formula": if (V.sexStats.pills["pills"][pill].doseTaken > 0) { V.sexStats.pills["pills"][pill].doseTaken--; } diff --git a/game/04-Variables/variables-versionUpdate.twee b/game/04-Variables/variables-versionUpdate.twee index e3716b5be98854729aaeb64b7eb5ada6235fd440..1178cacaf3ae20753e7e1726a1949f4190463f01 100644 --- a/game/04-Variables/variables-versionUpdate.twee +++ b/game/04-Variables/variables-versionUpdate.twee @@ -4750,4 +4750,9 @@ <<set $objectVersion.earSlimeFix to 1>> <</if>> + + <!-- Added the new hair growth pills data --> + <<if $sexStats.pills.pills && $sexStats.pills.pills["Hair Growth Formula"] is undefined>> + <<physicalAdjustmentsInit>> + <</if>> <</widget>> diff --git a/game/base-system/effects.twee b/game/base-system/effects.twee index 166e066345c4fa56745ec08dc95323f79cf410cf..eccc586734131b9d000567dce3b35b5b75de6c64 100644 --- a/game/base-system/effects.twee +++ b/game/base-system/effects.twee @@ -576,6 +576,10 @@ <</if>> <<unset $pillsTaken>> <</if>> + <<if $hairGrowthApplied>> + <span class="purple">You apply growth formula to your hair<<if $hairGrowthAppliedLast>>, <span class="red">but used the last of it</span><<unset $hairGrowthAppliedLast>><</if>>.</span> + <<unset $hairGrowthApplied>> + <</if>> <<if $exhibitionism_message is 1>> <<set $exhibitionism_message to 0>> <span class="lblue">You've spent time in public with no underwear on. You wonder if people can tell, and shiver at the thought.</span> diff --git a/game/base-system/images.twee b/game/base-system/images.twee index a75b49dd7acd2fa10ec352c5a0360a9bd40192e4..d7f904420202136d55af6cdef5814260e2ea1be4 100644 --- a/game/base-system/images.twee +++ b/game/base-system/images.twee @@ -1382,6 +1382,7 @@ <<switch _args[0]>> <<case "chair">><<icon "hairdresser_chair.png">> <<case "gel">><<icon "hairgel.png">> + <<case "hairspray">><<icon "hairspray.png">> <<default>><<icon "hairdresser.gif">> <</switch>> <</widget>> diff --git a/game/base-system/overlays/traits.twee b/game/base-system/overlays/traits.twee index 86d89497c248de885894c11e2c8e7218d91f418f..f94d8ae87c22d9159cfad2fd2de74c40c8441eee 100644 --- a/game/base-system/overlays/traits.twee +++ b/game/base-system/overlays/traits.twee @@ -457,6 +457,14 @@ { title: "Medicinal Traits", traits: [ + { + name: "Hair Growth Formula", + colour: "green", + has: _pills and _pills["Hair Growth Formula"] and _pills["Hair Growth Formula"].doseTaken, + text: () => { + return `A hair growth formula has been applied, to encourage faster hair growth. ${_pills["Hair Growth Formula"].doseTaken} day${_pills["Hair Growth Formula"].doseTaken is 1 ? "" : "s"} remaining.`; + } + }, { name: "Anti-Parasite Cream", colour: "green", diff --git a/game/base-system/physicalAdjustments.twee b/game/base-system/physicalAdjustments.twee index b0bab3ed7bc340c36fbcb2be72ff3a3d2c538a8d..d77b9ac4bf8f351fd4967538fdb667f3bb3414eb 100644 --- a/game/base-system/physicalAdjustments.twee +++ b/game/base-system/physicalAdjustments.twee @@ -43,6 +43,9 @@ <<if $sexStats.pills.pills && $sexStats.pills.pills["Anti-Parasite Cream"] is undefined>> <<set $sexStats.pills.pills["Anti-Parasite Cream"] to { autoTake: false, doseTaken: 0, owned: 0, overdose: 0 }>> <</if>> + <<if $sexStats.pills.pills && $sexStats.pills.pills["Hair Growth Formula"] is undefined>> + <<set $sexStats.pills.pills["Hair Growth Formula"] to { autoTake: false, doseTaken: 0, owned: 0, overdose: 0 }>> + <</if>> <<if $sexStats.anus is undefined>> <<set $sexStats.anus to { @@ -546,18 +549,27 @@ <<if _autoTakeDetermined != null and _pills.pills[_autoTakeDetermined].owned > 0>> /*Prevent pills from being taken if the player has already taken a dose, aloowing them to either take more than intended, or to bypass the overdose effects*/ <<if !_pills.pills[_autoTakeDetermined].doseTaken>> - <<set $pillsconsumed++>> /* to keep track of overall pill consumption (stats) */ <<set _pills.pills[_autoTakeDetermined].owned-->> - <<set _pills.pills[_autoTakeDetermined].doseTaken += 1>> - <<run redetermineMostTaken(0, 0, _autoTakeDetermined)>> - <<run setLastTaken(null, null, _autoTakeDetermined)>> - <<set $pillsTaken to true>> - <<set $pillsTakenOn to (Time.monthDay.toString() + Time.month + Time.year.toString())>> - <<set $effectsmessage to 1>> - <<if _pills.pills[_autoTakeDetermined].owned == 0>> - <<set _pills.pills[_autoTakeDetermined].autoTake to false>> - <<set $pillsTakenLast to true>> + <<if _autoTakeDetermined is "Hair Growth Formula">> + <<set _pills.pills[_autoTakeDetermined].doseTaken += 3>> + <<set $hairGrowthApplied to true>> + <<if _pills.pills[_autoTakeDetermined].owned == 0>> + <<set _pills.pills[_autoTakeDetermined].autoTake to false>> + <<set $hairGrowthAppliedLast to true>> + <</if>> + <<else>> + <<set $pillsconsumed++>> /* to keep track of overall pill consumption (stats) */ + <<set _pills.pills[_autoTakeDetermined].doseTaken += 1>> + <<run redetermineMostTaken(0, 0, _autoTakeDetermined)>> + <<run setLastTaken(null, null, _autoTakeDetermined)>> + <<set $pillsTaken to true>> + <<set $pillsTakenOn to (Time.monthDay.toString() + Time.month + Time.year.toString())>> + <<if _pills.pills[_autoTakeDetermined].owned == 0>> + <<set _pills.pills[_autoTakeDetermined].autoTake to false>> + <<set $pillsTakenLast to true>> + <</if>> <</if>> + <<set $effectsmessage to 1>> <</if>> <<elseif _autoTakeDetermined != null>> <<set _pills.pills[_autoTakeDetermined].autoTake to false>> diff --git a/game/base-system/time/time.js b/game/base-system/time/time.js index c50fda7c65dcebebd6f9f23e3871ba55b4c01d95..af26f8d51dc35245e1d19eb1814a39d61ed331d9 100644 --- a/game/base-system/time/time.js +++ b/game/base-system/time/time.js @@ -694,7 +694,7 @@ function dayPassed() { } if (V.pirate_journey > 1) { - V.pirate_journey--; + V.pirate_journey--; } else { delete V.pirate_journey; } @@ -724,7 +724,7 @@ function hourPassed(hours) { if (V.ejactrait >= 1) V.stress -= (V.goocount + V.semencount) * 10; if (V.kylarwatched) V.kylarwatchedtimer--; if (V.parasite.nipples.name) fragment.append(wikifier("milkvolume", 1)); - if (V.worn.head.name === "hairpin") { + if ((V.worn.head.name === "hairpin" && random(0, 100) >= 75) || V.sexStats.pills.pills["Hair Growth Formula"].doseTaken) { V.hairlength++; V.fringelength++; fragment.append(wikifier("calchairlengthstage")); diff --git a/game/base-system/widgets.twee b/game/base-system/widgets.twee index 28a10116c297fa371df1fab4f804550482caec53..51e8bc7680a64f63acce75c72f4ff0ab268860ca 100644 --- a/game/base-system/widgets.twee +++ b/game/base-system/widgets.twee @@ -3000,7 +3000,7 @@ <<widget "roomoptions">> <<if $sexStats.pills.boughtOnce is true or $sexStats.pills["pills"]["Dr Harper\'s prescription"].owned gte 1 or $sexStats.pills["pills"]["asylum\'s prescription"].owned gte 1>> - <<pillicon>><<link [[Check your pills|PillCollection]]>><<set $pillsExitPassage to $passage>><<endevent>><</link>> + <<pillicon>><<link [[Check your Medicine Drawer|PillCollection]]>><<set $pillsExitPassage to $passage>><<endevent>><</link>> <br> <</if>> <</widget>> diff --git a/game/overworld-town/loc-shop/hairDressers.twee b/game/overworld-town/loc-shop/hairDressers.twee index 169e31ef36ca583b7a41a9febd2933cf1ba23117..e0f9f6b09b0c5e0d991d086b3aa6e83db7d0c8ab 100644 --- a/game/overworld-town/loc-shop/hairDressers.twee +++ b/game/overworld-town/loc-shop/hairDressers.twee @@ -48,6 +48,8 @@ You are in the hairdressers. Various hair products are available for sale. You c <<if Time.dayState is "night" and Time.hour isnot $closinghour>> <<hairdressericon "gel">><<link [[Steal a bottle of hair gel|$passage]]>><<crimeUp `8 / 100` "petty">><<set $hairgelBottles += 1>><</link>><<crime "petty">> <br> + <<hairdressericon "hairspray">><<link [[Steal a bottle of hair growth formula|$passage]]>><<crimeUp `50 / 100` "petty">><<set $sexStats.pills.pills["Hair Growth Formula"].owned++>><</link>><<crime "petty">> + <br> <<if !$weekly.theft.hairDressers>> <<shopicon "register">><<link [[Examine the cash register|Hairdressers Register]]>><</link>> <br><br> @@ -61,6 +63,13 @@ You are in the hairdressers. Various hair products are available for sale. You c <<hairdressericon "gel">> <span class="blue">You can't afford any hair gel.</span> <br> <</if>> + <<if $money gte 5000>> + <<hairdressericon "hairspray">> <<link [[Purchase hair growth formula (£50)|Hairdressers Gel]]>><<set $money -= 5000>><<set $sexStats.pills.pills["Hair Growth Formula"].owned += 3>><<set $phase to 1>><</link>> + <br> + <<else>> + <<hairdressericon "hairspray">> <span class="blue">You can't afford any hair gel.</span> + <br> + <</if>> <<hairdressericon "chair">><<link [[Take a seat|Hairdressers Seat]]>><</link>> <br><br> <</if>> @@ -70,16 +79,27 @@ You are in the hairdressers. Various hair products are available for sale. You c <</if>> :: Hairdressers Gel -<<generate1>><<person1>>You browse the hair products for sale. You decide on a tiny bottle labelled "No muss, no fuss!" + +<<generate1>><<person1>>You browse the hair products for sale. You decide on a tiny <<if $phase is 1>>canister<<else>>bottle<</if>> labelled "No muss, no fuss!" <br><br> -The hairdresser makes small talk as <<he>> rings up your purchase. "That stuff's great," <<he>> says. "The bottle's small, so you'll only get <span class="teal">one use</span> out of it, but it's got a rock-solid hold. You won't have to worry about your hair getting mussed up. Not until you decide to change up your 'do, at least." +The hairdresser makes small talk as <<he>> rings up your purchase. "That stuff's great," <<he>> says. + +<<if $phase is 1>> + "The canister's small, so you'll only get <span class="teal">a small number of uses</span> out it, but you won't need to use it every day. You won't have to worry about your hair staying short. Not until you decide to get it cut again." +<<else>> + "The bottle's small, so you'll only get <span class="teal">one use</span> out it, of but it's got a rock-solid hold. You won't have to worry about your hair getting mussed up. Not until you decide to change up your 'do, at least." +<</if>> <br><br> <<He>> hands you your bag with a smile. "<<print either("Thanks for shopping with us!","Have a great day.","Take care.","Pleasure doing business with ya.","Come back soon!")>>" <br><br> -You have <span class="gold">$hairgelBottles</span> <<print ($hairgelBottles is 1) ? "bottle" : "bottles">> of hair gel. +<<if $phase is 1>> + You have <span class="gold"><<print $sexStats.pills.pills["Hair Growth Formula"].owned>></span> applications of hair growth formula left. +<<else>> + You have <span class="gold">$hairgelBottles</span> <<print ($hairgelBottles is 1) ? "bottle" : "bottles">> of hair gel. +<</if>> <br><br> -<<link [[Next|Hairdressers]]>><</link>> +<<link [[Next|Hairdressers]]>><<endevent>><</link>> :: Hairdressers Seat diff --git a/img/misc/icon/hairspray.png b/img/misc/icon/hairspray.png new file mode 100644 index 0000000000000000000000000000000000000000..ed0d9277419235fe2c834793d897115482a22e29 Binary files /dev/null and b/img/misc/icon/hairspray.png differ diff --git a/modules/css/pillsInventory.css b/modules/css/pillsInventory.css index f7a9fc1d67a6d859115f7eab861aaaf6b2046ab9..8e4093e8485f5cb353ab4311e5952c1d8416b23c 100644 --- a/modules/css/pillsInventory.css +++ b/modules/css/pillsInventory.css @@ -129,7 +129,7 @@ #hpi_take_every_morning { position: absolute; right: 0; - margin-right: 17%; + margin-right: 10%; } .hpi_notice_label { @@ -156,7 +156,7 @@ } .hpi_take_pills { - margin-left: 17%; + margin-left: 10%; white-space: nowrap; }