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

2417 строки
64 KiB

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