big steppy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

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