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

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