big steppy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1084 lines
28 KiB

  1. var strolling = false;
  2. var maxStomachDigest = 10;
  3. var maxBowelsDigest = 10;
  4. var unit = "metric";
  5. var verbose = true;
  6. var biome = "suburb";
  7. var newline = " ";
  8. victims = {};
  9. var macro =
  10. {
  11. "scaling": function(value, scale, factor) { return value * Math.pow(scale,factor); },
  12. "species": "crux",
  13. "color" : "blue",
  14. "baseHeight": 2.26,
  15. get height() { return this.scaling(this.baseHeight, this.scale, 1); },
  16. "baseMass": 135,
  17. get mass () { return this.scaling(this.baseMass, this.scale, 3); },
  18. "basePawArea": 0.1,
  19. get pawArea() { return this.scaling(this.basePawArea, this.scale, 2); },
  20. "baseAnalVoreArea": 0.1,
  21. get analVoreArea() { return this.scaling(this.baseAnalVoreArea, this.scale, 2); },
  22. "baseAssArea": 0.4,
  23. get assArea() { return this.scaling(this.baseAssArea, this.scale, 2); },
  24. "baseHandArea": 0.3,
  25. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  26. "baseDickLength": 0.3048,
  27. "baseDickDiameter": 0.08,
  28. "dickDensity": 1000,
  29. "dickScale": 1,
  30. get dickLength() { return this.scaling(this.baseDickLength * this.dickScale, this.scale, 1); },
  31. get dickDiameter() { return this.scaling(this.baseDickDiameter * this.dickScale, this.scale, 1); },
  32. get dickGirth() {
  33. return Math.pow((this.dickDiameter / 2),2) * Math.PI;
  34. },
  35. get dickArea() {
  36. return this.dickLength * this.dickDiameter * Math.PI / 2;
  37. },
  38. get dickVolume() {
  39. return this.dickLength * Math.pow(this.dickDiameter/2,2) * Math.PI;
  40. },
  41. get dickMass() {
  42. return this.dickVolume * this.dickDensity;
  43. },
  44. "baseBallDiameter": 0.05,
  45. "ballDensity": 1000,
  46. "ballScale": 1,
  47. get ballDiameter() { return this.scaling(this.baseBallDiameter * this.ballScale, this.scale, 1); },
  48. get ballArea() { return 2 * Math.PI * Math.pow(this.ballDiameter/2, 2) },
  49. get ballVolume() {
  50. var radius = this.ballDiameter / 2;
  51. return 4/3 * Math.PI * Math.pow(radius,3);
  52. },
  53. get ballMass() {
  54. var volume = this.ballVolume;
  55. return volume * this.ballDensity;
  56. },
  57. "baseCumRatio": 0.25,
  58. "cumScale": 1,
  59. get cumVolume() {
  60. return this.ballVolume * this.baseCumRatio * this.cumScale + Math.max(0,this.cumStorage.amount - this.cumStorage.limit);
  61. },
  62. "baseVaginaLength": 0.1,
  63. "baseVaginaWidth": 0.05,
  64. "vaginaScale": 1,
  65. get vaginaLength() { return this.scaling(this.baseVaginaLength * this.vaginaScale, this.scale, 1); },
  66. get vaginaWidth() { return this.scaling(this.baseVaginaWidth * this.vaginaScale, this.scale, 1); },
  67. get vaginaArea() { return this.vaginaLength * this.vaginaWidth },
  68. get vaginaVolume() { return this.vaginaArea * this.vaginaWidth },
  69. "femcumRatio": 0.25,
  70. "femcumScale": 1,
  71. get femcumVolume() {
  72. return this.vaginaVolume * this.femcumRatio * this.femcumScale + Math.max(0,this.femcumStorage.amount - this.femcumStorage.limit);
  73. },
  74. "baseBreastDiameter": 0.1,
  75. "breastScale": 1,
  76. "breastDensity": 1000,
  77. get breastDiameter() { return this.scaling(this.baseDickLength * this.breastScale, this.scale, 1); },
  78. get breastArea() {
  79. return 2 * Math.PI * Math.pow(this.breastDiameter/2,2);
  80. },
  81. get breastVolume() {
  82. var radius = this.breastDiameter / 2;
  83. return 4/3 * Math.PI * Math.pow(radius,3);
  84. },
  85. get breastMass() {
  86. var volume = this.breastVolume;
  87. return volume * this.breastDensity;
  88. },
  89. "digest": function(organ) {
  90. var count = Math.min(organ.contents.length, organ.maxDigest);
  91. var container = new Container();
  92. while (count > 0) {
  93. var victim = organ.contents.shift();
  94. if (victim.name != "Container")
  95. victim = new Container([victim]);
  96. container = container.merge(victim);
  97. --count;
  98. }
  99. var digested = container.sum();
  100. for (var key in victims[organ.name]) {
  101. if (victims[organ.name].hasOwnProperty(key) && digested.hasOwnProperty(key) ) {
  102. victims["digested"][key] += digested[key];
  103. victims[organ.name][key] -= digested[key];
  104. }
  105. }
  106. var line = organ.describeDigestion(container);
  107. organ.fill(this,container);
  108. var summary = summarize(container.sum());
  109. update([line,summary,newline]);
  110. },
  111. "stomach": {
  112. "name": "stomach",
  113. "feed": function(prey) {
  114. this.feedFunc(prey,this,this.owner);
  115. },
  116. "feedFunc": function(prey,self,owner) {
  117. if (self.contents.length == 0)
  118. setTimeout(function() { owner.digest(self) }, 15000);
  119. this.contents.push(prey);
  120. },
  121. "describeDigestion": function(container) {
  122. return "Your stomach gurgles as it digests " + container.describe(false);
  123. },
  124. "fill": function(owner,container) {
  125. //no-op
  126. },
  127. "contents": [],
  128. "maxDigest": 5
  129. },
  130. "bowels": {
  131. "name" : "bowels",
  132. "feed": function(prey) {
  133. this.feedFunc(prey,this,this.owner);
  134. },
  135. "feedFunc": function(prey,self,owner) {
  136. if (self.contents.length == 0)
  137. setTimeout(function() { owner.digest(self) }, 15000);
  138. this.contents.push(prey);
  139. },
  140. "describeDigestion" : function(container) {
  141. return "Your bowels churn as they absorb " + container.describe(false);
  142. },
  143. "fill": function(owner,container) {
  144. //no-op
  145. },
  146. "contents" : [],
  147. "maxDigest" : 3
  148. },
  149. "womb": {
  150. "name" : "womb",
  151. "feed": function(prey) {
  152. this.feedFunc(prey,this,this.owner);
  153. },
  154. "feedFunc": function(prey,self,owner) {
  155. if (self.contents.length == 0)
  156. setTimeout(function() { owner.digest(self) }, 15000);
  157. this.contents.push(prey);
  158. },
  159. "describeDigestion" : function(container) {
  160. return "Your womb squeezes as it dissolves " + container.describe(false);
  161. },
  162. "fill": function(owner,container) {
  163. owner.femcumStorage.amount += container.sum_property("mass") / 1e3;
  164. },
  165. "contents" : [],
  166. "maxDigest" : 1
  167. },
  168. "balls": {
  169. "name" : "balls",
  170. "feed": function(prey) {
  171. this.feedFunc(prey,this,this.owner);
  172. },
  173. "feedFunc": function(prey,self,owner) {
  174. if (self.contents.length == 0)
  175. setTimeout(function() { owner.digest(self) }, 15000);
  176. this.contents.push(prey);
  177. },
  178. "describeDigestion": function(container) {
  179. return "Your balls slosh as they transform " + container.describe(false) + " into cum";
  180. },
  181. "fill": function(owner,container) {
  182. owner.cumStorage.amount += container.sum_property("mass") / 1e3;
  183. },
  184. "contents" : [],
  185. "maxDigest" : 1
  186. },
  187. "init": function() {
  188. this.stomach.owner = this;
  189. this.bowels.owner = this;
  190. this.womb.owner = this;
  191. this.balls.owner = this;
  192. this.cumStorage.owner = this;
  193. this.femcumStorage.owner = this;
  194. if (this.maleParts)
  195. this.fillCum(this)
  196. if (this.femaleParts)
  197. this.fillFemcum(this)
  198. },
  199. "maleParts": true,
  200. "femaleParts": true,
  201. "fillCum": function(self) {
  202. self.cumStorage.amount += self.ballVolume / 30;
  203. if (self.cumStorage.amount > self.cumStorage.limit)
  204. self.arouse(10 * (self.cumStorage.amount / self.cumStorage.limit - 1));
  205. setTimeout(function () { self.fillCum(self) }, 1000);
  206. update();
  207. },
  208. "fillFemcum": function(self) {
  209. self.femcumStorage.amount += self.vaginaVolume / 30;
  210. if (self.femcumStorage.amount > self.femcumStorage.limit)
  211. self.arouse(10 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
  212. setTimeout(function () { self.fillFemcum(self) }, 1000);
  213. update();
  214. },
  215. "cumStorage": {
  216. "amount": 0,
  217. get limit() {
  218. return this.owner.ballVolume;
  219. }
  220. },
  221. "femcumStorage": {
  222. "amount": 0,
  223. get limit() {
  224. return this.owner.vaginaVolume;
  225. }
  226. },
  227. "orgasm": false,
  228. "arousal": 0,
  229. "arouse": function(amount) {
  230. this.arousal += amount;
  231. if (this.arousal >= 100) {
  232. this.arousal = 100;
  233. if (!this.orgasm) {
  234. this.orgasm = true;
  235. if (this.maleParts) {
  236. this.maleOrgasm(this);
  237. }
  238. if (this.femaleParts) {
  239. this.femaleOrgasm(this);
  240. }
  241. }
  242. }
  243. },
  244. "quench": function(amount) {
  245. this.arousal -= amount;
  246. if (this.arousal <= 0) {
  247. this.arousal = 0;
  248. if (this.orgasm) {
  249. this.orgasm = false;
  250. }
  251. }
  252. },
  253. "maleOrgasm": function(self) {
  254. if (self.orgasm) {
  255. self.quench(10);
  256. var amount = Math.min(this.cumVolume, this.cumStorage.amount);
  257. this.cumStorage.amount -= amount;
  258. male_orgasm(amount);
  259. setTimeout(function() { self.maleOrgasm(self) }, 2000);
  260. }
  261. },
  262. "femaleOrgasm": function(self) {
  263. if (this.orgasm) {
  264. this.quench(10);
  265. var amount = Math.min(this.femcumVolume, this.femcumStorage.amount);
  266. this.femcumStorage.amount -= amount;
  267. female_orgasm(amount);
  268. setTimeout(function() { self.femaleOrgasm(self) }, 2000);
  269. }
  270. },
  271. get description() {
  272. result = [];
  273. line = "You are a " + length(macro.height, unit, true) + " tall " + macro.species + ". You weigh " + mass(macro.mass, unit) + ".";
  274. result.push(line);
  275. if (this.maleParts) {
  276. line = "Your " + length(macro.dickLength, unit, true) + " long dick hangs from your hips, with two " + mass(macro.ballMass, unit, true) + ", " + length(macro.ballDiameter, unit, true) + "-wide balls hanging beneath.";
  277. result.push(line);
  278. }
  279. if (this.femaleParts) {
  280. line = "Your glistening " + length(macro.vaginaLength, unit, true) + " long slit is oozing between your legs."
  281. result.push(line);
  282. line = "You have two " + length(macro.breastDiameter, unit, true) + "-wide breasts that weigh " + mass(macro.breastMass, unit) + " apiece.";
  283. result.push(line);
  284. }
  285. return result;
  286. },
  287. "scale": 3,
  288. "scaleWithMass": function(mass) {
  289. var startMass = this.mass;
  290. var newMass = startMass + mass;
  291. this.scale = Math.pow(newMass / this.baseMass, 1/3);
  292. }
  293. }
  294. function look()
  295. {
  296. var desc = macro.description;
  297. var line2 = ""
  298. switch(biome) {
  299. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  300. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  301. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  302. case "downtown": line2 = "You're lurking amongst the skyscrapers of downtown. The streets are packed, and the buildings are practically begging you to knock them over.";
  303. }
  304. desc = desc.concat([newline,line2,newline]);
  305. update(desc);
  306. }
  307. function get_living_prey(sum) {
  308. var total = 0;
  309. for (var key in sum) {
  310. if (sum.hasOwnProperty(key)) {
  311. if (key == "Person" || key == "Cow")
  312. total += sum[key];
  313. }
  314. }
  315. return total;
  316. }
  317. function toggle_auto()
  318. {
  319. strolling = !strolling;
  320. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  321. if (strolling)
  322. update(["You start walking.",newline]);
  323. else
  324. update(["You stop walking.",newline]);
  325. }
  326. function change_location()
  327. {
  328. switch(biome) {
  329. case "suburb": biome = "city"; break;
  330. case "city": biome = "downtown"; break;
  331. case "downtown": biome = "rural"; break;
  332. case "rural": biome = "suburb"; break;
  333. }
  334. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  335. }
  336. function toggle_units()
  337. {
  338. switch(unit) {
  339. case "metric": unit = "customary"; break;
  340. case "customary": unit = "approx"; break;
  341. case "approx": unit = "metric"; break;
  342. }
  343. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  344. update();
  345. }
  346. function toggle_verbose()
  347. {
  348. verbose = !verbose;
  349. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  350. }
  351. function initVictims()
  352. {
  353. return {
  354. "Person": 0,
  355. "Cow": 0,
  356. "Car": 0,
  357. "Bus": 0,
  358. "Tram": 0,
  359. "Motorcycle": 0,
  360. "House": 0,
  361. "Barn": 0,
  362. "Small Skyscraper": 0,
  363. "Train": 0,
  364. "Train Car": 0,
  365. "Parking Garage": 0,
  366. "Overpass": 0,
  367. };
  368. };
  369. // lists out total people
  370. function summarize(sum, fatal = true)
  371. {
  372. var count = get_living_prey(sum);
  373. return "<b>(" + count + " " + (fatal ? (count > 1 ? "kills" : "kill") : (count > 1 ? "prey" : "prey")) + ")</b>";
  374. }
  375. function getOnePrey(biome,area)
  376. {
  377. var potential = ["Person"];
  378. switch(biome) {
  379. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  380. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  381. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Parking Garage"]; break;
  382. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  383. }
  384. var potAreas = []
  385. potential.forEach(function (x) {
  386. potAreas.push([x,areas[x]]);
  387. });
  388. potAreas = potAreas.sort(function (x,y) {
  389. return y[1] - x[1];
  390. });
  391. for (var i=0; i<potAreas.length; i++) {
  392. x = potAreas[i];
  393. if (x[1] < area) {
  394. return new things[x[0]](1);
  395. }
  396. };
  397. return new Person(1);
  398. }
  399. function getPrey(region, area)
  400. {
  401. var weights = {"Person": 1};
  402. switch(region)
  403. {
  404. case "rural": weights = {
  405. "Person": 0.05,
  406. "House": 0.01,
  407. "Barn": 0.01,
  408. "Cow": 0.2
  409. }; break;
  410. case "suburb": weights = {
  411. "Person": 0.5,
  412. "House": 0.5,
  413. "Car": 0.2,
  414. "Train": 0.1,
  415. "Bus": 0.1
  416. }; break;
  417. case "city": weights = {
  418. "Person": 0.5,
  419. "House": 0.2,
  420. "Car": 0.2,
  421. "Train": 0.1,
  422. "Bus": 0.1,
  423. "Tram": 0.1,
  424. "Parking Garage": 0.02
  425. }; break;
  426. case "downtown": weights = {
  427. "Person": 0.5,
  428. "Car": 0.3,
  429. "Bus": 0.15,
  430. "Tram": 0.1,
  431. "Parking Garage": 0.02,
  432. "Small Skyscraper": 0.4
  433. }; break;
  434. }
  435. return fill_area2(area,weights);
  436. }
  437. function updateVictims(type,prey)
  438. {
  439. var sums = prey.sum();
  440. for (var key in sums) {
  441. if (sums.hasOwnProperty(key)) {
  442. victims[type][key] += sums[key];
  443. }
  444. }
  445. }
  446. function feed()
  447. {
  448. var area = macro.handArea;
  449. var prey = getPrey(biome, area);
  450. var line = prey.eat(verbose)
  451. var linesummary = summarize(prey.sum(), false);
  452. var people = get_living_prey(prey.sum());
  453. var sound = "Ulp";
  454. if (people < 3) {
  455. sound = "Ulp.";
  456. } else if (people < 10) {
  457. sound = "Gulp.";
  458. } else if (people < 50) {
  459. sound = "Glrrp.";
  460. } else if (people < 500) {
  461. sound = "Glrrrpkh!";
  462. } else if (people < 5000) {
  463. sound = "GLRRKPKH!";
  464. } else {
  465. sound = "Oh the humanity!";
  466. }
  467. var preyMass = prey.sum_property("mass");
  468. macro.scaleWithMass(preyMass);
  469. macro.stomach.feed(prey);
  470. macro.arouse(5);
  471. updateVictims("stomach",prey);
  472. update([sound,line,linesummary,newline]);
  473. }
  474. function stomp()
  475. {
  476. var area = macro.pawArea;
  477. var prey = getPrey(biome, area);
  478. var line = prey.stomp(verbose)
  479. var linesummary = summarize(prey.sum(), true);
  480. var people = get_living_prey(prey.sum());
  481. var sound = "Thump";
  482. if (people < 3) {
  483. sound = "Thump!";
  484. } else if (people < 10) {
  485. sound = "Squish!";
  486. } else if (people < 50) {
  487. sound = "Crunch!";
  488. } else if (people < 500) {
  489. sound = "CRUNCH!";
  490. } else if (people < 5000) {
  491. sound = "CRRUUUNCH!!";
  492. } else {
  493. sound = "Oh the humanity!";
  494. }
  495. var preyMass = prey.sum_property("mass");
  496. macro.scaleWithMass(preyMass);
  497. macro.arouse(5);
  498. updateVictims("stomped",prey);
  499. update([sound,line,linesummary,newline]);
  500. }
  501. function anal_vore()
  502. {
  503. var area = macro.analVoreArea;
  504. var prey = getOnePrey(biome,area);
  505. area = macro.assArea;
  506. var crushed = getPrey(biome,area);
  507. var line1 = prey.anal_vore(verbose, macro.height);
  508. var line1summary = summarize(prey.sum(), false);
  509. var line2 = crushed.buttcrush(verbose);
  510. var line2summary = summarize(crushed.sum(), true);
  511. var people = get_living_prey(prey.sum());
  512. var sound = "Shlp";
  513. if (people < 3) {
  514. sound = "Shlp.";
  515. } else if (people < 10) {
  516. sound = "Squelch.";
  517. } else if (people < 50) {
  518. sound = "Shlurrp.";
  519. } else if (people < 500) {
  520. sound = "SHLRP!";
  521. } else if (people < 5000) {
  522. sound = "SQLCH!!";
  523. } else {
  524. sound = "Oh the humanity!";
  525. }
  526. var people = get_living_prey(crushed.sum());
  527. var sound2 = "Thump";
  528. if (people < 3) {
  529. sound2 = "Thump!";
  530. } else if (people < 10) {
  531. sound2 = "Squish!";
  532. } else if (people < 50) {
  533. sound2 = "Crunch!";
  534. } else if (people < 500) {
  535. sound2 = "CRUNCH!";
  536. } else if (people < 5000) {
  537. sound2 = "CRRUUUNCH!!";
  538. } else {
  539. sound2 = "Oh the humanity!";
  540. }
  541. var preyMass = prey.sum_property("mass");
  542. var crushedMass = prey.sum_property("mass");
  543. macro.scaleWithMass(preyMass);
  544. macro.scaleWithMass(crushedMass);
  545. macro.bowels.feed(prey);
  546. macro.arouse(10);
  547. updateVictims("bowels",prey);
  548. updateVictims("stomped",crushed);
  549. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  550. }
  551. function breast_crush()
  552. {
  553. var area = macro.breastArea;
  554. var prey = getPrey(biome, area);
  555. var line = prey.breast_crush(verbose);
  556. var linesummary = summarize(prey.sum(), true);
  557. var people = get_living_prey(prey.sum());
  558. var sound = "Thump";
  559. if (people < 3) {
  560. sound = "Thump!";
  561. } else if (people < 10) {
  562. sound = "Squish!";
  563. } else if (people < 50) {
  564. sound = "Crunch!";
  565. } else if (people < 500) {
  566. sound = "CRUNCH!";
  567. } else if (people < 5000) {
  568. sound = "CRRUUUNCH!!";
  569. } else {
  570. sound = "Oh the humanity!";
  571. }
  572. var preyMass = prey.sum_property("mass");
  573. macro.scaleWithMass(preyMass);
  574. macro.arouse(10);
  575. updateVictims("breasts",prey);
  576. update([sound,line,linesummary,newline]);
  577. }
  578. function unbirth()
  579. {
  580. var area = macro.vaginaArea;
  581. var prey = getPrey(biome, area);
  582. var line = prey.unbirth(verbose)
  583. var linesummary = summarize(prey.sum(), false);
  584. var people = get_living_prey(prey.sum());
  585. var sound = "";
  586. if (people < 3) {
  587. sound = "Shlp.";
  588. } else if (people < 10) {
  589. sound = "Squelch.";
  590. } else if (people < 50) {
  591. sound = "Shlurrp.";
  592. } else if (people < 500) {
  593. sound = "SHLRP!";
  594. } else if (people < 5000) {
  595. sound = "SQLCH!!";
  596. } else {
  597. sound = "Oh the humanity!";
  598. }
  599. var preyMass = prey.sum_property("mass");
  600. macro.scaleWithMass(preyMass);
  601. macro.womb.feed(prey);
  602. macro.arouse(20);
  603. updateVictims("womb",prey);
  604. update([sound,line,linesummary,newline]);
  605. }
  606. function cockslap()
  607. {
  608. var area = macro.dickArea;
  609. var prey = getPrey(biome, area);
  610. var line = prey.cockslap(verbose)
  611. var linesummary = summarize(prey.sum(), true);
  612. var people = get_living_prey(prey.sum());
  613. var sound = "Thump";
  614. if (people < 3) {
  615. sound = "Thump!";
  616. } else if (people < 10) {
  617. sound = "Squish!";
  618. } else if (people < 50) {
  619. sound = "Crunch!";
  620. } else if (people < 500) {
  621. sound = "CRUNCH!";
  622. } else if (people < 5000) {
  623. sound = "CRRUUUNCH!!";
  624. } else {
  625. sound = "Oh the humanity!";
  626. }
  627. var preyMass = prey.sum_property("mass");
  628. macro.scaleWithMass(preyMass);
  629. macro.arouse(15);
  630. updateVictims("cock",prey);
  631. update([sound,line,linesummary,newline]);
  632. }
  633. function cock_vore()
  634. {
  635. var area = macro.dickGirth;
  636. var prey = getPrey(biome, area);
  637. var line = prey.cock_vore(verbose)
  638. var linesummary = summarize(prey.sum(), true);
  639. var people = get_living_prey(prey.sum());
  640. var sound = "lp";
  641. if (people < 3) {
  642. sound = "Shlp.";
  643. } else if (people < 10) {
  644. sound = "Squelch.";
  645. } else if (people < 50) {
  646. sound = "Shlurrp.";
  647. } else if (people < 500) {
  648. sound = "SHLRP!";
  649. } else if (people < 5000) {
  650. sound = "SQLCH!!";
  651. } else {
  652. sound = "Oh the humanity!";
  653. }
  654. var preyMass = prey.sum_property("mass");
  655. macro.scaleWithMass(preyMass);
  656. macro.balls.feed(prey);
  657. macro.arouse(20);
  658. updateVictims("balls",prey);
  659. update([sound,line,linesummary,newline]);
  660. }
  661. function ball_smother()
  662. {
  663. var area = macro.ballArea * 2;
  664. var prey = getPrey(biome, area);
  665. var line = prey.ball_smother(verbose)
  666. var linesummary = summarize(prey.sum(), true);
  667. var people = get_living_prey(prey.sum());
  668. var sound = "Thump";
  669. if (people < 3) {
  670. sound = "Thump!";
  671. } else if (people < 10) {
  672. sound = "Squish!";
  673. } else if (people < 50) {
  674. sound = "Smoosh!";
  675. } else if (people < 500) {
  676. sound = "SMOOSH!";
  677. } else if (people < 5000) {
  678. sound = "SMOOOOOSH!!";
  679. } else {
  680. sound = "Oh the humanity!";
  681. }
  682. var preyMass = prey.sum_property("mass");
  683. macro.scaleWithMass(preyMass);
  684. macro.arouse(10);
  685. updateVictims("balls",prey);
  686. update([sound,line,linesummary,newline]);
  687. }
  688. function male_orgasm(vol)
  689. {
  690. // let's make it 10cm thick
  691. var area = vol * 10;
  692. var prey = getPrey(biome, area);
  693. var line = prey.male_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false))
  694. var linesummary = summarize(prey.sum(), true);
  695. var people = get_living_prey(prey.sum());
  696. var sound = "Spurt!";
  697. if (people < 3) {
  698. sound = "Spurt!";
  699. } else if (people < 10) {
  700. sound = "Sploosh!";
  701. } else if (people < 50) {
  702. sound = "Sploooooosh!";
  703. } else if (people < 500) {
  704. sound = "SPLOOSH!";
  705. } else if (people < 5000) {
  706. sound = "SPLOOOOOOOOOOSH!!";
  707. } else {
  708. sound = "Oh the humanity!";
  709. }
  710. var preyMass = prey.sum_property("mass");
  711. macro.scaleWithMass(preyMass);
  712. updateVictims("splooged",prey);
  713. update([sound,line,linesummary,newline]);
  714. }
  715. function female_orgasm(vol)
  716. {
  717. // let's make it 10cm thick
  718. var area = vol * 10;
  719. var prey = getPrey(biome, area);
  720. var line = prey.female_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false));
  721. var linesummary = summarize(prey.sum(), true);
  722. var people = get_living_prey(prey.sum());
  723. var sound = "Spurt!";
  724. if (people < 3) {
  725. sound = "Spurt!";
  726. } else if (people < 10) {
  727. sound = "Sploosh!";
  728. } else if (people < 50) {
  729. sound = "Sploooooosh!";
  730. } else if (people < 500) {
  731. sound = "SPLOOSH!";
  732. } else if (people < 5000) {
  733. sound = "SPLOOOOOOOOOOSH!!";
  734. } else {
  735. sound = "Oh the humanity!";
  736. }
  737. var preyMass = prey.sum_property("mass");
  738. macro.scaleWithMass(preyMass);
  739. updateVictims("splooged",prey);
  740. update([sound,line,linesummary,newline]);
  741. }
  742. function update(lines = [])
  743. {
  744. var log = document.getElementById("log");
  745. lines.forEach(function (x) {
  746. var line = document.createElement('div');
  747. line.innerHTML = x;
  748. log.appendChild(line);
  749. });
  750. log.scrollTop = log.scrollHeight;
  751. document.getElementById("height").innerHTML = "Height: " + length(macro.height, unit);
  752. document.getElementById("mass").innerHTML = "Mass: " + mass(macro.mass, unit);
  753. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  754. document.getElementById("cum").innerHTML = "Cum: " + volume(macro.cumStorage.amount,unit,false) + "/" + volume(macro.cumStorage.limit,unit,false);
  755. document.getElementById("femcum").innerHTML = "Femcum: " + volume(macro.femcumStorage.amount,unit,false) + "/" + volume(macro.femcumStorage.limit,unit,false);
  756. for (var type in victims) {
  757. if (victims.hasOwnProperty(type)) {
  758. for (var key in victims[type]){
  759. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  760. document.getElementById("stat-" + key).style.display = "table-row";
  761. document.getElementById("stat-" + type + "-" + key).innerHTML = victims[type][key];
  762. }
  763. }
  764. }
  765. }
  766. }
  767. function pick_move()
  768. {
  769. if (!strolling) {
  770. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  771. return;
  772. }
  773. var choice = Math.random();
  774. if (choice < 0.2) {
  775. anal_vore();
  776. } else if (choice < 0.6) {
  777. stomp();
  778. } else {
  779. feed();
  780. }
  781. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  782. }
  783. function grow()
  784. {
  785. var oldHeight = macro.height;
  786. var oldMass = macro.mass;
  787. macro.scale *= 1.2;
  788. var newHeight = macro.height;
  789. var newMass = macro.mass;
  790. var heightDelta = newHeight - oldHeight;
  791. var massDelta = newMass - oldMass;
  792. var heightStr = length(heightDelta, unit);
  793. var massStr = mass(massDelta, unit);
  794. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  795. }
  796. function option_male() {
  797. macro.maleParts = !macro.maleParts;
  798. document.getElementById("button-male-genitals").innerHTML = (macro.maleParts ? "Male genitals on" : "Male genitals off");
  799. }
  800. function option_female() {
  801. macro.femaleParts = !macro.femaleParts;
  802. document.getElementById("button-female-genitals").innerHTML = (macro.femaleParts ? "Female genitals on" : "Female genitals off");
  803. }
  804. function startGame() {
  805. document.getElementById("option-panel").style.display = 'none';
  806. document.getElementById("action-panel").style.display = 'flex';
  807. victimTypes = ["stomped","digested","stomach","bowels"];
  808. if (macro.maleParts) {
  809. victimTypes = victimTypes.concat(["cock","balls"]);
  810. } else {
  811. document.getElementById("button-cockslap").style.display = 'none';
  812. document.getElementById("button-cock_vore").style.display = 'none';
  813. document.getElementById("button-ball_smother").style.display = 'none';
  814. document.getElementById("cum").style.display = 'none';
  815. }
  816. if (macro.femaleParts) {
  817. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  818. } else {
  819. document.getElementById("button-breast_crush").style.display = 'none';
  820. document.getElementById("button-unbirth").style.display = 'none';
  821. document.getElementById("femcum").style.display = 'none';
  822. }
  823. if (macro.maleParts || macro.femaleParts) {
  824. victimTypes.push("splooged");
  825. }
  826. var table = document.getElementById("victim-table");
  827. var tr = document.createElement('tr');
  828. var th = document.createElement('th');
  829. th.innerHTML = "Method";
  830. tr.appendChild(th);
  831. for (var i = 0; i < victimTypes.length; i++) {
  832. var th = document.createElement('th');
  833. th.classList.add("victim-table-cell");
  834. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  835. tr.appendChild(th);
  836. }
  837. table.appendChild(tr);
  838. for (var key in things) {
  839. if (things.hasOwnProperty(key) && key != "Container") {
  840. var tr = document.createElement('tr');
  841. tr.id = "stat-" + key;
  842. tr.style.display = "none";
  843. var th = document.createElement('th');
  844. th.innerHTML = key;
  845. tr.appendChild(th);
  846. for (var i = 0; i < victimTypes.length; i++) {
  847. var th = document.createElement('th');
  848. th.innerHTML = 0;
  849. th.id = "stat-" + victimTypes[i] + "-" + key;
  850. tr.appendChild(th);
  851. }
  852. table.appendChild(tr);
  853. }
  854. }
  855. var species = document.getElementById("option-species").value;
  856. var re = /^[a-zA-Z\- ]+$/;
  857. // tricksy tricksy players
  858. if (re.test(species)) {
  859. macro.species = species;
  860. }
  861. macro.init();
  862. update();
  863. document.getElementById("stat-container").style.display = 'flex';
  864. }
  865. window.addEventListener('load', function(event) {
  866. victims["stomped"] = initVictims();
  867. victims["digested"] = initVictims();
  868. victims["stomach"] = initVictims();
  869. victims["bowels"] = initVictims();
  870. victims["breasts"] = initVictims();
  871. victims["womb"] = initVictims();
  872. victims["cock"] = initVictims();
  873. victims["balls"] = initVictims();
  874. victims["smothered"] = initVictims();
  875. victims["splooged"] = initVictims();
  876. document.getElementById("button-look").addEventListener("click",look);
  877. document.getElementById("button-grow").addEventListener("click",grow);
  878. document.getElementById("button-feed").addEventListener("click",feed);
  879. document.getElementById("button-stomp").addEventListener("click",stomp);
  880. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  881. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  882. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  883. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  884. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  885. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  886. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  887. document.getElementById("button-location").addEventListener("click",change_location);
  888. document.getElementById("button-units").addEventListener("click",toggle_units);
  889. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  890. document.getElementById("button-male-genitals").addEventListener("click",option_male);
  891. document.getElementById("button-female-genitals").addEventListener("click",option_female);
  892. document.getElementById("button-start").addEventListener("click",startGame);
  893. setTimeout(pick_move, 2000);
  894. });