big steppy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2707 wiersze
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. "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. "Town": 0.00001,
  827. "City": 0.00005,
  828. "Continent": 0.0005,
  829. "Planet": 0.0001
  830. }; break;
  831. case "city": weights = {
  832. "Person": 0.05,
  833. "House": 0.1,
  834. "Car": 0.07,
  835. "Bus": 0.02,
  836. "Parking Garage": 0.003,
  837. "Small Skyscraper": 0.05,
  838. "Town": 0.00001,
  839. "City": 0.00005,
  840. "Continent": 0.0005,
  841. "Planet": 0.0001
  842. }; break;
  843. case "downtown": weights = {
  844. "Person": 0.1,
  845. "Car": 0.1,
  846. "Bus": 0.05,
  847. "Tram": 0.01,
  848. "Parking Garage": 0.005,
  849. "Small Skyscraper": 0.4,
  850. "Large Skyscraper": 0.1,
  851. "Town": 0.00001,
  852. "City": 0.00005,
  853. "Continent": 0.0005,
  854. "Planet": 0.0001
  855. }; break;
  856. }
  857. }
  858. return fill_area(area,weights);
  859. }
  860. function updateVictims(type,prey)
  861. {
  862. /*
  863. let sums = prey.sum();
  864. for (let key in sums) {
  865. if (sums.hasOwnProperty(key)) {
  866. victims[type][key] += sums[key];
  867. }
  868. }*/
  869. }
  870. function feed()
  871. {
  872. let area = macro.handArea;
  873. let prey = getPrey(biome, area);
  874. let line = describe("eat", prey, macro, verbose);
  875. let linesummary = summarize(prey.sum(), false);
  876. let people = get_living_prey(prey.sum());
  877. let sound = "";
  878. if (people == 0) {
  879. sound = "";
  880. } else if (people < 3) {
  881. sound = "Ulp.";
  882. } else if (people < 10) {
  883. sound = "Gulp.";
  884. } else if (people < 50) {
  885. sound = "Glrrp.";
  886. } else if (people < 500) {
  887. sound = "Glrrrpkh!";
  888. } else if (people < 5000) {
  889. sound = "GLRRKPKH!";
  890. } else {
  891. sound = "Oh the humanity!";
  892. }
  893. let preyMass = prey.sum_property("mass");
  894. macro.addGrowthPoints(preyMass);
  895. macro.stomach.feed(prey);
  896. macro.arouse(5);
  897. updateVictims("stomach",prey);
  898. update([sound,line,linesummary,newline]);
  899. }
  900. function chew()
  901. {
  902. let area = macro.handArea;
  903. let prey = getPrey(biome, area);
  904. let line = describe("chew", prey, macro, verbose);
  905. let linesummary = summarize(prey.sum(), false);
  906. let people = get_living_prey(prey.sum());
  907. let sound = "";
  908. if (people == 0) {
  909. sound = "";
  910. } else if (people < 3) {
  911. sound = "Snap.";
  912. } else if (people < 10) {
  913. sound = "Crunch.";
  914. } else if (people < 50) {
  915. sound = "Crack!";
  916. } else if (people < 500) {
  917. sound = "CRUNCH!";
  918. } else if (people < 5000) {
  919. sound = "CRRRUNCH!";
  920. } else {
  921. sound = "Oh the humanity!";
  922. }
  923. let preyMass = prey.sum_property("mass");
  924. macro.addGrowthPoints(preyMass);
  925. macro.arouse(10);
  926. updateVictims("digested",prey);
  927. update([sound,line,linesummary,newline]);
  928. }
  929. function stomp()
  930. {
  931. let area = macro.pawArea;
  932. let prey = getPrey(biome, area);
  933. let line = describe("stomp", prey, macro, verbose);
  934. let linesummary = summarize(prey.sum(), true);
  935. let people = get_living_prey(prey.sum());
  936. let sound = "Thump";
  937. if (people < 3) {
  938. sound = "Thump!";
  939. } else if (people < 10) {
  940. sound = "Squish!";
  941. } else if (people < 50) {
  942. sound = "Crunch!";
  943. } else if (people < 500) {
  944. sound = "CRUNCH!";
  945. } else if (people < 5000) {
  946. sound = "CRRUUUNCH!!";
  947. } else {
  948. sound = "Oh the humanity!";
  949. }
  950. let preyMass = prey.sum_property("mass");
  951. macro.addGrowthPoints(preyMass);
  952. macro.arouse(5);
  953. updateVictims("stomped",prey);
  954. update([sound,line,linesummary,newline]);
  955. }
  956. function grind()
  957. {
  958. let area = macro.assArea / 2;
  959. if (macro.maleParts)
  960. area += macro.dickArea;
  961. if (macro.femalePartS)
  962. area += macro.vaginaArea;
  963. let prey = getPrey(biome,area);
  964. let line = describe("grind", prey, macro, verbose);
  965. let linesummary = summarize(prey.sum(), true);
  966. let people = get_living_prey(prey.sum());
  967. let sound = "";
  968. if (people < 3) {
  969. sound = "Thump.";
  970. } else if (people < 10) {
  971. sound = "Crunch.";
  972. } else if (people < 50) {
  973. sound = "Crrrrunch.";
  974. } else if (people < 500) {
  975. sound = "SMASH!";
  976. } else if (people < 5000) {
  977. sound = "CCCRASH!!";
  978. } else {
  979. sound = "Oh the humanity!";
  980. }
  981. let preyMass = prey.sum_property("mass");
  982. macro.addGrowthPoints(preyMass);
  983. macro.arouse(20);
  984. updateVictims("ground",prey);
  985. update([sound,line,linesummary,newline]);
  986. }
  987. function anal_vore()
  988. {
  989. let area = macro.analVoreArea;
  990. let prey = getOnePrey(biome,area);
  991. let line = describe("anal-vore", prey, macro, verbose);
  992. let linesummary = summarize(prey.sum(), false);
  993. let people = get_living_prey(prey.sum());
  994. let sound = "Shlp";
  995. if (people < 3) {
  996. sound = "Shlp.";
  997. } else if (people < 10) {
  998. sound = "Squelch.";
  999. } else if (people < 50) {
  1000. sound = "Shlurrp.";
  1001. } else if (people < 500) {
  1002. sound = "SHLRP!";
  1003. } else if (people < 5000) {
  1004. sound = "SQLCH!!";
  1005. } else {
  1006. sound = "Oh the humanity!";
  1007. }
  1008. let preyMass = prey.sum_property("mass");
  1009. macro.addGrowthPoints(preyMass);
  1010. macro.bowels.feed(prey);
  1011. macro.arouse(20);
  1012. updateVictims("bowels",prey);
  1013. update([sound,line,linesummary,newline]);
  1014. }
  1015. function sit()
  1016. {
  1017. if (macro.analVore)
  1018. anal_vore();
  1019. let area = macro.assArea;
  1020. let crushed = getPrey(biome,area);
  1021. let line = describe("ass-crush", crushed, macro, verbose);
  1022. let linesummary = summarize(crushed.sum(), true);
  1023. let people = get_living_prey(crushed.sum());
  1024. let sound = "Thump";
  1025. if (people < 3) {
  1026. sound = "Thump!";
  1027. } else if (people < 10) {
  1028. sound = "Squish!";
  1029. } else if (people < 50) {
  1030. sound = "Crunch!";
  1031. } else if (people < 500) {
  1032. sound = "CRUNCH!";
  1033. } else if (people < 5000) {
  1034. sound = "CRRUUUNCH!!";
  1035. } else {
  1036. sound = "Oh the humanity!";
  1037. }
  1038. let crushedMass = crushed.sum_property("mass");
  1039. macro.addGrowthPoints(crushedMass);
  1040. macro.arouse(5);
  1041. updateVictims("stomped",crushed);
  1042. update([sound,line,linesummary,newline]);
  1043. }
  1044. function cleavage_stuff()
  1045. {
  1046. let area = macro.handArea;
  1047. let prey = getPrey(biome, area);
  1048. let line = describe("cleavage-stuff", prey, macro, verbose);
  1049. let linesummary = summarize(prey.sum(), false);
  1050. let people = get_living_prey(prey.sum());
  1051. let sound = "Thump";
  1052. if (people < 3) {
  1053. sound = "Thump!";
  1054. } else if (people < 10) {
  1055. sound = "Squish!";
  1056. } else if (people < 50) {
  1057. sound = "Smish!";
  1058. } else if (people < 500) {
  1059. sound = "SQUISH!";
  1060. } else if (people < 5000) {
  1061. sound = "SMISH!";
  1062. } else {
  1063. sound = "Oh the humanity!";
  1064. }
  1065. macro.arouse(10);
  1066. macro.cleavage.add(prey);
  1067. updateVictims("cleavage",prey);
  1068. update([sound,line,linesummary,newline]);
  1069. }
  1070. function cleavage_crush()
  1071. {
  1072. let prey = macro.cleavage.container;
  1073. macro.cleavage.container = new Container();
  1074. let line = describe("cleavage-crush", prey, macro, verbose);
  1075. let linesummary = summarize(prey.sum(), true);
  1076. let people = get_living_prey(prey.sum());
  1077. let sound = "Thump";
  1078. if (people < 3) {
  1079. sound = "Thump!";
  1080. } else if (people < 10) {
  1081. sound = "Squish!";
  1082. } else if (people < 50) {
  1083. sound = "Smish!";
  1084. } else if (people < 500) {
  1085. sound = "SQUISH!";
  1086. } else if (people < 5000) {
  1087. sound = "SMISH!";
  1088. } else {
  1089. sound = "Oh the humanity!";
  1090. }
  1091. let preyMass = prey.sum_property("mass");
  1092. macro.addGrowthPoints(preyMass);
  1093. macro.arouse((preyMass > 0 ? 20 : 10));
  1094. updateVictims("cleavagecrushed",prey);
  1095. update([sound,line,linesummary,newline]);
  1096. }
  1097. function cleavage_drop()
  1098. {
  1099. let prey = macro.cleavage.container;
  1100. macro.cleavage.container = new Container();
  1101. let line = describe("cleavage-drop", prey, macro, verbose);
  1102. let linesummary = summarize(prey.sum(), true);
  1103. let people = get_living_prey(prey.sum());
  1104. let sound = "Thump";
  1105. if (people < 3) {
  1106. sound = "Thump.";
  1107. } else if (people < 10) {
  1108. sound = "Splat.";
  1109. } else if (people < 50) {
  1110. sound = "Thump!";
  1111. } else if (people < 500) {
  1112. sound = "THUMP!";
  1113. } else if (people < 5000) {
  1114. sound = "SPLAT!!";
  1115. } else {
  1116. sound = "Oh the humanity!";
  1117. }
  1118. let preyMass = prey.sum_property("mass");
  1119. macro.addGrowthPoints(preyMass);
  1120. macro.arouse((preyMass > 0 ? 15 : 5));
  1121. updateVictims("cleavagedropped",prey);
  1122. update([sound,line,linesummary,newline]);
  1123. }
  1124. function cleavage_absorb()
  1125. {
  1126. let prey = macro.cleavage.container;
  1127. macro.cleavage.container = new Container();
  1128. let line = describe("cleavage-absorb", prey, macro, verbose);
  1129. let linesummary = summarize(prey.sum(), true);
  1130. let people = get_living_prey(prey.sum());
  1131. let sound = "Thump";
  1132. if (people < 3) {
  1133. sound = "Shlp.";
  1134. } else if (people < 10) {
  1135. sound = "Slurp.";
  1136. } else if (people < 50) {
  1137. sound = "Shlrrrrp!";
  1138. } else if (people < 500) {
  1139. sound = "SHLRP!";
  1140. } else if (people < 5000) {
  1141. sound = "SHLLLLURP!!";
  1142. } else {
  1143. sound = "Oh the humanity!";
  1144. }
  1145. let preyMass = prey.sum_property("mass");
  1146. macro.addGrowthPoints(preyMass);
  1147. macro.arouse((preyMass > 0 ? 15 : 5));
  1148. updateVictims("cleavageabsorbed",prey);
  1149. update([sound,line,linesummary,newline]);
  1150. }
  1151. function breast_crush()
  1152. {
  1153. let area = macro.breastArea;
  1154. let prey = getPrey(biome, area);
  1155. let line = describe("breast-crush", prey, macro, verbose);
  1156. let linesummary = summarize(prey.sum(), true);
  1157. let people = get_living_prey(prey.sum());
  1158. let sound = "Thump";
  1159. if (people < 3) {
  1160. sound = "Thump!";
  1161. } else if (people < 10) {
  1162. sound = "Squish!";
  1163. } else if (people < 50) {
  1164. sound = "Crunch!";
  1165. } else if (people < 500) {
  1166. sound = "CRUNCH!";
  1167. } else if (people < 5000) {
  1168. sound = "CRRUUUNCH!!";
  1169. } else {
  1170. sound = "Oh the humanity!";
  1171. }
  1172. let preyMass = prey.sum_property("mass");
  1173. macro.addGrowthPoints(preyMass);
  1174. macro.arouse(10);
  1175. updateVictims("breasts",prey);
  1176. update([sound,line,linesummary,newline]);
  1177. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  1178. let amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  1179. breast_milk(null, amount);
  1180. }
  1181. }
  1182. function breast_vore()
  1183. {
  1184. // todo nipple areas?
  1185. let area = macro.breastArea/2;
  1186. let prey = getPrey(biome, area);
  1187. let line = describe("breast-vore", prey, macro, verbose);
  1188. let linesummary = summarize(prey.sum(), false);
  1189. let people = get_living_prey(prey.sum());
  1190. let sound = "";
  1191. if (people < 3) {
  1192. sound = "Shlp.";
  1193. } else if (people < 10) {
  1194. sound = "Slurp.";
  1195. } else if (people < 50) {
  1196. sound = "Shlrrrrp!";
  1197. } else if (people < 500) {
  1198. sound = "SHLRP!";
  1199. } else if (people < 5000) {
  1200. sound = "SHLLLLURP!!";
  1201. } else {
  1202. sound = "Oh the humanity!";
  1203. }
  1204. let preyMass = prey.sum_property("mass");
  1205. macro.addGrowthPoints(preyMass);
  1206. macro.breasts.feed(prey);
  1207. macro.arouse(10);
  1208. updateVictims("breastvored",prey);
  1209. update([sound,line,linesummary,newline]);
  1210. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  1211. let amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  1212. breast_milk(null, amount);
  1213. }
  1214. }
  1215. function breast_milk(e,vol)
  1216. {
  1217. if (vol == undefined) {
  1218. vol = Math.min(macro.lactationVolume, macro.milkStorage.amount);
  1219. }
  1220. macro.milkStorage.amount -= vol;
  1221. let area = Math.pow(vol, 2/3);
  1222. let prey = getPrey(biome, area);
  1223. let line = describe("breast-milk", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1224. let linesummary = summarize(prey.sum(), true);
  1225. let people = get_living_prey(prey.sum());
  1226. let sound = "Dribble.";
  1227. if (people < 3) {
  1228. sound = "Dribble.";
  1229. } else if (people < 10) {
  1230. sound = "Splash.";
  1231. } else if (people < 50) {
  1232. sound = "Splash!";
  1233. } else if (people < 500) {
  1234. sound = "SPLOOSH!";
  1235. } else if (people < 5000) {
  1236. sound = "SPLOOOOOOOOOOSH!!";
  1237. } else {
  1238. sound = "Oh the humanity!";
  1239. }
  1240. let preyMass = prey.sum_property("mass");
  1241. macro.addGrowthPoints(preyMass);
  1242. macro.arouse(20);
  1243. updateVictims("flooded",prey);
  1244. update([sound,line,linesummary,newline]);
  1245. }
  1246. function unbirth()
  1247. {
  1248. let area = macro.vaginaArea;
  1249. let prey = getPrey(biome, area);
  1250. let line = describe("unbirth", prey, macro, verbose);
  1251. let linesummary = summarize(prey.sum(), false);
  1252. let people = get_living_prey(prey.sum());
  1253. let sound = "";
  1254. if (people < 3) {
  1255. sound = "Shlp.";
  1256. } else if (people < 10) {
  1257. sound = "Squelch.";
  1258. } else if (people < 50) {
  1259. sound = "Shlurrp.";
  1260. } else if (people < 500) {
  1261. sound = "SHLRP!";
  1262. } else if (people < 5000) {
  1263. sound = "SQLCH!!";
  1264. } else {
  1265. sound = "Oh the humanity!";
  1266. }
  1267. let preyMass = prey.sum_property("mass");
  1268. macro.addGrowthPoints(preyMass);
  1269. macro.womb.feed(prey);
  1270. macro.arouse(20);
  1271. updateVictims("womb",prey);
  1272. update([sound,line,linesummary,newline]);
  1273. }
  1274. function sheath_stuff()
  1275. {
  1276. let area = Math.min(macro.handArea, macro.dickGirth*3);
  1277. let prey = getPrey(biome, area);
  1278. let line = describe("sheath-stuff", prey, macro, verbose);
  1279. let linesummary = summarize(prey.sum(), false);
  1280. let people = get_living_prey(prey.sum());
  1281. let sound = "";
  1282. if (people < 3) {
  1283. sound = "Shlp.";
  1284. } else if (people < 10) {
  1285. sound = "Squelch.";
  1286. } else if (people < 50) {
  1287. sound = "Shlurrp.";
  1288. } else if (people < 500) {
  1289. sound = "SHLRP!";
  1290. } else if (people < 5000) {
  1291. sound = "SQLCH!!";
  1292. } else {
  1293. sound = "Oh the humanity!";
  1294. }
  1295. macro.sheath.add(prey);
  1296. macro.arouse(15);
  1297. updateVictims("sheath",prey);
  1298. update([sound,line,linesummary,newline]);
  1299. }
  1300. function sheath_squeeze()
  1301. {
  1302. let prey = macro.sheath.container;
  1303. let line = describe("sheath-squeeze", prey, macro, verbose);
  1304. let linesummary = summarize(prey.sum(), false);
  1305. let people = get_living_prey(prey.sum());
  1306. let sound = "";
  1307. if (people < 3) {
  1308. sound = "Shlp.";
  1309. } else if (people < 10) {
  1310. sound = "Squelch.";
  1311. } else if (people < 50) {
  1312. sound = "Shlurrp.";
  1313. } else if (people < 500) {
  1314. sound = "SHLRP!";
  1315. } else if (people < 5000) {
  1316. sound = "SQLCH!!";
  1317. } else {
  1318. sound = "Oh the humanity!";
  1319. }
  1320. macro.arouse(15);
  1321. update([sound,line,linesummary,newline]);
  1322. }
  1323. function sheath_crush()
  1324. {
  1325. let prey = macro.sheath.container;
  1326. macro.sheath.container = new Container();
  1327. let line = describe("sheath-crush", prey, macro, verbose);
  1328. let linesummary = summarize(prey.sum(), true);
  1329. let people = get_living_prey(prey.sum());
  1330. let sound = "";
  1331. if (people < 3) {
  1332. sound = "Shlp.";
  1333. } else if (people < 10) {
  1334. sound = "Squelch.";
  1335. } else if (people < 50) {
  1336. sound = "Shlurrp.";
  1337. } else if (people < 500) {
  1338. sound = "SHLRP!";
  1339. } else if (people < 5000) {
  1340. sound = "SQLCH!!";
  1341. } else {
  1342. sound = "Oh the humanity!";
  1343. }
  1344. macro.arouse(45);
  1345. update([sound,line,linesummary,newline]);
  1346. }
  1347. function sheath_absorb()
  1348. {
  1349. let prey = macro.sheath.container;
  1350. macro.sheath.container = new Container();
  1351. let line = describe("sheath-absorb", prey, macro, verbose);
  1352. let linesummary = summarize(prey.sum(), true);
  1353. let people = get_living_prey(prey.sum());
  1354. let sound = "";
  1355. if (people < 3) {
  1356. sound = "Shlp.";
  1357. } else if (people < 10) {
  1358. sound = "Squelch.";
  1359. } else if (people < 50) {
  1360. sound = "Shlurrp.";
  1361. } else if (people < 500) {
  1362. sound = "SHLRP!";
  1363. } else if (people < 5000) {
  1364. sound = "SQLCH!!";
  1365. } else {
  1366. sound = "Oh the humanity!";
  1367. }
  1368. macro.arouse(45);
  1369. update([sound,line,linesummary,newline]);
  1370. }
  1371. function cockslap()
  1372. {
  1373. let area = macro.dickArea;
  1374. let prey = getPrey(biome, area);
  1375. let line = describe("cockslap", prey, macro, verbose);
  1376. let linesummary = summarize(prey.sum(), true);
  1377. let people = get_living_prey(prey.sum());
  1378. let sound = "Thump";
  1379. if (people < 3) {
  1380. sound = "Thump!";
  1381. } else if (people < 10) {
  1382. sound = "Squish!";
  1383. } else if (people < 50) {
  1384. sound = "Crunch!";
  1385. } else if (people < 500) {
  1386. sound = "CRUNCH!";
  1387. } else if (people < 5000) {
  1388. sound = "CRRUUUNCH!!";
  1389. } else {
  1390. sound = "Oh the humanity!";
  1391. }
  1392. let preyMass = prey.sum_property("mass");
  1393. macro.addGrowthPoints(preyMass);
  1394. macro.arouse(15);
  1395. updateVictims("cock",prey);
  1396. update([sound,line,linesummary,newline]);
  1397. }
  1398. function cock_vore()
  1399. {
  1400. let area = macro.dickGirth;
  1401. let prey = getPrey(biome, area);
  1402. let line = describe("cock-vore", prey, macro, verbose);
  1403. let linesummary = summarize(prey.sum(), false);
  1404. let people = get_living_prey(prey.sum());
  1405. let sound = "lp";
  1406. if (people < 3) {
  1407. sound = "Shlp.";
  1408. } else if (people < 10) {
  1409. sound = "Squelch.";
  1410. } else if (people < 50) {
  1411. sound = "Shlurrp.";
  1412. } else if (people < 500) {
  1413. sound = "SHLRP!";
  1414. } else if (people < 5000) {
  1415. sound = "SQLCH!!";
  1416. } else {
  1417. sound = "Oh the humanity!";
  1418. }
  1419. let preyMass = prey.sum_property("mass");
  1420. macro.addGrowthPoints(preyMass);
  1421. macro.balls.feed(prey);
  1422. macro.arouse(20);
  1423. updateVictims("balls",prey);
  1424. update([sound,line,linesummary,newline]);
  1425. }
  1426. function ball_smother()
  1427. {
  1428. let area = macro.ballArea * 2;
  1429. let prey = getPrey(biome, area);
  1430. let line = describe("ball-smother", prey, macro, verbose);
  1431. let linesummary = summarize(prey.sum(), true);
  1432. let people = get_living_prey(prey.sum());
  1433. let sound = "Thump";
  1434. if (people < 3) {
  1435. sound = "Thump!";
  1436. } else if (people < 10) {
  1437. sound = "Squish!";
  1438. } else if (people < 50) {
  1439. sound = "Smoosh!";
  1440. } else if (people < 500) {
  1441. sound = "SMOOSH!";
  1442. } else if (people < 5000) {
  1443. sound = "SMOOOOOSH!!";
  1444. } else {
  1445. sound = "Oh the humanity!";
  1446. }
  1447. let preyMass = prey.sum_property("mass");
  1448. macro.addGrowthPoints(preyMass);
  1449. macro.arouse(10);
  1450. updateVictims("balls",prey);
  1451. update([sound,line,linesummary,newline]);
  1452. }
  1453. function male_spurt(vol)
  1454. {
  1455. let area = Math.pow(vol, 2/3);
  1456. let prey = getPrey(biome, area);
  1457. let line = describe("male-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1458. let linesummary = summarize(prey.sum(), true);
  1459. let people = get_living_prey(prey.sum());
  1460. let sound = "Spurt!";
  1461. if (people < 3) {
  1462. sound = "Spurt!";
  1463. } else if (people < 10) {
  1464. sound = "Sploosh!";
  1465. } else if (people < 50) {
  1466. sound = "Sploooooosh!";
  1467. } else if (people < 500) {
  1468. sound = "SPLOOSH!";
  1469. } else if (people < 5000) {
  1470. sound = "SPLOOOOOOOOOOSH!!";
  1471. } else {
  1472. sound = "Oh the humanity!";
  1473. }
  1474. let preyMass = prey.sum_property("mass");
  1475. macro.addGrowthPoints(preyMass);
  1476. updateVictims("splooged",prey);
  1477. update([sound,line,linesummary,newline]);
  1478. }
  1479. function male_orgasm(vol)
  1480. {
  1481. let area = Math.pow(vol, 2/3);
  1482. let prey = getPrey(biome, area);
  1483. let line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1484. let linesummary = summarize(prey.sum(), true);
  1485. let people = get_living_prey(prey.sum());
  1486. let sound = "Spurt!";
  1487. if (people < 3) {
  1488. sound = "Spurt!";
  1489. } else if (people < 10) {
  1490. sound = "Sploosh!";
  1491. } else if (people < 50) {
  1492. sound = "Sploooooosh!";
  1493. } else if (people < 500) {
  1494. sound = "SPLOOSH!";
  1495. } else if (people < 5000) {
  1496. sound = "SPLOOOOOOOOOOSH!!";
  1497. } else {
  1498. sound = "Oh the humanity!";
  1499. }
  1500. let preyMass = prey.sum_property("mass");
  1501. macro.addGrowthPoints(preyMass);
  1502. updateVictims("splooged",prey);
  1503. update([sound,line,linesummary,newline]);
  1504. }
  1505. function female_spurt(vol)
  1506. {
  1507. let area = Math.pow(vol, 2/3);
  1508. let prey = getPrey(biome, area);
  1509. let line = describe("female-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1510. let linesummary = summarize(prey.sum(), true);
  1511. let people = get_living_prey(prey.sum());
  1512. let sound = "Spurt!";
  1513. if (people < 3) {
  1514. sound = "Spurt!";
  1515. } else if (people < 10) {
  1516. sound = "Sploosh!";
  1517. } else if (people < 50) {
  1518. sound = "Sploooooosh!";
  1519. } else if (people < 500) {
  1520. sound = "SPLOOSH!";
  1521. } else if (people < 5000) {
  1522. sound = "SPLOOOOOOOOOOSH!!";
  1523. } else {
  1524. sound = "Oh the humanity!";
  1525. }
  1526. let preyMass = prey.sum_property("mass");
  1527. macro.addGrowthPoints(preyMass);
  1528. updateVictims("splooged",prey);
  1529. update([sound,line,linesummary,newline]);
  1530. }
  1531. function female_orgasm(vol)
  1532. {
  1533. let area = Math.pow(vol, 2/3);
  1534. let prey = getPrey(biome, area);
  1535. let line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1536. let linesummary = summarize(prey.sum(), true);
  1537. let people = get_living_prey(prey.sum());
  1538. let sound = "Spurt!";
  1539. if (people < 3) {
  1540. sound = "Spurt!";
  1541. } else if (people < 10) {
  1542. sound = "Sploosh!";
  1543. } else if (people < 50) {
  1544. sound = "Sploooooosh!";
  1545. } else if (people < 500) {
  1546. sound = "SPLOOSH!";
  1547. } else if (people < 5000) {
  1548. sound = "SPLOOOOOOOOOOSH!!";
  1549. } else {
  1550. sound = "Oh the humanity!";
  1551. }
  1552. let preyMass = prey.sum_property("mass");
  1553. macro.addGrowthPoints(preyMass);
  1554. updateVictims("splooged",prey);
  1555. update([sound,line,linesummary,newline]);
  1556. }
  1557. function tail_slap()
  1558. {
  1559. let area = macro.tailArea * macro.tailCount;
  1560. let prey = getPrey(biome, area);
  1561. let line = describe("tail-slap", prey, macro, verbose);
  1562. let linesummary = summarize(prey.sum(), true);
  1563. let people = get_living_prey(prey.sum());
  1564. let sound = "Thump";
  1565. if (people < 3) {
  1566. sound = "Thump!";
  1567. } else if (people < 10) {
  1568. sound = "Squish!";
  1569. } else if (people < 50) {
  1570. sound = "Crunch!";
  1571. } else if (people < 500) {
  1572. sound = "CRUNCH!";
  1573. } else if (people < 5000) {
  1574. sound = "CRRUUUNCH!!";
  1575. } else {
  1576. sound = "Oh the humanity!";
  1577. }
  1578. let preyMass = prey.sum_property("mass");
  1579. macro.addGrowthPoints(preyMass);
  1580. macro.arouse(5);
  1581. updateVictims("tailslapped",prey);
  1582. update([sound,line,linesummary,newline]);
  1583. }
  1584. function tail_vore()
  1585. {
  1586. let area = macro.tailGirth * macro.tailCount;
  1587. let prey = getPrey(biome, area);
  1588. let line = describe("tail-vore", prey, macro, verbose);
  1589. let linesummary = summarize(prey.sum(), false);
  1590. let people = get_living_prey(prey.sum());
  1591. let sound = "";
  1592. if (people == 0) {
  1593. sound = "";
  1594. } else if (people < 3) {
  1595. sound = "Ulp.";
  1596. } else if (people < 10) {
  1597. sound = "Gulp.";
  1598. } else if (people < 50) {
  1599. sound = "Glrrp.";
  1600. } else if (people < 500) {
  1601. sound = "Glrrrpkh!";
  1602. } else if (people < 5000) {
  1603. sound = "GLRRKPKH!";
  1604. } else {
  1605. sound = "Oh the humanity!";
  1606. }
  1607. let preyMass = prey.sum_property("mass");
  1608. macro.addGrowthPoints(preyMass);
  1609. macro.arouse(5);
  1610. macro.stomach.feed(prey);
  1611. updateVictims("tailmaw'd",prey);
  1612. update([sound,line,linesummary,newline]);
  1613. }
  1614. function pouch_stuff()
  1615. {
  1616. let area = macro.handArea;
  1617. let prey = getPrey(biome, area);
  1618. let line = describe("pouch-stuff", prey, macro, verbose);
  1619. let linesummary = summarize(prey.sum(), false);
  1620. let people = get_living_prey(prey.sum());
  1621. let sound = "Thump";
  1622. if (people < 3) {
  1623. sound = "Slp.";
  1624. } else if (people < 10) {
  1625. sound = "Squeeze.";
  1626. } else if (people < 50) {
  1627. sound = "Thump!";
  1628. } else if (people < 500) {
  1629. sound = "THOOOMP!";
  1630. } else if (people < 5000) {
  1631. sound = "THOOOOOOOMP!";
  1632. } else {
  1633. sound = "Oh the humanity!";
  1634. }
  1635. macro.arouse(5);
  1636. macro.pouch.add(prey);
  1637. updateVictims("pouched",prey);
  1638. update([sound,line,linesummary,newline]);
  1639. }
  1640. function pouch_eat()
  1641. {
  1642. let prey = macro.pouch.container;
  1643. macro.pouch.container = new Container();
  1644. let line = describe("pouch-eat", prey, macro, verbose);
  1645. let linesummary = summarize(prey.sum(), false);
  1646. let people = get_living_prey(prey.sum());
  1647. let sound = "";
  1648. if (people == 0) {
  1649. sound = "";
  1650. } else if (people < 3) {
  1651. sound = "Ulp.";
  1652. } else if (people < 10) {
  1653. sound = "Gulp.";
  1654. } else if (people < 50) {
  1655. sound = "Glrrp.";
  1656. } else if (people < 500) {
  1657. sound = "Glrrrpkh!";
  1658. } else if (people < 5000) {
  1659. sound = "GLRRKPKH!";
  1660. } else {
  1661. sound = "Oh the humanity!";
  1662. }
  1663. let preyMass = prey.sum_property("mass");
  1664. macro.addGrowthPoints(preyMass);
  1665. macro.stomach.feed(prey);
  1666. macro.arouse(5);
  1667. updateVictims("stomach",prey);
  1668. update([sound,line,linesummary,newline]);
  1669. }
  1670. function soul_vore()
  1671. {
  1672. let area = macro.height * macro.height;
  1673. let prey = getPrey(biome,area);
  1674. let line = describe("soul-vore", prey, macro, verbose);
  1675. let linesummary = summarize(prey.sum(), false);
  1676. let people = get_living_prey(prey.sum());
  1677. let sound = "";
  1678. if (people == 0) {
  1679. sound = "";
  1680. } else if (people < 3) {
  1681. sound = "Ulp.";
  1682. } else if (people < 10) {
  1683. sound = "Gulp.";
  1684. } else if (people < 50) {
  1685. sound = "Glrrp.";
  1686. } else if (people < 500) {
  1687. sound = "Glrrrpkh!";
  1688. } else if (people < 5000) {
  1689. sound = "GLRRKPKH!";
  1690. } else {
  1691. sound = "Oh the humanity!";
  1692. }
  1693. let preyMass = prey.sum_property("mass");
  1694. macro.addGrowthPoints(preyMass);
  1695. macro.souls.feed(prey);
  1696. macro.arouse(15);
  1697. updateVictims("soulvore",prey);
  1698. update([sound,line,linesummary,newline]);
  1699. }
  1700. function soul_absorb_paw()
  1701. {
  1702. let prey = getPrey(biome,macro.pawArea);
  1703. let line = describe("soul-absorb-paw", prey, macro, verbose);
  1704. let linesummary = summarize(prey.sum(), true);
  1705. let people = get_living_prey(prey.sum());
  1706. let sound = "";
  1707. if (people < 3) {
  1708. sound = "Thump!";
  1709. } else if (people < 10) {
  1710. sound = "Squish!";
  1711. } else if (people < 50) {
  1712. sound = "Crunch!";
  1713. } else if (people < 500) {
  1714. sound = "CRUNCH!";
  1715. } else if (people < 5000) {
  1716. sound = "CRRUUUNCH!!";
  1717. } else {
  1718. sound = "Oh the humanity!";
  1719. }
  1720. let preyMass = prey.sum_property("mass");
  1721. macro.addGrowthPoints(preyMass);
  1722. macro.arouse(25);
  1723. updateVictims("soulpaw",prey);
  1724. update([sound,line,linesummary,newline]);
  1725. }
  1726. function transformNumbers(line)
  1727. {
  1728. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  1729. }
  1730. function update(lines = [])
  1731. {
  1732. let log = document.getElementById("log");
  1733. lines.forEach(function (x) {
  1734. let line = document.createElement('div');
  1735. line.innerHTML = transformNumbers(x);
  1736. log.appendChild(line);
  1737. });
  1738. if (lines.length > 0)
  1739. log.scrollTop = log.scrollHeight;
  1740. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  1741. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  1742. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  1743. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  1744. document.getElementById("edge").innerHTML = "Edge: " + round(macro.edge * 100,0) + "%";
  1745. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false));
  1746. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  1747. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  1748. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  1749. document.getElementById("milk").innerHTML = "Milk: " + transformNumbers(volume(macro.milkStorage.amount,unit,false));
  1750. document.getElementById("milkPercent").innerHTML = Math.round(macro.milkStorage.amount / macro.milkStorage.limit * 100) + "%";
  1751. for (let type in victims) {
  1752. if (victims.hasOwnProperty(type)) {
  1753. for (let key in victims[type]){
  1754. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  1755. document.getElementById("stat-" + key).style.display = "table-row";
  1756. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  1757. }
  1758. }
  1759. }
  1760. }
  1761. }
  1762. function pick_move()
  1763. {
  1764. if (!strolling) {
  1765. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1766. return;
  1767. }
  1768. let choice = Math.random();
  1769. if (choice < 0.2) {
  1770. sit();
  1771. } else if (choice < 0.6) {
  1772. stomp();
  1773. } else {
  1774. feed();
  1775. }
  1776. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1777. }
  1778. function grow_pick(times) {
  1779. if (document.getElementById("part-body").checked === true) {
  1780. grow(times);
  1781. }
  1782. else if (document.getElementById("part-ass").checked === true) {
  1783. grow_ass(times);
  1784. }
  1785. else if (document.getElementById("part-dick").checked === true) {
  1786. grow_dick(times);
  1787. }
  1788. else if (document.getElementById("part-balls").checked === true) {
  1789. grow_balls(times);
  1790. }
  1791. else if (document.getElementById("part-breasts").checked === true) {
  1792. grow_breasts(times);
  1793. }
  1794. else if (document.getElementById("part-vagina").checked === true) {
  1795. grow_vagina(times);
  1796. }
  1797. }
  1798. function grow(times=1)
  1799. {
  1800. if (macro.growthPoints < 100 * times) {
  1801. update(["You don't feel like growing right now."]);
  1802. return;
  1803. }
  1804. macro.growthPoints -= 100 * times;
  1805. let oldHeight = macro.height;
  1806. let oldMass = macro.mass;
  1807. macro.scale *= Math.pow(1.02,times);
  1808. let newHeight = macro.height;
  1809. let newMass = macro.mass;
  1810. let heightDelta = newHeight - oldHeight;
  1811. let massDelta = newMass - oldMass;
  1812. let heightStr = length(heightDelta, unit);
  1813. let massStr = mass(massDelta, unit);
  1814. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1815. }
  1816. function grow_dick(times=1)
  1817. {
  1818. if (macro.growthPoints < 10 * times) {
  1819. update(["You don't feel like growing right now."]);
  1820. return;
  1821. }
  1822. macro.growthPoints -= 10 * times;
  1823. let oldLength = macro.dickLength;
  1824. let oldMass = macro.dickMass;
  1825. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  1826. let lengthDelta = macro.dickLength - oldLength;
  1827. let massDelta = macro.dickMass - oldMass;
  1828. 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]);
  1829. }
  1830. function grow_balls(times=1)
  1831. {
  1832. if (macro.growthPoints < 10 * times) {
  1833. update(["You don't feel like growing right now."]);
  1834. return;
  1835. }
  1836. macro.growthPoints -= 10 * times;
  1837. let oldDiameter = macro.ballDiameter;
  1838. let oldMass = macro.ballMass;
  1839. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  1840. let diameterDelta = macro.ballDiameter - oldDiameter;
  1841. let massDelta = macro.ballMass - oldMass;
  1842. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1843. }
  1844. function grow_breasts(times=1)
  1845. {
  1846. if (macro.growthPoints < 10 * times) {
  1847. update(["You don't feel like growing right now."]);
  1848. return;
  1849. }
  1850. macro.growthPoints -= 10 * times;
  1851. let oldDiameter = macro.breastDiameter;
  1852. let oldMass = macro.breastMass;
  1853. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  1854. let diameterDelta = macro.breastDiameter - oldDiameter;
  1855. let massDelta = macro.breastMass - oldMass;
  1856. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1857. }
  1858. function grow_vagina(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 oldLength = macro.vaginaLength;
  1866. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  1867. let lengthDelta = macro.vaginaLength - oldLength;
  1868. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  1869. }
  1870. function grow_ass(times=1)
  1871. {
  1872. if (macro.growthPoints < 10 * times) {
  1873. update(["You don't feel like growing right now."]);
  1874. return;
  1875. }
  1876. macro.growthPoints -= 10 * times;
  1877. let oldDiameter = Math.pow(macro.assArea,1/2);
  1878. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  1879. let diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  1880. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  1881. }
  1882. function grow_lots()
  1883. {
  1884. let oldHeight = macro.height;
  1885. let oldMass = macro.mass;
  1886. macro.scale *= 100;
  1887. let newHeight = macro.height;
  1888. let newMass = macro.mass;
  1889. let heightDelta = newHeight - oldHeight;
  1890. let massDelta = newMass - oldMass;
  1891. let heightStr = length(heightDelta, unit);
  1892. let massStr = mass(massDelta, unit);
  1893. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1894. }
  1895. function saveSettings() {
  1896. let storage = window.localStorage;
  1897. let settings = {};
  1898. let form = document.forms.namedItem("custom-species-form");
  1899. for (let i=0; i<form.length; i++) {
  1900. if (form[i].value != "") {
  1901. if (form[i].type == "text")
  1902. settings[form[i].name] = form[i].value;
  1903. else if (form[i].type == "number")
  1904. settings[form[i].name] = parseFloat(form[i].value);
  1905. else if (form[i].type == "checkbox") {
  1906. settings[form[i].name] = form[i].checked;
  1907. } else if (form[i].type == "radio") {
  1908. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1909. if (form[i].checked)
  1910. settings[name] = form[i].id;
  1911. }
  1912. }
  1913. }
  1914. storage.setItem('settings',JSON.stringify(settings));
  1915. }
  1916. function loadSettings() {
  1917. if (window.localStorage.getItem('settings') == null)
  1918. return;
  1919. let storage = window.localStorage;
  1920. let settings = JSON.parse(storage.getItem('settings'));
  1921. let form = document.forms.namedItem("custom-species-form");
  1922. for (let i=0; i<form.length; i++) {
  1923. if (settings[form[i].name] != undefined) {
  1924. if (form[i].type == "text")
  1925. form[i].value = settings[form[i].name];
  1926. else if (form[i].type == "number")
  1927. form[i].value = settings[form[i].name];
  1928. else if (form[i].type == "checkbox") {
  1929. form[i].checked = settings[form[i].name];
  1930. } else if (form[i].type == "radio") {
  1931. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1932. form[i].checked = (settings[name] == form[i].id);
  1933. }
  1934. }
  1935. }
  1936. }
  1937. function enable_button(name) {
  1938. document.getElementById("button-action-" + name).style.display = "inline";
  1939. }
  1940. function enable_panel(name) {
  1941. document.getElementById("action-part-" + name).style.display = "inline";
  1942. }
  1943. function enable_stat(name) {
  1944. document.getElementById(name).style.display = 'none';
  1945. document.getElementById(name + "Percent").style.display = 'none';
  1946. }
  1947. function enable_growth_part(name) {
  1948. document.querySelector("#part-" + name + "+label").style.display = 'inline';
  1949. }
  1950. function disable_button(name) {
  1951. document.getElementById("button-action-" + name).style.display = "none";
  1952. }
  1953. function disable_panel(name) {
  1954. document.getElementById("action-part-" + name).style.display = "none";
  1955. }
  1956. function startGame(e) {
  1957. if (started)
  1958. return;
  1959. started = true;
  1960. let form = document.forms.namedItem("custom-species-form");
  1961. for (let i=0; i<form.length; i++) {
  1962. if (form[i].value != "") {
  1963. if (form[i].type == "text")
  1964. macro[form[i].name] = form[i].value;
  1965. else if (form[i].type == "number")
  1966. macro[form[i].name] = parseFloat(form[i].value);
  1967. else if (form[i].type == "checkbox") {
  1968. if (form[i].name == "humanMode")
  1969. humanMode = form[i].checked;
  1970. else
  1971. macro[form[i].name] = form[i].checked;
  1972. } else if (form[i].type == "radio") {
  1973. if (form[i].checked) {
  1974. switch(form[i].id) {
  1975. case "brutality-0": macro.brutality = 0; break;
  1976. case "brutality-1": macro.brutality = 1; break;
  1977. case "brutality-2": macro.brutality = 2; break;
  1978. }
  1979. }
  1980. }
  1981. }
  1982. }
  1983. if (!macro.hasTail) {
  1984. macro.tailCount = 0;
  1985. }
  1986. let victimTypes = ["stomped","digested","stomach","ground"];
  1987. document.getElementById("log-area").style.display = 'inline';
  1988. document.getElementById("option-panel").style.display = 'none';
  1989. document.getElementById("action-panel").style.display = 'flex';
  1990. enable_panel("body");
  1991. enable_button("feed");
  1992. enable_button("stomp");
  1993. enable_button("sit");
  1994. enable_button("grind");
  1995. enable_growth_part("body");
  1996. enable_growth_part("ass");
  1997. if (macro.brutality > 0) {
  1998. enable_button("chew");
  1999. }
  2000. if (macro.analVore) {
  2001. victimTypes.push("bowels");
  2002. }
  2003. if (macro.tailCount > 0) {
  2004. enable_panel("tails");
  2005. victimTypes.push("tailslapped");
  2006. enable_button("tail_slap");
  2007. if (macro.tailMaw) {
  2008. victimTypes.push("tailmaw'd");
  2009. enable_button("tail_vore");
  2010. }
  2011. }
  2012. if (macro.maleParts) {
  2013. enable_panel("dick");
  2014. victimTypes.push("cock");
  2015. victimTypes.push("balls");
  2016. enable_button("cockslap");
  2017. enable_button("cock_vore");
  2018. enable_button("ball_smother");
  2019. enable_stat("cum");
  2020. enable_growth_part("dick");
  2021. enable_growth_part("balls");
  2022. if (macro.hasSheath) {
  2023. victimTypes.push("sheath");
  2024. enable_button("sheath_stuff");
  2025. enable_button("sheath_squeeze");
  2026. enable_button("sheath_absorb");
  2027. }
  2028. }
  2029. if (macro.femaleParts) {
  2030. victimTypes.push("womb");
  2031. enable_panel("vagina");
  2032. enable_button("unbirth");
  2033. enable_stat("femcum");
  2034. enable_growth_part("vagina");
  2035. }
  2036. if (macro.hasBreasts) {
  2037. victimTypes = victimTypes.concat(["breasts","cleavage","cleavagecrushed","cleavagedropped","cleavageabsorbed"]);
  2038. enable_panel("breasts");
  2039. enable_button("breast_crush");
  2040. enable_button("cleavage_stuff");
  2041. enable_button("cleavage_crush");
  2042. enable_button("cleavage_drop");
  2043. enable_button("cleavage_absorb");
  2044. enable_growth_part("breasts");
  2045. if (macro.lactationEnabled) {
  2046. victimTypes.push("flooded");
  2047. enable_button("breast_milk");
  2048. enable_stat("milk");
  2049. }
  2050. if (macro.breastVore) {
  2051. victimTypes.push("breastvored");
  2052. enable_button("breast_vore");
  2053. }
  2054. }
  2055. if (macro.maleParts || macro.femaleParts) {
  2056. victimTypes.push("splooged");
  2057. }
  2058. if (macro.hasPouch) {
  2059. victimTypes.push("pouched");
  2060. enable_panel("misc");
  2061. enable_button("pouch_stuff");
  2062. enable_button("pouch_eat");
  2063. }
  2064. if (macro.soulVoreEnabled) {
  2065. victimTypes.push("soulvore");
  2066. victimTypes.push("soulpaws");
  2067. enable_panel("souls");
  2068. enable_button("soul_vore");
  2069. enable_button("soul_absorb_paw");
  2070. }
  2071. if (macro.brutality > 0) {
  2072. enable_button("chew");
  2073. }
  2074. let table = document.getElementById("victim-table");
  2075. let tr = document.createElement('tr');
  2076. let th = document.createElement('th');
  2077. th.innerHTML = "Method";
  2078. tr.appendChild(th);
  2079. for (let i = 0; i < victimTypes.length; i++) {
  2080. let th = document.createElement('th');
  2081. th.classList.add("victim-table-cell");
  2082. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  2083. tr.appendChild(th);
  2084. }
  2085. table.appendChild(tr);
  2086. for (let key in things) {
  2087. if (things.hasOwnProperty(key) && key != "Container") {
  2088. let tr = document.createElement('tr');
  2089. tr.id = "stat-" + key;
  2090. tr.style.display = "none";
  2091. let th = document.createElement('th');
  2092. th.innerHTML = key;
  2093. tr.appendChild(th);
  2094. for (let i = 0; i < victimTypes.length; i++) {
  2095. let th = document.createElement('th');
  2096. th.innerHTML = 0;
  2097. th.id = "stat-" + victimTypes[i] + "-" + key;
  2098. tr.appendChild(th);
  2099. }
  2100. table.appendChild(tr);
  2101. }
  2102. }
  2103. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  2104. if (!macro.arousalEnabled) {
  2105. document.getElementById("arousal").style.display = "none";
  2106. document.getElementById("edge").style.display = "none";
  2107. }
  2108. //let species = document.getElementById("option-species").value;
  2109. //let re = /^[a-zA-Z\- ]+$/;
  2110. // tricksy tricksy players
  2111. //if (re.test(species)) {
  2112. // macro.species = species;
  2113. //}
  2114. macro.init();
  2115. update();
  2116. document.getElementById("actions-body").style.display = 'flex';
  2117. document.getElementById("stat-container").style.display = 'flex';
  2118. }
  2119. function actionTab(e) {
  2120. let name = e.target.id;
  2121. let target = "actions-" + name.replace(/action-part-/,"");
  2122. document.querySelectorAll(".action-part-button.active").forEach(function (element) {
  2123. element.classList.remove("active");
  2124. });
  2125. document.querySelectorAll(".action-tab").forEach(function (element) {
  2126. element.style.display = "none";
  2127. });
  2128. e.target.classList.add("active");
  2129. document.getElementById(target).style.display = "flex";
  2130. }
  2131. function registerActions() {
  2132. let buttons = document.querySelectorAll("[id^='button-action']");
  2133. buttons.forEach( function(button) {
  2134. let name = button.id;
  2135. name = name.replace(/button-action-/,"");
  2136. button.addEventListener("click", window[name]);
  2137. });
  2138. }
  2139. window.addEventListener('load', function(event) {
  2140. (function() {
  2141. let storage = window.localStorage;
  2142. if (storage.getItem("dark-mode") != null) {
  2143. setDarkMode(storage.getItem("dark-mode") === "true");
  2144. }
  2145. }());
  2146. victims["stomped"] = initVictims();
  2147. victims["tailslapped"] = initVictims();
  2148. victims["tailmaw'd"] = initVictims();
  2149. victims["bowels"] = initVictims();
  2150. victims["digested"] = initVictims();
  2151. victims["stomach"] = initVictims();
  2152. victims["cleavage"] = initVictims();
  2153. victims["cleavagecrushed"] = initVictims();
  2154. victims["cleavagedropped"] = initVictims();
  2155. victims["cleavageabsorbed"] = initVictims();
  2156. victims["breasts"] = initVictims();
  2157. victims["breastvored"] = initVictims();
  2158. victims["flooded"] = initVictims();
  2159. victims["womb"] = initVictims();
  2160. victims["sheath"] = initVictims();
  2161. victims["sheathcrushed"] = initVictims();
  2162. victims["sheathabsorbed"] = initVictims();
  2163. victims["cock"] = initVictims();
  2164. victims["balls"] = initVictims();
  2165. victims["smothered"] = initVictims();
  2166. victims["splooged"] = initVictims();
  2167. victims["ground"] = initVictims();
  2168. victims["pouched"] = initVictims();
  2169. victims["soulvore"] = initVictims();
  2170. victims["soulpaw"] = initVictims();
  2171. document.querySelectorAll(".action-part-button").forEach(function (element) {
  2172. element.addEventListener("click",actionTab);
  2173. });
  2174. registerActions();
  2175. document.getElementById("button-look").addEventListener("click",look);
  2176. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  2177. document.getElementById("button-location").addEventListener("click",change_location);
  2178. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  2179. document.getElementById("button-units").addEventListener("click",toggle_units);
  2180. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  2181. document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
  2182. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  2183. document.getElementById("button-dark-mode-options").addEventListener("click",toggleDarkMode);
  2184. document.getElementById("button-dark-mode-game").addEventListener("click",toggleDarkMode);
  2185. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  2186. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  2187. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  2188. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  2189. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  2190. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  2191. document.getElementById("button-load-custom").addEventListener("click",loadSettings);
  2192. document.getElementById("button-save-custom").addEventListener("click",saveSettings);
  2193. document.getElementById("button-start").addEventListener("click",startGame);
  2194. setTimeout(pick_move, 2000);
  2195. });