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

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