big steppy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2509 lines
67 KiB

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