big steppy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

2651 строка
69 KiB

  1. "use strict";
  2. /*jshint browser: true*/
  3. // do da dark mode
  4. let dark = false;
  5. function toggleDarkMode(e) {
  6. dark = !dark;
  7. setDarkMode(dark);
  8. }
  9. function setDarkMode(darkMode) {
  10. dark = darkMode;
  11. window.localStorage.setItem("dark-mode",dark);
  12. if (dark) {
  13. document.querySelector("body").classList.remove("light");
  14. document.querySelector("body").classList.add("dark");
  15. } else {
  16. document.querySelector("body").classList.remove("dark");
  17. document.querySelector("body").classList.add("light");
  18. }
  19. }
  20. let started = false;
  21. let strolling = false;
  22. let maxStomachDigest = 10;
  23. let maxBowelsDigest = 10;
  24. let unit = "metric";
  25. let numbers = "full";
  26. let verbose = true;
  27. let biome = "suburb";
  28. let newline = " ";
  29. let victims = {};
  30. let humanMode = true;
  31. let macro =
  32. {
  33. "scaling": function(value, scale, factor) { return value * Math.pow(scale,factor); },
  34. "name": "",
  35. "species": "crux",
  36. "color" : "blue",
  37. "baseHeight": 2.26,
  38. get height() { return this.scaling(this.baseHeight, this.scale, 1); },
  39. "baseMass": 135,
  40. get mass () { return this.scaling(this.baseMass, this.scale, 3); },
  41. "basePawArea": 0.1,
  42. get pawArea() { return this.scaling(this.basePawArea, this.scale, 2); },
  43. "baseAnalVoreArea": 0.1,
  44. get analVoreArea() { return this.scaling(this.baseAnalVoreArea, this.scale, 2); },
  45. "baseAssArea": 0.4,
  46. get assArea() { return this.scaling(this.baseAssArea * this.assScale, this.scale, 2); },
  47. "baseHandArea": 0.1,
  48. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  49. "assScale": 1,
  50. analVore: true,
  51. "hasTail": true,
  52. "tailType": "slinky",
  53. "tailCount": 1,
  54. "baseTailLength": 1,
  55. "baseTailDiameter": 0.1,
  56. "tailDensity": 250,
  57. "tailScale": 1,
  58. "tailMaw": false,
  59. get tailLength() {
  60. return this.scaling(this.baseTailLength * this.tailScale, this.scale, 1);
  61. },
  62. get tailDiameter() {
  63. return this.scaling(this.baseTailDiameter * this.tailScale, this.scale, 1);
  64. },
  65. get tailGirth() {
  66. return Math.pow(this.tailDiameter/2,2) * Math.PI;
  67. },
  68. get tailArea() {
  69. return this.tailLength * this.tailDiameter;
  70. },
  71. get tailVolume() {
  72. return this.tailGirth * this.tailLength;
  73. },
  74. get tailMass() {
  75. return this.tailVolume * this.tailDensity;
  76. },
  77. "dickType": "canine",
  78. "baseDickLength": 0.3,
  79. "baseDickDiameter": 0.08,
  80. "dickDensity": 1000,
  81. "dickScale": 1,
  82. get dickLength() {
  83. let factor = 1;
  84. if (!this.arousalEnabled || this.arousal < 25) {
  85. factor = 0.5;
  86. } else if (this.arousal < 75) {
  87. factor = 0.5 + (this.arousal - 25) / 100;
  88. }
  89. return this.scaling(this.baseDickLength * this.dickScale * factor, this.scale, 1);
  90. },
  91. get dickDiameter() {
  92. let factor = 1;
  93. if (!this.arousalEnabled || this.arousal < 25) {
  94. factor = 0.5;
  95. } else if (this.arousal < 75) {
  96. factor = 0.5 + (this.arousal - 25) / 100;
  97. }
  98. return this.scaling(this.baseDickDiameter * this.dickScale * factor, this.scale, 1);
  99. },
  100. get dickGirth() {
  101. return Math.pow((this.dickDiameter/ 2),2) * Math.PI;
  102. },
  103. get dickArea() {
  104. return this.dickLength* this.dickDiameter* Math.PI / 2;
  105. },
  106. get dickVolume() {
  107. return this.dickLength* Math.pow(this.dickDiameter2,2) * Math.PI;
  108. },
  109. get dickMass() {
  110. return this.dickVolume* this.dickDensity;
  111. },
  112. "baseBallDiameter": 0.05,
  113. "ballDensity": 1000,
  114. "ballScale": 1,
  115. get ballDiameter() { return this.scaling(this.baseBallDiameter * this.ballScale, this.scale, 1); },
  116. get ballArea() { return 2 * Math.PI * Math.pow(this.ballDiameter/2, 2); },
  117. get ballVolume() {
  118. let radius = this.ballDiameter / 2;
  119. return 4/3 * Math.PI * Math.pow(radius,3);
  120. },
  121. get ballMass() {
  122. let volume = this.ballVolume;
  123. return volume * this.ballDensity;
  124. },
  125. "baseCumRatio": 1,
  126. "cumScale": 1,
  127. get cumVolume() {
  128. return this.dickGirth * this.baseCumRatio * this.cumScale * (1 + this.edge) + Math.max(0,this.cumStorage.amount - this.cumStorage.limit);
  129. },
  130. "baseVaginaLength": 0.1,
  131. "baseVaginaWidth": 0.05,
  132. "vaginaScale": 1,
  133. get vaginaLength() { return this.scaling(this.baseVaginaLength * this.vaginaScale, this.scale, 1); },
  134. get vaginaWidth() { return this.scaling(this.baseVaginaWidth * this.vaginaScale, this.scale, 1); },
  135. get vaginaArea() { return this.vaginaLength * this.vaginaWidth; },
  136. get vaginaVolume() { return this.vaginaArea * this.vaginaWidth; },
  137. "baseFemcumRatio": 1,
  138. "femcumScale": 1,
  139. get femcumVolume() {
  140. return this.vaginaArea * this.baseFemcumRatio * this.femcumScale * (1 + this.edge) + Math.max(0,this.femcumStorage.amount - this.femcumStorage.limit);
  141. },
  142. hasBreasts: true,
  143. lactationEnabled: true,
  144. lactationScale: 1,
  145. lactationFactor: 0.25,
  146. get lactationVolume() {
  147. return this.milkStorage.limit * this.lactationFactor;
  148. },
  149. "baseBreastDiameter": 0.1,
  150. "breastScale": 1,
  151. "breastDensity": 1000,
  152. get breastDiameter() { return this.scaling(this.baseBreastDiameter * this.breastScale, this.scale, 1); },
  153. get breastArea() {
  154. return 2 * Math.PI * Math.pow(this.breastDiameter/2,2);
  155. },
  156. get breastVolume() {
  157. let radius = this.breastDiameter / 2;
  158. return 4/3 * Math.PI * Math.pow(radius,3);
  159. },
  160. get breastMass() {
  161. let volume = this.breastVolume;
  162. return volume * this.breastDensity;
  163. },
  164. "digest": function(owner,organ) {
  165. let count = Math.min(organ.contents.length, organ.maxDigest);
  166. let container = new Container();
  167. while (count > 0) {
  168. let victim = organ.contents.shift();
  169. if (victim.name != "Container")
  170. victim = new Container([victim]);
  171. container = container.merge(victim);
  172. --count;
  173. }
  174. if (container.count == 0)
  175. return;
  176. let digested = container.sum();
  177. for (let key in victims[organ.name]) {
  178. if (victims[organ.name].hasOwnProperty(key) && digested.hasOwnProperty(key) ) {
  179. victims["digested"][key] += digested[key];
  180. victims[organ.name][key] -= digested[key];
  181. }
  182. }
  183. let line = organ.describeDigestion(container);
  184. organ.fill(this,container);
  185. let lethal = macro.brutality != 0 && (!macro.soulVoreEnabled || organ.name === "souls");
  186. let summary = summarize(container.sum(),lethal);
  187. if (organ.contents.length > 0) {
  188. setTimeout(function() { owner.digest(owner,organ); }, 15000);
  189. }
  190. if (macro.soulVoreEnabled && organ.name != "souls") {
  191. owner.souls.feed(container);
  192. let soulCount = container.sum()["Person"];
  193. let soulLine = "";
  194. if (soulCount > 0)
  195. soulLine = "Their " + (soulCount == 1 ? "soul is" : "souls are") + " trapped in your depths!";
  196. else
  197. soulLine = "No souls, though...";
  198. update([line,summary,soulLine,newline]);
  199. } else {
  200. update([line,summary,newline]);
  201. }
  202. },
  203. "stomach": {
  204. "name": "stomach",
  205. "feed": function(prey) {
  206. this.feedFunc(prey,this,this.owner);
  207. },
  208. "feedFunc": function(prey,self,owner) {
  209. if (self.contents.length == 0)
  210. setTimeout(function() { owner.digest(owner,self); }, 15000);
  211. this.contents.push(prey);
  212. },
  213. "describeDigestion": function(container) {
  214. return describe("stomach",container,this.owner,verbose);
  215. },
  216. "fill": function(owner,container) {
  217. //no-op
  218. },
  219. "contents": [],
  220. "maxDigest": 5
  221. },
  222. "bowels": {
  223. "name" : "bowels",
  224. "feed": function(prey) {
  225. this.feedFunc(prey,this,this.owner);
  226. },
  227. "feedFunc": function(prey,self,owner) {
  228. if (self.contents.length == 0)
  229. setTimeout(function() { owner.digest(owner,self); }, 15000);
  230. this.contents.push(prey);
  231. },
  232. "describeDigestion" : function(container) {
  233. return describe("bowels",container,this.owner,verbose);
  234. },
  235. "fill": function(owner,container) {
  236. //no-op
  237. },
  238. "contents" : [],
  239. "maxDigest" : 3
  240. },
  241. "womb": {
  242. "name" : "womb",
  243. "feed": function(prey) {
  244. this.feedFunc(prey,this,this.owner);
  245. },
  246. "feedFunc": function(prey,self,owner) {
  247. if (self.contents.length == 0)
  248. setTimeout(function() { owner.digest(owner,self); }, 15000);
  249. this.contents.push(prey);
  250. },
  251. "describeDigestion" : function(container) {
  252. return describe("womb",container,this.owner,verbose);
  253. },
  254. "fill": function(owner,container) {
  255. owner.femcumStorage.amount += container.sum_property("mass") / 1e3;
  256. },
  257. "contents" : [],
  258. "maxDigest" : 1
  259. },
  260. "balls": {
  261. "name" : "balls",
  262. "feed": function(prey) {
  263. this.feedFunc(prey,this,this.owner);
  264. },
  265. "feedFunc": function(prey,self,owner) {
  266. if (self.contents.length == 0)
  267. setTimeout(function() { owner.digest(owner,self); }, 15000);
  268. this.contents.push(prey);
  269. },
  270. "describeDigestion": function(container) {
  271. return describe("balls",container,this.owner,verbose);
  272. },
  273. "fill": function(owner,container) {
  274. owner.cumStorage.amount += container.sum_property("mass") / 1e3;
  275. },
  276. "contents" : [],
  277. "maxDigest" : 1
  278. },
  279. "breasts": {
  280. "name" : "breasts",
  281. "feed": function(prey) {
  282. this.feedFunc(prey,this,this.owner);
  283. },
  284. "feedFunc": function(prey,self,owner) {
  285. if (self.contents.length == 0)
  286. setTimeout(function() { owner.digest(owner,self); }, 15000);
  287. this.contents.push(prey);
  288. },
  289. "describeDigestion": function(container) {
  290. return describe("breasts",container,this.owner,verbose);
  291. },
  292. "fill": function(owner,container) {
  293. if (macro.lactationEnabled) {
  294. owner.milkStorage.amount += container.sum_property("mass") / 1e3;
  295. }
  296. },
  297. "contents" : [],
  298. "maxDigest" : 1
  299. },
  300. soulVoreEnabled: true,
  301. "souls": {
  302. "name" : "souls",
  303. "feed": function(prey) {
  304. this.feedFunc(prey,this,this.owner);
  305. },
  306. "feedFunc": function(prey,self,owner) {
  307. if (self.contents.length == 0)
  308. setTimeout(function() { owner.digest(owner,self); }, 15000);
  309. this.contents.push(prey);
  310. },
  311. "describeDigestion": function(container) {
  312. return describe("soul-digest",container,this.owner,verbose);
  313. },
  314. "fill": function(owner,container) {
  315. //no-op
  316. },
  317. "contents" : [],
  318. "maxDigest" : 5
  319. },
  320. // holding spots
  321. hasPouch: true,
  322. "pouch": {
  323. "name": "pouch",
  324. "container": new Container(),
  325. get description() {
  326. if (this.container.count == 0)
  327. return "Your pouch is empty";
  328. else
  329. return "Your pouch contains " + this.container.describe(false);
  330. },
  331. "add": function(victims) {
  332. this.container = this.container.merge(victims);
  333. }
  334. },
  335. hasSheath: true,
  336. "sheath": {
  337. "name": "sheath",
  338. "container": new Container(),
  339. get description() {
  340. if (this.container.count == 0)
  341. return "Your sheath is empty";
  342. else
  343. return "Your sheath contains " + this.container.describe(false);
  344. },
  345. "add": function(victims) {
  346. this.container = this.container.merge(victims);
  347. }
  348. },
  349. hasCleavage: true,
  350. "cleavage": {
  351. "name": "cleavage",
  352. "container": new Container(),
  353. get description() {
  354. if (this.container.count == 0)
  355. return "Your breasts don't have anyone stuck in them";
  356. else
  357. return "Your cleavage contains " + this.container.describe(false);
  358. },
  359. "add": function(victims) {
  360. this.container = this.container.merge(victims);
  361. }
  362. },
  363. "init": function() {
  364. this.stomach.owner = this;
  365. this.bowels.owner = this;
  366. this.womb.owner = this;
  367. this.balls.owner = this;
  368. this.breasts.owner = this;
  369. this.souls.owner = this;
  370. this.cumStorage.owner = this;
  371. this.femcumStorage.owner = this;
  372. this.milkStorage.owner = this;
  373. if (this.maleParts)
  374. this.fillCum(this);
  375. if (this.femaleParts)
  376. this.fillFemcum(this);
  377. if (this.lactationEnabled)
  378. this.fillBreasts(this);
  379. if (this.arousalEnabled) {
  380. this.quenchExcess(this);
  381. }
  382. },
  383. "maleParts": true,
  384. "femaleParts": true,
  385. "fillCum": function(self) {
  386. self.cumStorage.amount += self.cumScale * self.ballVolume / 1200;
  387. if (self.cumStorage.amount > self.cumStorage.limit)
  388. self.arouse(1 * (self.cumStorage.amount / self.cumStorage.limit - 1));
  389. setTimeout(function () { self.fillCum(self); }, 100);
  390. update();
  391. },
  392. "fillFemcum": function(self) {
  393. self.femcumStorage.amount += self.femcumScale * self.vaginaVolume / 1200;
  394. if (self.femcumStorage.amount > self.femcumStorage.limit)
  395. self.arouse(1 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
  396. setTimeout(function () { self.fillFemcum(self); }, 100);
  397. update();
  398. },
  399. "fillBreasts": function(self) {
  400. if (self.milkStorage.amount > self.milkStorage.limit) {
  401. breast_milk(null, self.milkStorage.amount - self.milkStorage.limit);
  402. }
  403. self.milkStorage.amount += self.lactationScale * self.milkStorage.limit / 1200;
  404. if (self.milkStorage.amount > self.milkStorage.limit) {
  405. self.milkStorage.amount = self.milkStorage.limit;
  406. }
  407. setTimeout(function () { self.fillBreasts(self); }, 100);
  408. update();
  409. },
  410. "cumStorage": {
  411. "amount": 0,
  412. get limit() {
  413. return this.owner.ballVolume;
  414. }
  415. },
  416. "femcumStorage": {
  417. "amount": 0,
  418. get limit() {
  419. return this.owner.vaginaVolume;
  420. }
  421. },
  422. "milkStorage": {
  423. "amount": 0,
  424. get limit() {
  425. return this.owner.breastVolume * 2;
  426. }
  427. },
  428. "orgasm": false,
  429. "afterglow": false,
  430. "arousalEnabled": true,
  431. "arousalFactor": 1,
  432. "arousal": 0,
  433. "edge": 0,
  434. "maleSpurt": 0,
  435. "femaleSpurt": 0,
  436. "arouse": function(amount) {
  437. if (!this.arousalEnabled)
  438. return;
  439. if (this.afterglow)
  440. return;
  441. this.arousal += amount * this.arousalFactor;
  442. if (this.arousal >= 200) {
  443. this.arousal = 200;
  444. if (!this.orgasm) {
  445. this.orgasm = true;
  446. update(["You shudder as ecstasy races up your spine",newline]);
  447. if (this.maleParts) {
  448. this.maleOrgasm(this);
  449. if (this.sheath.container.count > 0)
  450. sheath_crush();
  451. }
  452. if (this.femaleParts) {
  453. this.femaleOrgasm(this);
  454. }
  455. if (!this.maleParts && !this.femaleParts) {
  456. this.nullOrgasm(this);
  457. }
  458. }
  459. }
  460. },
  461. "quench": function(amount) {
  462. if (!this.arousalEnabled)
  463. return;
  464. this.arousal -= amount;
  465. if (this.arousal <= 100) {
  466. if (this.orgasm) {
  467. this.orgasm = false;
  468. this.afterglow = true;
  469. }
  470. }
  471. if (this.arousal < 0) {
  472. this.arousal = 0;
  473. this.afterglow = false;
  474. }
  475. update();
  476. },
  477. "quenchExcess": function(self) {
  478. if (self.arousalEnabled) {
  479. if (self.arousal > 100 && !self.orgasm) {
  480. self.arousal = Math.max(100,self.arousal-1);
  481. self.edge += Math.sqrt((self.arousal - 100)) / 500;
  482. self.edge = Math.min(1,self.edge);
  483. self.edge = Math.max(0,self.edge - 0.002);
  484. if (self.maleParts)
  485. self.maleSpurt += ((self.arousal-100)/100 + Math.random()) / 25 * (self.edge);
  486. if (self.femaleParts)
  487. self.femaleSpurt += ((self.arousal-100)/100 + Math.random()) / 25 * (self.edge);
  488. if (self.maleSpurt > 1) {
  489. male_spurt(macro.cumVolume * (0.1 + Math.random() / 10));
  490. self.maleSpurt = 0;
  491. }
  492. if (self.femaleSpurt > 1) {
  493. female_spurt(macro.femcumVolume * (0.1 + Math.random() / 10));
  494. self.femaleSpurt = 0;
  495. }
  496. update();
  497. } else if (self.afterglow) {
  498. self.quench(0.5);
  499. self.edge = Math.max(0,self.edge - 0.01);
  500. }
  501. }
  502. setTimeout(function() { self.quenchExcess(self); }, 200);
  503. },
  504. "maleOrgasm": function(self) {
  505. if (!this.arousalEnabled)
  506. return;
  507. if (self.orgasm) {
  508. self.quench(10);
  509. let amount = Math.min(this.cumVolume, this.cumStorage.amount);
  510. this.cumStorage.amount -= amount;
  511. male_orgasm(amount);
  512. setTimeout(function() { self.maleOrgasm(self); }, 2000);
  513. }
  514. },
  515. "femaleOrgasm": function(self) {
  516. if (!this.arousalEnabled)
  517. return;
  518. if (this.orgasm) {
  519. this.quench(10);
  520. let amount = Math.min(this.femcumVolume, this.femcumStorage.amount);
  521. this.femcumStorage.amount -= amount;
  522. female_orgasm(amount);
  523. setTimeout(function() { self.femaleOrgasm(self); }, 2000);
  524. }
  525. },
  526. "nullOrgasm": function(self) {
  527. if (!this.arousalEnabled)
  528. return;
  529. if (this.orgasm) {
  530. this.quench(10);
  531. setTimeout(function() { self.nullOrgasm(self); }, 2000);
  532. }
  533. },
  534. get description() {
  535. let result = [];
  536. let line = "You are " + (macro.name == "" ? "" : macro.name + ", ") + "a " + length(macro.height, unit, true) + " tall " + macro.species + ". You weigh " + mass(macro.mass, unit) + ".";
  537. result.push(line);
  538. if (this.hasTail) {
  539. line = "Your " + macro.describeTail + (macro.tailCount > 1 ? " tails sway as you walk. " : " tail sways as you walk. ");
  540. if (this.tailMaw) {
  541. line += (macro.tailCount > 1 ? "Their maws are drooling" : "Its maw is drooling");
  542. }
  543. result.push(line);
  544. }
  545. if (this.arousalEnabled) {
  546. if (this.afterglow) {
  547. result.push("You're basking in the afterglow of a powerful orgasm.");
  548. }
  549. else if (this.orgasm) {
  550. result.push("You're cumming!");
  551. } else if (this.arousal < 25) {
  552. } else if (this.arousal < 75) {
  553. result.push("You're feeling a little aroused.");
  554. } else if (this.arousal < 150) {
  555. result.push("You're feeling aroused.");
  556. } else if (this.arousal < 200) {
  557. result.push("You're on the edge of an orgasm!");
  558. }
  559. }
  560. if (this.maleParts) {
  561. if (this.hasSheath && this.arousal < 75) {
  562. line = "Your " + this.describeDick + " cock is hidden away in your bulging sheath, with two " + mass(macro.ballMass, unit, true) + ", " + length(macro.ballDiameter, unit, true) + "-wide balls hanging beneath.";
  563. }
  564. line = "Your " + this.describeDick + " cock hangs from your hips, with two " + mass(macro.ballMass, unit, true) + ", " + length(macro.ballDiameter, unit, true) + "-wide balls hanging beneath.";
  565. result.push(line);
  566. }
  567. if (this.femaleParts) {
  568. line = "Your glistening " + this.describeVagina + " slit peeks out from between your legs.";
  569. result.push(line);
  570. }
  571. if (this.hasBreasts) {
  572. line = "You have two " + length(this.breastDiameter, unit, true) + "-wide breasts that weigh " + mass(macro.breastMass, unit) + " apiece.";
  573. if (this.cleavage.container.count > 0)
  574. line += " Between them are " + this.cleavage.container.describe(false) + ".";
  575. result.push(line);
  576. }
  577. if (this.hasPouch) {
  578. line = this.pouch.description;
  579. result.push(line);
  580. }
  581. return result;
  582. },
  583. get describeTail() {
  584. return (this.tailCount > 1 ? this.tailCount + " " : "") + length(this.tailLength, unit, true) + "-long " + this.tailType;
  585. },
  586. get describeDick() {
  587. let state = "";
  588. if (!this.arousalEnabled) {
  589. state = "limp";
  590. } else if (this.orgasm) {
  591. state = "spurting";
  592. } else {
  593. if (this.arousal < 25) {
  594. state = "limp";
  595. } else if (this.arousal < 75) {
  596. state = "swelling";
  597. } else if (this.arousal < 100) {
  598. state = "erect";
  599. } else if (this.arousal < 150) {
  600. state = "erect, throbbing";
  601. } else if (this.arousal < 200) {
  602. state = "erect, throbbing, pre-soaked";
  603. }
  604. }
  605. return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType;
  606. },
  607. get describeVagina() {
  608. let state = "";
  609. if (!this.arousalEnabled) {
  610. state = "unassuming";
  611. } else if (this.orgasm) {
  612. state = "gushing, quivering";
  613. } else {
  614. if (this.arousal < 25) {
  615. state = "unassuming";
  616. } else if (this.arousal < 75) {
  617. state = "moist";
  618. } else if (this.arousal < 100) {
  619. state = "glistening";
  620. } else if (this.arousal < 150) {
  621. state = "dripping";
  622. } else if (this.arousal < 200) {
  623. state = "dripping, quivering";
  624. }
  625. }
  626. return length(this.vaginaLength, unit, true) + " long " + state;
  627. },
  628. "growthPoints": 0,
  629. "addGrowthPoints": function(mass) {
  630. this.growthPoints += Math.round(50 * mass / (this.scale*this.scale));
  631. },
  632. // 0 = entirely non-fatal
  633. // 1 = fatal, but not specific
  634. // 2 = gory
  635. "brutality": 1,
  636. "scale": 1,
  637. };
  638. function look()
  639. {
  640. let desc = macro.description;
  641. let line2 = "";
  642. if (macro.height > 1e12)
  643. line2 = "You're pretty much everywhere at once.";
  644. else if (macro.height > 1e6)
  645. line2 = "You're standing...on pretty much everything at once.";
  646. else
  647. switch(biome) {
  648. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  649. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  650. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  651. 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.";
  652. }
  653. desc = desc.concat([newline,line2,newline]);
  654. update(desc);
  655. }
  656. function get_living_prey(sum) {
  657. let total = 0;
  658. for (let key in sum) {
  659. if (sum.hasOwnProperty(key)) {
  660. if (key == "Person" || key == "Cow")
  661. total += sum[key];
  662. }
  663. }
  664. return total;
  665. }
  666. function toggle_auto()
  667. {
  668. strolling = !strolling;
  669. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  670. if (strolling)
  671. update(["You start walking.",newline]);
  672. else
  673. update(["You stop walking.",newline]);
  674. }
  675. function change_location()
  676. {
  677. switch(biome) {
  678. case "suburb": biome = "city"; break;
  679. case "city": biome = "downtown"; break;
  680. case "downtown": biome = "rural"; break;
  681. case "rural": biome = "suburb"; break;
  682. }
  683. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  684. }
  685. function toggle_units()
  686. {
  687. switch(unit) {
  688. case "metric": unit = "customary"; break;
  689. case "customary": unit = "approx"; break;
  690. case "approx": unit = "metric"; break;
  691. }
  692. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  693. update();
  694. }
  695. function toggle_numbers() {
  696. switch(numbers) {
  697. case "full": numbers="prefix"; break;
  698. case "prefix": numbers="words"; break;
  699. case "words": numbers = "scientific"; break;
  700. case "scientific": numbers = "full"; break;
  701. }
  702. document.getElementById("button-numbers").innerHTML = "Numbers: " + numbers.charAt(0).toUpperCase() + numbers.slice(1);
  703. update();
  704. }
  705. function toggle_verbose()
  706. {
  707. verbose = !verbose;
  708. document.getElementById("button-verbose").innerHTML = (verbose ? "Verbose" : "Simple");
  709. }
  710. function toggle_arousal()
  711. {
  712. macro.arousalEnabled = !macro.arousalEnabled;
  713. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  714. if (macro.arousalEnabled) {
  715. document.getElementById("arousal").style.display = "block";
  716. document.getElementById("edge").style.display = "block";
  717. } else {
  718. document.getElementById("arousal").style.display = "none";
  719. document.getElementById("edge").style.display = "none";
  720. }
  721. macro.orgasm = false;
  722. macro.afterglow = false;
  723. }
  724. function initVictims()
  725. {
  726. return {
  727. "Person": 0,
  728. "Cow": 0,
  729. "Car": 0,
  730. "Bus": 0,
  731. "Tram": 0,
  732. "Motorcycle": 0,
  733. "House": 0,
  734. "Barn": 0,
  735. "Small Skyscraper": 0,
  736. "Large Skyscraper": 0,
  737. "Train": 0,
  738. "Train Car": 0,
  739. "Parking Garage": 0,
  740. "Overpass": 0,
  741. "Town": 0,
  742. "City": 0,
  743. "Continent": 0,
  744. "Planet": 0,
  745. "Star": 0,
  746. "Solar System": 0,
  747. "Galaxy": 0
  748. };
  749. }
  750. // lists out total people
  751. function summarize(sum, fatal = true)
  752. {
  753. let word;
  754. let count = get_living_prey(sum);
  755. if (fatal && macro.brutality > 0)
  756. word = count > 1 ? "kills" : "kill";
  757. else if (!fatal && macro.brutality > 0)
  758. word = "prey";
  759. else
  760. word = count > 1 ? "victims" : "victim";
  761. return "<b>(" + count + " " + word + ")</b>";
  762. }
  763. function getOnePrey(biome,area)
  764. {
  765. let potential = ["Person"];
  766. if (macro.height > 1e12)
  767. potential = ["Planet","Star","Solar System","Galaxy"];
  768. else if (macro.height > 1e6)
  769. potential = ["Town","City","Continent","Planet"];
  770. else
  771. switch(biome) {
  772. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  773. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  774. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Large Skyscraper", "Parking Garage"]; break;
  775. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  776. }
  777. let potAreas = [];
  778. potential.forEach(function (x) {
  779. potAreas.push([x,areas[x]]);
  780. });
  781. potAreas = potAreas.sort(function (x,y) {
  782. return y[1] - x[1];
  783. });
  784. for (let i=0; i<potAreas.length; i++) {
  785. let x = potAreas[i];
  786. if (x[1] < area) {
  787. return new Container([new things[x[0]](1)]);
  788. }
  789. }
  790. return new Container([new Person(1)]);
  791. }
  792. function getPrey(region, area)
  793. {
  794. let weights = {"Person": 1};
  795. if (macro.height > 1e12) {
  796. weights = {
  797. "Planet": 1.47e-10,
  798. "Star": 1.7713746e-12,
  799. "Solar System": 4e-10,
  800. "Galaxy": 0.1,
  801. };
  802. }
  803. else if (macro.height > 1e6) {
  804. weights = {
  805. "Town": 0.00001,
  806. "City": 0.00005,
  807. "Continent": 0.0005,
  808. "Planet": 0.0001
  809. };
  810. }
  811. else {
  812. switch(region)
  813. {
  814. case "rural": weights = {
  815. "Person": 0.005,
  816. "House": 0.001,
  817. "Barn": 0.001,
  818. "Cow": 0.02
  819. }; break;
  820. case "suburb": weights = {
  821. "Person": 0.03,
  822. "House": 0.15,
  823. "Car": 0.05,
  824. "Bus": 0.02,
  825. "Train": 0.02,
  826. }; break;
  827. case "city": weights = {
  828. "Person": 0.05,
  829. "House": 0.1,
  830. "Car": 0.07,
  831. "Bus": 0.02,
  832. "Parking Garage": 0.003,
  833. "Small Skyscraper": 0.05,
  834. }; break;
  835. case "downtown": weights = {
  836. "Person": 0.1,
  837. "Car": 0.1,
  838. "Bus": 0.05,
  839. "Tram": 0.01,
  840. "Parking Garage": 0.005,
  841. "Small Skyscraper": 0.4,
  842. "Large Skyscraper": 0.1
  843. }; break;
  844. }
  845. }
  846. return fill_area(area,weights);
  847. }
  848. function updateVictims(type,prey)
  849. {
  850. /*
  851. let sums = prey.sum();
  852. for (let key in sums) {
  853. if (sums.hasOwnProperty(key)) {
  854. victims[type][key] += sums[key];
  855. }
  856. }*/
  857. }
  858. function feed()
  859. {
  860. let area = macro.handArea;
  861. let prey = getPrey(biome, area);
  862. let line = describe("eat", prey, macro, verbose);
  863. let linesummary = summarize(prey.sum(), false);
  864. let people = get_living_prey(prey.sum());
  865. let sound = "";
  866. if (people == 0) {
  867. sound = "";
  868. } else if (people < 3) {
  869. sound = "Ulp.";
  870. } else if (people < 10) {
  871. sound = "Gulp.";
  872. } else if (people < 50) {
  873. sound = "Glrrp.";
  874. } else if (people < 500) {
  875. sound = "Glrrrpkh!";
  876. } else if (people < 5000) {
  877. sound = "GLRRKPKH!";
  878. } else {
  879. sound = "Oh the humanity!";
  880. }
  881. let preyMass = prey.sum_property("mass");
  882. macro.addGrowthPoints(preyMass);
  883. macro.stomach.feed(prey);
  884. macro.arouse(5);
  885. updateVictims("stomach",prey);
  886. update([sound,line,linesummary,newline]);
  887. }
  888. function chew()
  889. {
  890. let area = macro.handArea;
  891. let prey = getPrey(biome, area);
  892. let line = describe("chew", prey, macro, verbose);
  893. let linesummary = summarize(prey.sum(), false);
  894. let people = get_living_prey(prey.sum());
  895. let sound = "";
  896. if (people == 0) {
  897. sound = "";
  898. } else if (people < 3) {
  899. sound = "Snap.";
  900. } else if (people < 10) {
  901. sound = "Crunch.";
  902. } else if (people < 50) {
  903. sound = "Crack!";
  904. } else if (people < 500) {
  905. sound = "CRUNCH!";
  906. } else if (people < 5000) {
  907. sound = "CRRRUNCH!";
  908. } else {
  909. sound = "Oh the humanity!";
  910. }
  911. let preyMass = prey.sum_property("mass");
  912. macro.addGrowthPoints(preyMass);
  913. macro.arouse(10);
  914. updateVictims("digested",prey);
  915. update([sound,line,linesummary,newline]);
  916. }
  917. function stomp()
  918. {
  919. let area = macro.pawArea;
  920. let prey = getPrey(biome, area);
  921. let line = describe("stomp", prey, macro, verbose);
  922. let linesummary = summarize(prey.sum(), true);
  923. let people = get_living_prey(prey.sum());
  924. let sound = "Thump";
  925. if (people < 3) {
  926. sound = "Thump!";
  927. } else if (people < 10) {
  928. sound = "Squish!";
  929. } else if (people < 50) {
  930. sound = "Crunch!";
  931. } else if (people < 500) {
  932. sound = "CRUNCH!";
  933. } else if (people < 5000) {
  934. sound = "CRRUUUNCH!!";
  935. } else {
  936. sound = "Oh the humanity!";
  937. }
  938. let preyMass = prey.sum_property("mass");
  939. macro.addGrowthPoints(preyMass);
  940. macro.arouse(5);
  941. updateVictims("stomped",prey);
  942. update([sound,line,linesummary,newline]);
  943. }
  944. function grind()
  945. {
  946. let area = macro.assArea / 2;
  947. if (macro.maleParts)
  948. area += macro.dickArea;
  949. if (macro.femalePartS)
  950. area += macro.vaginaArea;
  951. let prey = getPrey(biome,area);
  952. let line = describe("grind", prey, macro, verbose);
  953. let linesummary = summarize(prey.sum(), true);
  954. let people = get_living_prey(prey.sum());
  955. let sound = "";
  956. if (people < 3) {
  957. sound = "Thump.";
  958. } else if (people < 10) {
  959. sound = "Crunch.";
  960. } else if (people < 50) {
  961. sound = "Crrrrunch.";
  962. } else if (people < 500) {
  963. sound = "SMASH!";
  964. } else if (people < 5000) {
  965. sound = "CCCRASH!!";
  966. } else {
  967. sound = "Oh the humanity!";
  968. }
  969. let preyMass = prey.sum_property("mass");
  970. macro.addGrowthPoints(preyMass);
  971. macro.arouse(20);
  972. updateVictims("ground",prey);
  973. update([sound,line,linesummary,newline]);
  974. }
  975. function anal_vore()
  976. {
  977. let area = macro.analVoreArea;
  978. let prey = getOnePrey(biome,area);
  979. let line = describe("anal-vore", prey, macro, verbose);
  980. let linesummary = summarize(prey.sum(), false);
  981. let people = get_living_prey(prey.sum());
  982. let sound = "Shlp";
  983. if (people < 3) {
  984. sound = "Shlp.";
  985. } else if (people < 10) {
  986. sound = "Squelch.";
  987. } else if (people < 50) {
  988. sound = "Shlurrp.";
  989. } else if (people < 500) {
  990. sound = "SHLRP!";
  991. } else if (people < 5000) {
  992. sound = "SQLCH!!";
  993. } else {
  994. sound = "Oh the humanity!";
  995. }
  996. let preyMass = prey.sum_property("mass");
  997. macro.addGrowthPoints(preyMass);
  998. macro.bowels.feed(prey);
  999. macro.arouse(20);
  1000. updateVictims("bowels",prey);
  1001. update([sound,line,linesummary,newline]);
  1002. }
  1003. function sit()
  1004. {
  1005. if (macro.analVore)
  1006. anal_vore();
  1007. let area = macro.assArea;
  1008. let crushed = getPrey(biome,area);
  1009. let line = describe("ass-crush", crushed, macro, verbose);
  1010. let linesummary = summarize(crushed.sum(), true);
  1011. let people = get_living_prey(crushed.sum());
  1012. let sound = "Thump";
  1013. if (people < 3) {
  1014. sound = "Thump!";
  1015. } else if (people < 10) {
  1016. sound = "Squish!";
  1017. } else if (people < 50) {
  1018. sound = "Crunch!";
  1019. } else if (people < 500) {
  1020. sound = "CRUNCH!";
  1021. } else if (people < 5000) {
  1022. sound = "CRRUUUNCH!!";
  1023. } else {
  1024. sound = "Oh the humanity!";
  1025. }
  1026. let crushedMass = crushed.sum_property("mass");
  1027. macro.addGrowthPoints(crushedMass);
  1028. macro.arouse(5);
  1029. updateVictims("stomped",crushed);
  1030. update([sound,line,linesummary,newline]);
  1031. }
  1032. function cleavage_stuff()
  1033. {
  1034. let area = macro.handArea;
  1035. let prey = getPrey(biome, area);
  1036. let line = describe("cleavage-stuff", prey, macro, verbose);
  1037. let linesummary = summarize(prey.sum(), false);
  1038. let people = get_living_prey(prey.sum());
  1039. let sound = "Thump";
  1040. if (people < 3) {
  1041. sound = "Thump!";
  1042. } else if (people < 10) {
  1043. sound = "Squish!";
  1044. } else if (people < 50) {
  1045. sound = "Smish!";
  1046. } else if (people < 500) {
  1047. sound = "SQUISH!";
  1048. } else if (people < 5000) {
  1049. sound = "SMISH!";
  1050. } else {
  1051. sound = "Oh the humanity!";
  1052. }
  1053. macro.arouse(10);
  1054. macro.cleavage.add(prey);
  1055. updateVictims("cleavage",prey);
  1056. update([sound,line,linesummary,newline]);
  1057. }
  1058. function cleavage_crush()
  1059. {
  1060. let prey = macro.cleavage.container;
  1061. macro.cleavage.container = new Container();
  1062. let line = describe("cleavage-crush", prey, macro, verbose);
  1063. let linesummary = summarize(prey.sum(), true);
  1064. let people = get_living_prey(prey.sum());
  1065. let sound = "Thump";
  1066. if (people < 3) {
  1067. sound = "Thump!";
  1068. } else if (people < 10) {
  1069. sound = "Squish!";
  1070. } else if (people < 50) {
  1071. sound = "Smish!";
  1072. } else if (people < 500) {
  1073. sound = "SQUISH!";
  1074. } else if (people < 5000) {
  1075. sound = "SMISH!";
  1076. } else {
  1077. sound = "Oh the humanity!";
  1078. }
  1079. let preyMass = prey.sum_property("mass");
  1080. macro.addGrowthPoints(preyMass);
  1081. macro.arouse((preyMass > 0 ? 20 : 10));
  1082. updateVictims("cleavagecrushed",prey);
  1083. update([sound,line,linesummary,newline]);
  1084. }
  1085. function cleavage_drop()
  1086. {
  1087. let prey = macro.cleavage.container;
  1088. macro.cleavage.container = new Container();
  1089. let line = describe("cleavage-drop", prey, macro, verbose);
  1090. let linesummary = summarize(prey.sum(), true);
  1091. let people = get_living_prey(prey.sum());
  1092. let sound = "Thump";
  1093. if (people < 3) {
  1094. sound = "Thump.";
  1095. } else if (people < 10) {
  1096. sound = "Splat.";
  1097. } else if (people < 50) {
  1098. sound = "Thump!";
  1099. } else if (people < 500) {
  1100. sound = "THUMP!";
  1101. } else if (people < 5000) {
  1102. sound = "SPLAT!!";
  1103. } else {
  1104. sound = "Oh the humanity!";
  1105. }
  1106. let preyMass = prey.sum_property("mass");
  1107. macro.addGrowthPoints(preyMass);
  1108. macro.arouse((preyMass > 0 ? 15 : 5));
  1109. updateVictims("cleavagedropped",prey);
  1110. update([sound,line,linesummary,newline]);
  1111. }
  1112. function cleavage_absorb()
  1113. {
  1114. let prey = macro.cleavage.container;
  1115. macro.cleavage.container = new Container();
  1116. let line = describe("cleavage-absorb", prey, macro, verbose);
  1117. let linesummary = summarize(prey.sum(), true);
  1118. let people = get_living_prey(prey.sum());
  1119. let sound = "Thump";
  1120. if (people < 3) {
  1121. sound = "Shlp.";
  1122. } else if (people < 10) {
  1123. sound = "Slurp.";
  1124. } else if (people < 50) {
  1125. sound = "Shlrrrrp!";
  1126. } else if (people < 500) {
  1127. sound = "SHLRP!";
  1128. } else if (people < 5000) {
  1129. sound = "SHLLLLURP!!";
  1130. } else {
  1131. sound = "Oh the humanity!";
  1132. }
  1133. let preyMass = prey.sum_property("mass");
  1134. macro.addGrowthPoints(preyMass);
  1135. macro.arouse((preyMass > 0 ? 15 : 5));
  1136. updateVictims("cleavageabsorbed",prey);
  1137. update([sound,line,linesummary,newline]);
  1138. }
  1139. function breast_crush()
  1140. {
  1141. let area = macro.breastArea;
  1142. let prey = getPrey(biome, area);
  1143. let line = describe("breast-crush", prey, macro, verbose);
  1144. let linesummary = summarize(prey.sum(), true);
  1145. let people = get_living_prey(prey.sum());
  1146. let sound = "Thump";
  1147. if (people < 3) {
  1148. sound = "Thump!";
  1149. } else if (people < 10) {
  1150. sound = "Squish!";
  1151. } else if (people < 50) {
  1152. sound = "Crunch!";
  1153. } else if (people < 500) {
  1154. sound = "CRUNCH!";
  1155. } else if (people < 5000) {
  1156. sound = "CRRUUUNCH!!";
  1157. } else {
  1158. sound = "Oh the humanity!";
  1159. }
  1160. let preyMass = prey.sum_property("mass");
  1161. macro.addGrowthPoints(preyMass);
  1162. macro.arouse(10);
  1163. updateVictims("breasts",prey);
  1164. update([sound,line,linesummary,newline]);
  1165. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  1166. let amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  1167. breast_milk(null, amount);
  1168. }
  1169. }
  1170. function breast_vore()
  1171. {
  1172. // todo nipple areas?
  1173. let area = macro.breastArea/2;
  1174. let prey = getPrey(biome, area);
  1175. let line = describe("breast-vore", prey, macro, verbose);
  1176. let linesummary = summarize(prey.sum(), false);
  1177. let people = get_living_prey(prey.sum());
  1178. let sound = "";
  1179. if (people < 3) {
  1180. sound = "Shlp.";
  1181. } else if (people < 10) {
  1182. sound = "Slurp.";
  1183. } else if (people < 50) {
  1184. sound = "Shlrrrrp!";
  1185. } else if (people < 500) {
  1186. sound = "SHLRP!";
  1187. } else if (people < 5000) {
  1188. sound = "SHLLLLURP!!";
  1189. } else {
  1190. sound = "Oh the humanity!";
  1191. }
  1192. let preyMass = prey.sum_property("mass");
  1193. macro.addGrowthPoints(preyMass);
  1194. macro.breasts.feed(prey);
  1195. macro.arouse(10);
  1196. updateVictims("breastvored",prey);
  1197. update([sound,line,linesummary,newline]);
  1198. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  1199. let amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  1200. breast_milk(null, amount);
  1201. }
  1202. }
  1203. function breast_milk(e,vol)
  1204. {
  1205. if (vol == undefined) {
  1206. vol = Math.min(macro.lactationVolume, macro.milkStorage.amount);
  1207. }
  1208. macro.milkStorage.amount -= vol;
  1209. let area = Math.pow(vol, 2/3);
  1210. let prey = getPrey(biome, area);
  1211. let line = describe("breast-milk", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1212. let linesummary = summarize(prey.sum(), true);
  1213. let people = get_living_prey(prey.sum());
  1214. let sound = "Dribble.";
  1215. if (people < 3) {
  1216. sound = "Dribble.";
  1217. } else if (people < 10) {
  1218. sound = "Splash.";
  1219. } else if (people < 50) {
  1220. sound = "Splash!";
  1221. } else if (people < 500) {
  1222. sound = "SPLOOSH!";
  1223. } else if (people < 5000) {
  1224. sound = "SPLOOOOOOOOOOSH!!";
  1225. } else {
  1226. sound = "Oh the humanity!";
  1227. }
  1228. let preyMass = prey.sum_property("mass");
  1229. macro.addGrowthPoints(preyMass);
  1230. macro.arouse(20);
  1231. updateVictims("flooded",prey);
  1232. update([sound,line,linesummary,newline]);
  1233. }
  1234. function unbirth()
  1235. {
  1236. let area = macro.vaginaArea;
  1237. let prey = getPrey(biome, area);
  1238. let line = describe("unbirth", prey, macro, verbose);
  1239. let linesummary = summarize(prey.sum(), false);
  1240. let people = get_living_prey(prey.sum());
  1241. let sound = "";
  1242. if (people < 3) {
  1243. sound = "Shlp.";
  1244. } else if (people < 10) {
  1245. sound = "Squelch.";
  1246. } else if (people < 50) {
  1247. sound = "Shlurrp.";
  1248. } else if (people < 500) {
  1249. sound = "SHLRP!";
  1250. } else if (people < 5000) {
  1251. sound = "SQLCH!!";
  1252. } else {
  1253. sound = "Oh the humanity!";
  1254. }
  1255. let preyMass = prey.sum_property("mass");
  1256. macro.addGrowthPoints(preyMass);
  1257. macro.womb.feed(prey);
  1258. macro.arouse(20);
  1259. updateVictims("womb",prey);
  1260. update([sound,line,linesummary,newline]);
  1261. }
  1262. function sheath_stuff()
  1263. {
  1264. let area = Math.min(macro.handArea, macro.dickGirth*3);
  1265. let prey = getPrey(biome, area);
  1266. let line = describe("sheath-stuff", prey, macro, verbose);
  1267. let linesummary = summarize(prey.sum(), false);
  1268. let people = get_living_prey(prey.sum());
  1269. let sound = "";
  1270. if (people < 3) {
  1271. sound = "Shlp.";
  1272. } else if (people < 10) {
  1273. sound = "Squelch.";
  1274. } else if (people < 50) {
  1275. sound = "Shlurrp.";
  1276. } else if (people < 500) {
  1277. sound = "SHLRP!";
  1278. } else if (people < 5000) {
  1279. sound = "SQLCH!!";
  1280. } else {
  1281. sound = "Oh the humanity!";
  1282. }
  1283. macro.sheath.add(prey);
  1284. macro.arouse(15);
  1285. updateVictims("sheath",prey);
  1286. update([sound,line,linesummary,newline]);
  1287. }
  1288. function sheath_squeeze()
  1289. {
  1290. let prey = macro.sheath.container;
  1291. let line = describe("sheath-squeeze", prey, macro, verbose);
  1292. let linesummary = summarize(prey.sum(), false);
  1293. let people = get_living_prey(prey.sum());
  1294. let sound = "";
  1295. if (people < 3) {
  1296. sound = "Shlp.";
  1297. } else if (people < 10) {
  1298. sound = "Squelch.";
  1299. } else if (people < 50) {
  1300. sound = "Shlurrp.";
  1301. } else if (people < 500) {
  1302. sound = "SHLRP!";
  1303. } else if (people < 5000) {
  1304. sound = "SQLCH!!";
  1305. } else {
  1306. sound = "Oh the humanity!";
  1307. }
  1308. macro.arouse(15);
  1309. update([sound,line,linesummary,newline]);
  1310. }
  1311. function sheath_crush()
  1312. {
  1313. let prey = macro.sheath.container;
  1314. macro.sheath.container = new Container();
  1315. let line = describe("sheath-crush", prey, macro, verbose);
  1316. let linesummary = summarize(prey.sum(), true);
  1317. let people = get_living_prey(prey.sum());
  1318. let sound = "";
  1319. if (people < 3) {
  1320. sound = "Shlp.";
  1321. } else if (people < 10) {
  1322. sound = "Squelch.";
  1323. } else if (people < 50) {
  1324. sound = "Shlurrp.";
  1325. } else if (people < 500) {
  1326. sound = "SHLRP!";
  1327. } else if (people < 5000) {
  1328. sound = "SQLCH!!";
  1329. } else {
  1330. sound = "Oh the humanity!";
  1331. }
  1332. macro.arouse(45);
  1333. update([sound,line,linesummary,newline]);
  1334. }
  1335. function sheath_absorb()
  1336. {
  1337. let prey = macro.sheath.container;
  1338. macro.sheath.container = new Container();
  1339. let line = describe("sheath-absorb", prey, macro, verbose);
  1340. let linesummary = summarize(prey.sum(), true);
  1341. let people = get_living_prey(prey.sum());
  1342. let sound = "";
  1343. if (people < 3) {
  1344. sound = "Shlp.";
  1345. } else if (people < 10) {
  1346. sound = "Squelch.";
  1347. } else if (people < 50) {
  1348. sound = "Shlurrp.";
  1349. } else if (people < 500) {
  1350. sound = "SHLRP!";
  1351. } else if (people < 5000) {
  1352. sound = "SQLCH!!";
  1353. } else {
  1354. sound = "Oh the humanity!";
  1355. }
  1356. macro.arouse(45);
  1357. update([sound,line,linesummary,newline]);
  1358. }
  1359. function cockslap()
  1360. {
  1361. let area = macro.dickArea;
  1362. let prey = getPrey(biome, area);
  1363. let line = describe("cockslap", prey, macro, verbose);
  1364. let linesummary = summarize(prey.sum(), true);
  1365. let people = get_living_prey(prey.sum());
  1366. let sound = "Thump";
  1367. if (people < 3) {
  1368. sound = "Thump!";
  1369. } else if (people < 10) {
  1370. sound = "Squish!";
  1371. } else if (people < 50) {
  1372. sound = "Crunch!";
  1373. } else if (people < 500) {
  1374. sound = "CRUNCH!";
  1375. } else if (people < 5000) {
  1376. sound = "CRRUUUNCH!!";
  1377. } else {
  1378. sound = "Oh the humanity!";
  1379. }
  1380. let preyMass = prey.sum_property("mass");
  1381. macro.addGrowthPoints(preyMass);
  1382. macro.arouse(15);
  1383. updateVictims("cock",prey);
  1384. update([sound,line,linesummary,newline]);
  1385. }
  1386. function cock_vore()
  1387. {
  1388. let area = macro.dickGirth;
  1389. let prey = getPrey(biome, area);
  1390. let line = describe("cock-vore", prey, macro, verbose);
  1391. let linesummary = summarize(prey.sum(), false);
  1392. let people = get_living_prey(prey.sum());
  1393. let sound = "lp";
  1394. if (people < 3) {
  1395. sound = "Shlp.";
  1396. } else if (people < 10) {
  1397. sound = "Squelch.";
  1398. } else if (people < 50) {
  1399. sound = "Shlurrp.";
  1400. } else if (people < 500) {
  1401. sound = "SHLRP!";
  1402. } else if (people < 5000) {
  1403. sound = "SQLCH!!";
  1404. } else {
  1405. sound = "Oh the humanity!";
  1406. }
  1407. let preyMass = prey.sum_property("mass");
  1408. macro.addGrowthPoints(preyMass);
  1409. macro.balls.feed(prey);
  1410. macro.arouse(20);
  1411. updateVictims("balls",prey);
  1412. update([sound,line,linesummary,newline]);
  1413. }
  1414. function ball_smother()
  1415. {
  1416. let area = macro.ballArea * 2;
  1417. let prey = getPrey(biome, area);
  1418. let line = describe("ball-smother", prey, macro, verbose);
  1419. let linesummary = summarize(prey.sum(), true);
  1420. let people = get_living_prey(prey.sum());
  1421. let sound = "Thump";
  1422. if (people < 3) {
  1423. sound = "Thump!";
  1424. } else if (people < 10) {
  1425. sound = "Squish!";
  1426. } else if (people < 50) {
  1427. sound = "Smoosh!";
  1428. } else if (people < 500) {
  1429. sound = "SMOOSH!";
  1430. } else if (people < 5000) {
  1431. sound = "SMOOOOOSH!!";
  1432. } else {
  1433. sound = "Oh the humanity!";
  1434. }
  1435. let preyMass = prey.sum_property("mass");
  1436. macro.addGrowthPoints(preyMass);
  1437. macro.arouse(10);
  1438. updateVictims("balls",prey);
  1439. update([sound,line,linesummary,newline]);
  1440. }
  1441. function male_spurt(vol)
  1442. {
  1443. let area = Math.pow(vol, 2/3);
  1444. let prey = getPrey(biome, area);
  1445. let line = describe("male-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1446. let linesummary = summarize(prey.sum(), true);
  1447. let people = get_living_prey(prey.sum());
  1448. let sound = "Spurt!";
  1449. if (people < 3) {
  1450. sound = "Spurt!";
  1451. } else if (people < 10) {
  1452. sound = "Sploosh!";
  1453. } else if (people < 50) {
  1454. sound = "Sploooooosh!";
  1455. } else if (people < 500) {
  1456. sound = "SPLOOSH!";
  1457. } else if (people < 5000) {
  1458. sound = "SPLOOOOOOOOOOSH!!";
  1459. } else {
  1460. sound = "Oh the humanity!";
  1461. }
  1462. let preyMass = prey.sum_property("mass");
  1463. macro.addGrowthPoints(preyMass);
  1464. updateVictims("splooged",prey);
  1465. update([sound,line,linesummary,newline]);
  1466. }
  1467. function male_orgasm(vol)
  1468. {
  1469. let area = Math.pow(vol, 2/3);
  1470. let prey = getPrey(biome, area);
  1471. let line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1472. let linesummary = summarize(prey.sum(), true);
  1473. let people = get_living_prey(prey.sum());
  1474. let sound = "Spurt!";
  1475. if (people < 3) {
  1476. sound = "Spurt!";
  1477. } else if (people < 10) {
  1478. sound = "Sploosh!";
  1479. } else if (people < 50) {
  1480. sound = "Sploooooosh!";
  1481. } else if (people < 500) {
  1482. sound = "SPLOOSH!";
  1483. } else if (people < 5000) {
  1484. sound = "SPLOOOOOOOOOOSH!!";
  1485. } else {
  1486. sound = "Oh the humanity!";
  1487. }
  1488. let preyMass = prey.sum_property("mass");
  1489. macro.addGrowthPoints(preyMass);
  1490. updateVictims("splooged",prey);
  1491. update([sound,line,linesummary,newline]);
  1492. }
  1493. function female_spurt(vol)
  1494. {
  1495. let area = Math.pow(vol, 2/3);
  1496. let prey = getPrey(biome, area);
  1497. let line = describe("female-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1498. let linesummary = summarize(prey.sum(), true);
  1499. let people = get_living_prey(prey.sum());
  1500. let sound = "Spurt!";
  1501. if (people < 3) {
  1502. sound = "Spurt!";
  1503. } else if (people < 10) {
  1504. sound = "Sploosh!";
  1505. } else if (people < 50) {
  1506. sound = "Sploooooosh!";
  1507. } else if (people < 500) {
  1508. sound = "SPLOOSH!";
  1509. } else if (people < 5000) {
  1510. sound = "SPLOOOOOOOOOOSH!!";
  1511. } else {
  1512. sound = "Oh the humanity!";
  1513. }
  1514. let preyMass = prey.sum_property("mass");
  1515. macro.addGrowthPoints(preyMass);
  1516. updateVictims("splooged",prey);
  1517. update([sound,line,linesummary,newline]);
  1518. }
  1519. function female_orgasm(vol)
  1520. {
  1521. let area = Math.pow(vol, 2/3);
  1522. let prey = getPrey(biome, area);
  1523. let line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1524. let linesummary = summarize(prey.sum(), true);
  1525. let people = get_living_prey(prey.sum());
  1526. let sound = "Spurt!";
  1527. if (people < 3) {
  1528. sound = "Spurt!";
  1529. } else if (people < 10) {
  1530. sound = "Sploosh!";
  1531. } else if (people < 50) {
  1532. sound = "Sploooooosh!";
  1533. } else if (people < 500) {
  1534. sound = "SPLOOSH!";
  1535. } else if (people < 5000) {
  1536. sound = "SPLOOOOOOOOOOSH!!";
  1537. } else {
  1538. sound = "Oh the humanity!";
  1539. }
  1540. let preyMass = prey.sum_property("mass");
  1541. macro.addGrowthPoints(preyMass);
  1542. updateVictims("splooged",prey);
  1543. update([sound,line,linesummary,newline]);
  1544. }
  1545. function tail_slap()
  1546. {
  1547. let area = macro.tailArea * macro.tailCount;
  1548. let prey = getPrey(biome, area);
  1549. let line = describe("tail-slap", prey, macro, verbose);
  1550. let linesummary = summarize(prey.sum(), true);
  1551. let people = get_living_prey(prey.sum());
  1552. let sound = "Thump";
  1553. if (people < 3) {
  1554. sound = "Thump!";
  1555. } else if (people < 10) {
  1556. sound = "Squish!";
  1557. } else if (people < 50) {
  1558. sound = "Crunch!";
  1559. } else if (people < 500) {
  1560. sound = "CRUNCH!";
  1561. } else if (people < 5000) {
  1562. sound = "CRRUUUNCH!!";
  1563. } else {
  1564. sound = "Oh the humanity!";
  1565. }
  1566. let preyMass = prey.sum_property("mass");
  1567. macro.addGrowthPoints(preyMass);
  1568. macro.arouse(5);
  1569. updateVictims("tailslapped",prey);
  1570. update([sound,line,linesummary,newline]);
  1571. }
  1572. function tail_vore()
  1573. {
  1574. let area = macro.tailGirth * macro.tailCount;
  1575. let prey = getPrey(biome, area);
  1576. let line = describe("tail-vore", prey, macro, verbose);
  1577. let linesummary = summarize(prey.sum(), false);
  1578. let people = get_living_prey(prey.sum());
  1579. let sound = "";
  1580. if (people == 0) {
  1581. sound = "";
  1582. } else if (people < 3) {
  1583. sound = "Ulp.";
  1584. } else if (people < 10) {
  1585. sound = "Gulp.";
  1586. } else if (people < 50) {
  1587. sound = "Glrrp.";
  1588. } else if (people < 500) {
  1589. sound = "Glrrrpkh!";
  1590. } else if (people < 5000) {
  1591. sound = "GLRRKPKH!";
  1592. } else {
  1593. sound = "Oh the humanity!";
  1594. }
  1595. let preyMass = prey.sum_property("mass");
  1596. macro.addGrowthPoints(preyMass);
  1597. macro.arouse(5);
  1598. macro.stomach.feed(prey);
  1599. updateVictims("tailmaw'd",prey);
  1600. update([sound,line,linesummary,newline]);
  1601. }
  1602. function pouch_stuff()
  1603. {
  1604. let area = macro.handArea;
  1605. let prey = getPrey(biome, area);
  1606. let line = describe("pouch-stuff", prey, macro, verbose);
  1607. let linesummary = summarize(prey.sum(), false);
  1608. let people = get_living_prey(prey.sum());
  1609. let sound = "Thump";
  1610. if (people < 3) {
  1611. sound = "Slp.";
  1612. } else if (people < 10) {
  1613. sound = "Squeeze.";
  1614. } else if (people < 50) {
  1615. sound = "Thump!";
  1616. } else if (people < 500) {
  1617. sound = "THOOOMP!";
  1618. } else if (people < 5000) {
  1619. sound = "THOOOOOOOMP!";
  1620. } else {
  1621. sound = "Oh the humanity!";
  1622. }
  1623. macro.arouse(5);
  1624. macro.pouch.add(prey);
  1625. updateVictims("pouched",prey);
  1626. update([sound,line,linesummary,newline]);
  1627. }
  1628. function pouch_eat()
  1629. {
  1630. let prey = macro.pouch.container;
  1631. macro.pouch.container = new Container();
  1632. let line = describe("pouch-eat", prey, macro, verbose);
  1633. let linesummary = summarize(prey.sum(), false);
  1634. let people = get_living_prey(prey.sum());
  1635. let sound = "";
  1636. if (people == 0) {
  1637. sound = "";
  1638. } else if (people < 3) {
  1639. sound = "Ulp.";
  1640. } else if (people < 10) {
  1641. sound = "Gulp.";
  1642. } else if (people < 50) {
  1643. sound = "Glrrp.";
  1644. } else if (people < 500) {
  1645. sound = "Glrrrpkh!";
  1646. } else if (people < 5000) {
  1647. sound = "GLRRKPKH!";
  1648. } else {
  1649. sound = "Oh the humanity!";
  1650. }
  1651. let preyMass = prey.sum_property("mass");
  1652. macro.addGrowthPoints(preyMass);
  1653. macro.stomach.feed(prey);
  1654. macro.arouse(5);
  1655. updateVictims("stomach",prey);
  1656. update([sound,line,linesummary,newline]);
  1657. }
  1658. function soul_vore()
  1659. {
  1660. let area = macro.height * macro.height;
  1661. let prey = getPrey(biome,area);
  1662. let line = describe("soul-vore", prey, macro, verbose);
  1663. let linesummary = summarize(prey.sum(), false);
  1664. let people = get_living_prey(prey.sum());
  1665. let sound = "";
  1666. if (people == 0) {
  1667. sound = "";
  1668. } else if (people < 3) {
  1669. sound = "Ulp.";
  1670. } else if (people < 10) {
  1671. sound = "Gulp.";
  1672. } else if (people < 50) {
  1673. sound = "Glrrp.";
  1674. } else if (people < 500) {
  1675. sound = "Glrrrpkh!";
  1676. } else if (people < 5000) {
  1677. sound = "GLRRKPKH!";
  1678. } else {
  1679. sound = "Oh the humanity!";
  1680. }
  1681. let preyMass = prey.sum_property("mass");
  1682. macro.addGrowthPoints(preyMass);
  1683. macro.souls.feed(prey);
  1684. macro.arouse(15);
  1685. updateVictims("soulvore",prey);
  1686. update([sound,line,linesummary,newline]);
  1687. }
  1688. function soul_absorb_paw()
  1689. {
  1690. let prey = getPrey(biome,macro.pawArea);
  1691. let line = describe("soul-absorb-paw", prey, macro, verbose);
  1692. let linesummary = summarize(prey.sum(), true);
  1693. let people = get_living_prey(prey.sum());
  1694. let sound = "";
  1695. if (people < 3) {
  1696. sound = "Thump!";
  1697. } else if (people < 10) {
  1698. sound = "Squish!";
  1699. } else if (people < 50) {
  1700. sound = "Crunch!";
  1701. } else if (people < 500) {
  1702. sound = "CRUNCH!";
  1703. } else if (people < 5000) {
  1704. sound = "CRRUUUNCH!!";
  1705. } else {
  1706. sound = "Oh the humanity!";
  1707. }
  1708. let preyMass = prey.sum_property("mass");
  1709. macro.addGrowthPoints(preyMass);
  1710. macro.arouse(25);
  1711. updateVictims("soulpaw",prey);
  1712. update([sound,line,linesummary,newline]);
  1713. }
  1714. function transformNumbers(line)
  1715. {
  1716. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  1717. }
  1718. function update(lines = [])
  1719. {
  1720. let log = document.getElementById("log");
  1721. lines.forEach(function (x) {
  1722. let line = document.createElement('div');
  1723. line.innerHTML = transformNumbers(x);
  1724. log.appendChild(line);
  1725. });
  1726. if (lines.length > 0)
  1727. log.scrollTop = log.scrollHeight;
  1728. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  1729. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  1730. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  1731. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  1732. document.getElementById("edge").innerHTML = "Edge: " + round(macro.edge * 100,0) + "%";
  1733. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false));
  1734. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  1735. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  1736. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  1737. document.getElementById("milk").innerHTML = "Milk: " + transformNumbers(volume(macro.milkStorage.amount,unit,false));
  1738. document.getElementById("milkPercent").innerHTML = Math.round(macro.milkStorage.amount / macro.milkStorage.limit * 100) + "%";
  1739. for (let type in victims) {
  1740. if (victims.hasOwnProperty(type)) {
  1741. for (let key in victims[type]){
  1742. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  1743. document.getElementById("stat-" + key).style.display = "table-row";
  1744. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  1745. }
  1746. }
  1747. }
  1748. }
  1749. }
  1750. function pick_move()
  1751. {
  1752. if (!strolling) {
  1753. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1754. return;
  1755. }
  1756. let choice = Math.random();
  1757. if (choice < 0.2) {
  1758. sit();
  1759. } else if (choice < 0.6) {
  1760. stomp();
  1761. } else {
  1762. feed();
  1763. }
  1764. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1765. }
  1766. function grow_pick(times) {
  1767. if (document.getElementById("part-body").checked === true) {
  1768. grow(times);
  1769. }
  1770. else if (document.getElementById("part-ass").checked === true) {
  1771. grow_ass(times);
  1772. }
  1773. else if (document.getElementById("part-dick").checked === true) {
  1774. grow_dick(times);
  1775. }
  1776. else if (document.getElementById("part-balls").checked === true) {
  1777. grow_balls(times);
  1778. }
  1779. else if (document.getElementById("part-breasts").checked === true) {
  1780. grow_breasts(times);
  1781. }
  1782. else if (document.getElementById("part-vagina").checked === true) {
  1783. grow_vagina(times);
  1784. }
  1785. }
  1786. function grow(times=1)
  1787. {
  1788. if (macro.growthPoints < 100 * times) {
  1789. update(["You don't feel like growing right now."]);
  1790. return;
  1791. }
  1792. macro.growthPoints -= 100 * times;
  1793. let oldHeight = macro.height;
  1794. let oldMass = macro.mass;
  1795. macro.scale *= Math.pow(1.02,times);
  1796. let newHeight = macro.height;
  1797. let newMass = macro.mass;
  1798. let heightDelta = newHeight - oldHeight;
  1799. let massDelta = newMass - oldMass;
  1800. let heightStr = length(heightDelta, unit);
  1801. let massStr = mass(massDelta, unit);
  1802. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1803. }
  1804. function grow_dick(times=1)
  1805. {
  1806. if (macro.growthPoints < 10 * times) {
  1807. update(["You don't feel like growing right now."]);
  1808. return;
  1809. }
  1810. macro.growthPoints -= 10 * times;
  1811. let oldLength = macro.dickLength;
  1812. let oldMass = macro.dickMass;
  1813. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  1814. let lengthDelta = macro.dickLength - oldLength;
  1815. let massDelta = macro.dickMass - oldMass;
  1816. update(["Power surges through you as your " + macro.dickType + " cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]);
  1817. }
  1818. function grow_balls(times=1)
  1819. {
  1820. if (macro.growthPoints < 10 * times) {
  1821. update(["You don't feel like growing right now."]);
  1822. return;
  1823. }
  1824. macro.growthPoints -= 10 * times;
  1825. let oldDiameter = macro.ballDiameter;
  1826. let oldMass = macro.ballMass;
  1827. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  1828. let diameterDelta = macro.ballDiameter - oldDiameter;
  1829. let massDelta = macro.ballMass - oldMass;
  1830. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1831. }
  1832. function grow_breasts(times=1)
  1833. {
  1834. if (macro.growthPoints < 10 * times) {
  1835. update(["You don't feel like growing right now."]);
  1836. return;
  1837. }
  1838. macro.growthPoints -= 10 * times;
  1839. let oldDiameter = macro.breastDiameter;
  1840. let oldMass = macro.breastMass;
  1841. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  1842. let diameterDelta = macro.breastDiameter - oldDiameter;
  1843. let massDelta = macro.breastMass - oldMass;
  1844. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1845. }
  1846. function grow_vagina(times=1)
  1847. {
  1848. if (macro.growthPoints < 10 * times) {
  1849. update(["You don't feel like growing right now."]);
  1850. return;
  1851. }
  1852. macro.growthPoints -= 10 * times;
  1853. let oldLength = macro.vaginaLength;
  1854. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  1855. let lengthDelta = macro.vaginaLength - oldLength;
  1856. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  1857. }
  1858. function grow_ass(times=1)
  1859. {
  1860. if (macro.growthPoints < 10 * times) {
  1861. update(["You don't feel like growing right now."]);
  1862. return;
  1863. }
  1864. macro.growthPoints -= 10 * times;
  1865. let oldDiameter = Math.pow(macro.assArea,1/2);
  1866. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  1867. let diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  1868. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  1869. }
  1870. function grow_lots()
  1871. {
  1872. let oldHeight = macro.height;
  1873. let oldMass = macro.mass;
  1874. macro.scale *= 100;
  1875. let newHeight = macro.height;
  1876. let newMass = macro.mass;
  1877. let heightDelta = newHeight - oldHeight;
  1878. let massDelta = newMass - oldMass;
  1879. let heightStr = length(heightDelta, unit);
  1880. let massStr = mass(massDelta, unit);
  1881. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1882. }
  1883. function saveSettings() {
  1884. let storage = window.localStorage;
  1885. let settings = {};
  1886. let form = document.forms.namedItem("custom-species-form");
  1887. for (let i=0; i<form.length; i++) {
  1888. if (form[i].value != "") {
  1889. if (form[i].type == "text")
  1890. settings[form[i].name] = form[i].value;
  1891. else if (form[i].type == "number")
  1892. settings[form[i].name] = parseFloat(form[i].value);
  1893. else if (form[i].type == "checkbox") {
  1894. settings[form[i].name] = form[i].checked;
  1895. } else if (form[i].type == "radio") {
  1896. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1897. if (form[i].checked)
  1898. settings[name] = form[i].id;
  1899. }
  1900. }
  1901. }
  1902. storage.setItem('settings',JSON.stringify(settings));
  1903. }
  1904. function loadSettings() {
  1905. if (window.localStorage.getItem('settings') == null)
  1906. return;
  1907. let storage = window.localStorage;
  1908. let settings = JSON.parse(storage.getItem('settings'));
  1909. let form = document.forms.namedItem("custom-species-form");
  1910. for (let i=0; i<form.length; i++) {
  1911. if (settings[form[i].name] != undefined) {
  1912. if (form[i].type == "text")
  1913. form[i].value = settings[form[i].name];
  1914. else if (form[i].type == "number")
  1915. form[i].value = settings[form[i].name];
  1916. else if (form[i].type == "checkbox") {
  1917. form[i].checked = settings[form[i].name];
  1918. } else if (form[i].type == "radio") {
  1919. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1920. form[i].checked = (settings[name] == form[i].id);
  1921. }
  1922. }
  1923. }
  1924. }
  1925. function startGame(e) {
  1926. if (started)
  1927. return;
  1928. started = true;
  1929. let form = document.forms.namedItem("custom-species-form");
  1930. for (let i=0; i<form.length; i++) {
  1931. if (form[i].value != "") {
  1932. if (form[i].type == "text")
  1933. macro[form[i].name] = form[i].value;
  1934. else if (form[i].type == "number")
  1935. macro[form[i].name] = parseFloat(form[i].value);
  1936. else if (form[i].type == "checkbox") {
  1937. if (form[i].name == "humanMode")
  1938. humanMode = form[i].checked;
  1939. else
  1940. macro[form[i].name] = form[i].checked;
  1941. } else if (form[i].type == "radio") {
  1942. if (form[i].checked) {
  1943. switch(form[i].id) {
  1944. case "brutality-0": macro.brutality = 0; break;
  1945. case "brutality-1": macro.brutality = 1; break;
  1946. case "brutality-2": macro.brutality = 2; break;
  1947. }
  1948. }
  1949. }
  1950. }
  1951. }
  1952. if (!macro.hasTail) {
  1953. macro.tailCount = 0;
  1954. }
  1955. document.getElementById("log-area").style.display = 'inline';
  1956. document.getElementById("option-panel").style.display = 'none';
  1957. document.getElementById("action-panel").style.display = 'flex';
  1958. let victimTypes = ["stomped","digested","stomach","ground"];
  1959. if (macro.analVore) {
  1960. victimTypes = victimTypes.concat(["bowels"]);
  1961. }
  1962. if (macro.tailCount > 0) {
  1963. victimTypes = victimTypes.concat(["tailslapped"]);
  1964. if (macro.tailMaw) {
  1965. victimTypes = victimTypes.concat(["tailmaw'd"]);
  1966. } else {
  1967. document.getElementById("button-action-tail_vore").style.display = 'none';
  1968. }
  1969. } else {
  1970. document.getElementById("action-part-tails").style.display = 'none';
  1971. document.getElementById("button-action-tail_slap").style.display = 'none';
  1972. document.getElementById("button-action-tail_vore").style.display = 'none';
  1973. }
  1974. if (macro.maleParts) {
  1975. victimTypes = victimTypes.concat(["cock","balls"]);
  1976. if (macro.hasSheath) {
  1977. victimTypes.push("sheath");
  1978. } else {
  1979. document.getElementById("button-action-sheath_stuff").style.display = 'none';
  1980. document.getElementById("button-action-sheath_squeeze").style.display = 'none';
  1981. }
  1982. } else {
  1983. document.getElementById("action-part-dick").style.display = 'none';
  1984. document.getElementById("button-action-cockslap").style.display = 'none';
  1985. document.getElementById("button-action-cock_vore").style.display = 'none';
  1986. document.getElementById("button-action-ball_smother").style.display = 'none';
  1987. document.getElementById("cum").style.display = 'none';
  1988. document.getElementById("cumPercent").style.display = 'none';
  1989. document.querySelector("#part-balls+label").style.display = 'none';
  1990. document.querySelector("#part-dick+label").style.display = 'none';
  1991. document.getElementById("button-action-sheath_stuff").style.display = 'none';
  1992. document.getElementById("button-action-sheath_squeeze").style.display = 'none';
  1993. document.getElementById("button-action-sheath_absorb").style.display = 'none';
  1994. }
  1995. if (macro.femaleParts) {
  1996. victimTypes = victimTypes.concat(["womb"]);
  1997. } else {
  1998. document.getElementById("action-part-vagina").style.display = 'none';
  1999. document.getElementById("button-action-unbirth").style.display = 'none';
  2000. document.getElementById("femcum").style.display = 'none';
  2001. document.getElementById("femcumPercent").style.display = 'none';
  2002. document.querySelector("#part-vagina+label").style.display = 'none';
  2003. }
  2004. if (macro.hasBreasts) {
  2005. victimTypes = victimTypes.concat(["breasts","cleavage","cleavagecrushed","cleavagedropped","cleavageabsorbed"]);
  2006. if (macro.lactationEnabled) {
  2007. victimTypes = victimTypes.concat(["flooded"]);
  2008. } else {
  2009. document.getElementById("button-action-breast_milk").style.display = 'none';
  2010. document.getElementById("milk").style.display = 'none';
  2011. document.getElementById("milkPercent").style.display = 'none';
  2012. }
  2013. if (macro.breastVore) {
  2014. victimTypes = victimTypes.concat(["breastvored"]);
  2015. } else {
  2016. document.getElementById("button-action-breast_vore").style.display = 'none';
  2017. }
  2018. } else {
  2019. document.getElementById("action-part-breasts").style.display = 'none';
  2020. document.getElementById("button-action-cleavage_stuff").style.display = 'none';
  2021. document.getElementById("button-action-cleavage_crush").style.display = 'none';
  2022. document.getElementById("button-action-cleavage_drop").style.display = 'none';
  2023. document.getElementById("button-action-cleavage_absorb").style.display = 'none';
  2024. document.getElementById("button-action-breast_vore").style.display = 'none';
  2025. document.getElementById("button-action-breast_milk").style.display = 'none';
  2026. document.getElementById("milk").style.display = 'none';
  2027. document.getElementById("milkPercent").style.display = 'none';
  2028. document.getElementById("button-action-breast_crush").style.display = 'none';
  2029. document.querySelector("#part-breasts+label").style.display = 'none';
  2030. }
  2031. if (macro.maleParts || macro.femaleParts) {
  2032. victimTypes.push("splooged");
  2033. }
  2034. if (macro.hasPouch) {
  2035. victimTypes.push("pouched");
  2036. } else {
  2037. document.getElementById("action-part-misc").style.display = 'none';
  2038. document.getElementById("button-action-pouch_stuff").style.display = 'none';
  2039. document.getElementById("button-action-pouch_eat").style.display = 'none';
  2040. }
  2041. if (macro.soulVoreEnabled) {
  2042. victimTypes.push("soulvore");
  2043. victimTypes.push("soulpaws");
  2044. } else {
  2045. document.getElementById("action-part-souls").style.display = 'none';
  2046. document.getElementById("button-action-soul_vore").style.display = 'none';
  2047. document.getElementById("button-action-soul_absorb_paw").style.display = 'none';
  2048. }
  2049. if (macro.brutality < 1) {
  2050. document.getElementById("button-action-chew").style.display = 'none';
  2051. }
  2052. let table = document.getElementById("victim-table");
  2053. let tr = document.createElement('tr');
  2054. let th = document.createElement('th');
  2055. th.innerHTML = "Method";
  2056. tr.appendChild(th);
  2057. for (let i = 0; i < victimTypes.length; i++) {
  2058. let th = document.createElement('th');
  2059. th.classList.add("victim-table-cell");
  2060. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  2061. tr.appendChild(th);
  2062. }
  2063. table.appendChild(tr);
  2064. for (let key in things) {
  2065. if (things.hasOwnProperty(key) && key != "Container") {
  2066. let tr = document.createElement('tr');
  2067. tr.id = "stat-" + key;
  2068. tr.style.display = "none";
  2069. let th = document.createElement('th');
  2070. th.innerHTML = key;
  2071. tr.appendChild(th);
  2072. for (let i = 0; i < victimTypes.length; i++) {
  2073. let th = document.createElement('th');
  2074. th.innerHTML = 0;
  2075. th.id = "stat-" + victimTypes[i] + "-" + key;
  2076. tr.appendChild(th);
  2077. }
  2078. table.appendChild(tr);
  2079. }
  2080. }
  2081. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  2082. if (!macro.arousalEnabled) {
  2083. document.getElementById("arousal").style.display = "none";
  2084. document.getElementById("edge").style.display = "none";
  2085. }
  2086. //let species = document.getElementById("option-species").value;
  2087. //let re = /^[a-zA-Z\- ]+$/;
  2088. // tricksy tricksy players
  2089. //if (re.test(species)) {
  2090. // macro.species = species;
  2091. //}
  2092. macro.init();
  2093. update();
  2094. document.getElementById("actions-body").style.display = 'flex';
  2095. document.getElementById("stat-container").style.display = 'flex';
  2096. }
  2097. function actionTab(e) {
  2098. let name = e.target.id;
  2099. let target = "actions-" + name.replace(/action-part-/,"");
  2100. document.querySelectorAll(".action-part-button.active").forEach(function (element) {
  2101. element.classList.remove("active");
  2102. });
  2103. document.querySelectorAll(".action-tab").forEach(function (element) {
  2104. element.style.display = "none";
  2105. });
  2106. e.target.classList.add("active");
  2107. document.getElementById(target).style.display = "flex";
  2108. }
  2109. function registerActions() {
  2110. let buttons = document.querySelectorAll("[id^='button-action']");
  2111. buttons.forEach( function(button) {
  2112. let name = button.id;
  2113. name = name.replace(/button-action-/,"");
  2114. button.addEventListener("click", window[name]);
  2115. });
  2116. }
  2117. window.addEventListener('load', function(event) {
  2118. (function() {
  2119. let storage = window.localStorage;
  2120. if (storage.getItem("dark-mode") != null) {
  2121. setDarkMode(storage.getItem("dark-mode") === "true");
  2122. }
  2123. }());
  2124. victims["stomped"] = initVictims();
  2125. victims["tailslapped"] = initVictims();
  2126. victims["tailmaw'd"] = initVictims();
  2127. victims["bowels"] = initVictims();
  2128. victims["digested"] = initVictims();
  2129. victims["stomach"] = initVictims();
  2130. victims["cleavage"] = initVictims();
  2131. victims["cleavagecrushed"] = initVictims();
  2132. victims["cleavagedropped"] = initVictims();
  2133. victims["cleavageabsorbed"] = initVictims();
  2134. victims["breasts"] = initVictims();
  2135. victims["breastvored"] = initVictims();
  2136. victims["flooded"] = initVictims();
  2137. victims["womb"] = initVictims();
  2138. victims["sheath"] = initVictims();
  2139. victims["sheathcrushed"] = initVictims();
  2140. victims["sheathabsorbed"] = initVictims();
  2141. victims["cock"] = initVictims();
  2142. victims["balls"] = initVictims();
  2143. victims["smothered"] = initVictims();
  2144. victims["splooged"] = initVictims();
  2145. victims["ground"] = initVictims();
  2146. victims["pouched"] = initVictims();
  2147. victims["soulvore"] = initVictims();
  2148. victims["soulpaw"] = initVictims();
  2149. document.querySelectorAll(".action-part-button").forEach(function (element) {
  2150. element.addEventListener("click",actionTab);
  2151. });
  2152. registerActions();
  2153. document.getElementById("button-look").addEventListener("click",look);
  2154. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  2155. document.getElementById("button-location").addEventListener("click",change_location);
  2156. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  2157. document.getElementById("button-units").addEventListener("click",toggle_units);
  2158. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  2159. document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
  2160. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  2161. document.getElementById("button-dark-mode-options").addEventListener("click",toggleDarkMode);
  2162. document.getElementById("button-dark-mode-game").addEventListener("click",toggleDarkMode);
  2163. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  2164. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  2165. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  2166. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  2167. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  2168. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  2169. document.getElementById("button-load-custom").addEventListener("click",loadSettings);
  2170. document.getElementById("button-save-custom").addEventListener("click",saveSettings);
  2171. document.getElementById("button-start").addEventListener("click",startGame);
  2172. setTimeout(pick_move, 2000);
  2173. });