big steppy
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

2524 行
67 KiB

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