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

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