| @@ -1656,7 +1656,7 @@ function digest_all(organ) { | |||||
| if (prey.count == 0) { | if (prey.count == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| do_digestion(organ.owner, organ, prey); | do_digestion(organ.owner, organ, prey); | ||||
| } | } | ||||
| @@ -1825,7 +1825,7 @@ function stomp() | |||||
| stomp_wedge(); | stomp_wedge(); | ||||
| if (macro.stenchEnabled) { | |||||
| if (macro.stenchEnabled && macro.basePawStenchArea > 0) { | |||||
| paw_stench(); | paw_stench(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -2035,7 +2035,7 @@ function sit() | |||||
| macro.arouse(5); | macro.arouse(5); | ||||
| if (macro.stenchEnabled) { | |||||
| if (macro.stenchEnabled && macro.baseAssStenchArea > 0) { | |||||
| ass_stench(); | ass_stench(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -2062,7 +2062,7 @@ function sit_goo() | |||||
| macro.arouse(15); | macro.arouse(15); | ||||
| if (macro.stenchEnabled) { | |||||
| if (macro.stenchEnabled && macro.baseAssStenchArea > 0) { | |||||
| ass_stench(); | ass_stench(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -3013,6 +3013,31 @@ function piss(vol) { | |||||
| update([sound,line,linesummary,newline]); | update([sound,line,linesummary,newline]); | ||||
| macro.arouse(20); | macro.arouse(20); | ||||
| if (macro.stenchEnabled && macro.basePissStenchArea > 0) { | |||||
| piss_stench(area); | |||||
| } | |||||
| } | |||||
| function piss_stench(area) { | |||||
| let prey = getPrey(biome, area); | |||||
| let line = describe("piss-stench", prey, macro, verbose); | |||||
| let linesummary = summarize(prey.sum(), true); | |||||
| let people = get_living_prey(prey.sum()); | |||||
| if (get_living_prey(prey.sum()) == 0) | |||||
| return; | |||||
| let preyMass = prey.sum_property("mass"); | |||||
| macro.addGrowthPoints(preyMass); | |||||
| add_victim_people("piss-stench",prey); | |||||
| update([line,linesummary,newline]); | |||||
| macro.arouse(5); | |||||
| } | } | ||||
| function bladder_vore() { | function bladder_vore() { | ||||
| @@ -3061,6 +3086,31 @@ function scat(vol) { | |||||
| macro.scatStorage.amount -= vol; | macro.scatStorage.amount -= vol; | ||||
| macro.arouse(50); | macro.arouse(50); | ||||
| if (macro.stenchEnabled && macro.baseScatStenchArea > 0) { | |||||
| scat_stench(area); | |||||
| } | |||||
| } | |||||
| function scat_stench(area) { | |||||
| let prey = getPrey(biome, area); | |||||
| let line = describe("scat-stench", prey, macro, verbose); | |||||
| let linesummary = summarize(prey.sum(), true); | |||||
| let people = get_living_prey(prey.sum()); | |||||
| if (get_living_prey(prey.sum()) == 0) | |||||
| return; | |||||
| let preyMass = prey.sum_property("mass"); | |||||
| macro.addGrowthPoints(preyMass); | |||||
| add_victim_people("scat-stench",prey); | |||||
| update([line,linesummary,newline]); | |||||
| macro.arouse(5); | |||||
| } | } | ||||
| function setButton(button, state) { | function setButton(button, state) { | ||||
| @@ -3823,6 +3873,10 @@ function startGame(e) { | |||||
| enable_button("digest_bladder"); | enable_button("digest_bladder"); | ||||
| } | } | ||||
| } | } | ||||
| if (macro.stenchEnabled) { | |||||
| enable_victim("piss-stench","Smothered in piss stench"); | |||||
| } | |||||
| } | } | ||||
| if (macro.scatEnabled) { | if (macro.scatEnabled) { | ||||
| @@ -3834,6 +3888,10 @@ function startGame(e) { | |||||
| enable_stat("scat"); | enable_stat("scat"); | ||||
| enable_victim("scat","Shat on"); | enable_victim("scat","Shat on"); | ||||
| if (macro.stenchEnabled) { | |||||
| enable_victim("scat-stench","Smothered in scat stench"); | |||||
| } | |||||
| } | } | ||||
| if (macro.gooEnabled) { | if (macro.gooEnabled) { | ||||
| @@ -530,7 +530,7 @@ function defaultPawStench(container, macro, verbose) { | |||||
| if (isFatal(macro)) | if (isFatal(macro)) | ||||
| return "Vile fumes waft from your " + macro.footDesc(true) + " , choking the life from " + (sum > 1 ? sum + " people." : "a person."); | return "Vile fumes waft from your " + macro.footDesc(true) + " , choking the life from " + (sum > 1 ? sum + " people." : "a person."); | ||||
| else | else | ||||
| return "Your stinky " + macro.footDesc(true) + " overwhelm" + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| return "Your stinky " + macro.footDesc(true) + " overwhelms " + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| } | } | ||||
| function defaultAssStench(container, macro, verbose) { | function defaultAssStench(container, macro, verbose) { | ||||
| @@ -540,7 +540,27 @@ function defaultAssStench(container, macro, verbose) { | |||||
| if (isFatal(macro)) | if (isFatal(macro)) | ||||
| return "Vile miasma from your bitter ass snuffs out " + (sum > 1 ? sum + " people" : "a person") + ", suffocating them in your stench."; | return "Vile miasma from your bitter ass snuffs out " + (sum > 1 ? sum + " people" : "a person") + ", suffocating them in your stench."; | ||||
| else | else | ||||
| return "Your stinky ass sicens " + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| return "Your stinky butt sickens " + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| } | |||||
| function defaultPissStench(container, macro, verbose) { | |||||
| let sum = get_living_prey(container.sum()); | |||||
| if (isSadistic(macro)) | |||||
| return "Waves of corrosive fumes waft from your piss, the toxic cloud liquefying the flesh of " + (sum > 1 ? numberRough(sum,"of") + " people" : "a person") + " as it dissolves " + container.describe(false) + "."; | |||||
| if (isFatal(macro)) | |||||
| return "Vile fumes waft from your piss, choking the life from " + (sum > 1 ? sum + " people." : "a person."); | |||||
| else | |||||
| return "Your stinky piss overwhelms " + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| } | |||||
| function defaultScatStench(container, macro, verbose) { | |||||
| let sum = get_living_prey(container.sum()); | |||||
| if (isSadistic(macro)) | |||||
| return "A rancid miasma spews from your shit - a thick, choking avalanche of toxic vapors that reduce " + (sum > 1 ? numberRough(sum,"of") + " people" : "a person") + " to nothing but bones as it melts " + container.describe(false) + "."; | |||||
| if (isFatal(macro)) | |||||
| return "Vile fumes waft from your scat, choking the life from " + (sum > 1 ? sum + " people." : "a person."); | |||||
| else | |||||
| return "Your stinky scat overwhelms " + (sum > 1 ? sum + " people" : "a person") + " with your scent!"; | |||||
| } | } | ||||
| function defaultBelch(container, macro, verbose) { | function defaultBelch(container, macro, verbose) { | ||||
| @@ -5,28 +5,37 @@ function round(number,precision=3) { | |||||
| } | } | ||||
| function numberRough(value,suffix="") { | function numberRough(value,suffix="") { | ||||
| var scale = Math.floor(Math.log10(value)); | |||||
| switch(scale) { | |||||
| case 0: return "a single"; | |||||
| case 1: return "dozens " + suffix; | |||||
| case 2: return "hundreds " + suffix; | |||||
| default: | |||||
| let prefix = ""; | |||||
| if (value == 1) { | |||||
| return "a single"; | |||||
| } else if (value < 5) { | |||||
| return "a few"; | |||||
| } else if (value < 12) { | |||||
| return "a handful " + suffix; | |||||
| } else if (value == 12) { | |||||
| return "a dozen"; | |||||
| } else { | |||||
| var scale = Math.floor(Math.log10(value)); | |||||
| switch(scale) { | |||||
| case 1: return "dozens " + suffix; | |||||
| case 2: return "hundreds " + suffix; | |||||
| default: | |||||
| let prefix = ""; | |||||
| if (scale % 3 == 1) | |||||
| prefix = "tens of "; | |||||
| else if (scale % 3 == 2) | |||||
| prefix = "hundreds of "; | |||||
| if (scale % 3 == 1) | |||||
| prefix = "tens of "; | |||||
| else if (scale % 3 == 2) | |||||
| prefix = "hundreds of "; | |||||
| let order = Math.floor(scale/3); | |||||
| let order = Math.floor(scale/3); | |||||
| switch(order) { | |||||
| case 1: return prefix + "thousands " + suffix; | |||||
| case 2: return prefix + "millions " + suffix; | |||||
| case 3: return prefix + "billions " + suffix; | |||||
| case 4: return prefix + "trillions " + suffix; | |||||
| default: return "uncountably many"; | |||||
| } | |||||
| switch(order) { | |||||
| case 1: return prefix + "thousands " + suffix; | |||||
| case 2: return prefix + "millions " + suffix; | |||||
| case 3: return prefix + "billions " + suffix; | |||||
| case 4: return prefix + "trillions " + suffix; | |||||
| default: return "uncountably many"; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| function number(value, type="full", precision=3) { | function number(value, type="full", precision=3) { | ||||