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

2515 строки
67 KiB

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