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

1142 строки
30 KiB

  1. var strolling = false;
  2. var maxStomachDigest = 10;
  3. var maxBowelsDigest = 10;
  4. var unit = "metric";
  5. var verbose = true;
  6. var biome = "suburb";
  7. var newline = " ";
  8. victims = {};
  9. var macro =
  10. {
  11. "scaling": function(value, scale, factor) { return value * Math.pow(scale,factor); },
  12. "species": "crux",
  13. "color" : "blue",
  14. "baseHeight": 2.26,
  15. get height() { return this.scaling(this.baseHeight, this.scale, 1); },
  16. "baseMass": 135,
  17. get mass () { return this.scaling(this.baseMass, this.scale, 3); },
  18. "basePawArea": 0.1,
  19. get pawArea() { return this.scaling(this.basePawArea, this.scale, 2); },
  20. "baseAnalVoreArea": 0.1,
  21. get analVoreArea() { return this.scaling(this.baseAnalVoreArea, this.scale, 2); },
  22. "baseAssArea": 0.4,
  23. get assArea() { return this.scaling(this.baseAssArea, this.scale, 2); },
  24. "baseHandArea": 0.3,
  25. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  26. "baseDickLength": 0.3048,
  27. "baseDickDiameter": 0.08,
  28. "dickDensity": 1000,
  29. "dickScale": 1,
  30. get dickLength() { return this.scaling(this.baseDickLength * this.dickScale, this.scale, 1); },
  31. get dickDiameter() { return this.scaling(this.baseDickDiameter * this.dickScale, this.scale, 1); },
  32. get dickGirth() {
  33. return Math.pow((this.dickDiameter / 2),2) * Math.PI;
  34. },
  35. get dickArea() {
  36. return this.dickLength * this.dickDiameter * Math.PI / 2;
  37. },
  38. get dickVolume() {
  39. return this.dickLength * Math.pow(this.dickDiameter/2,2) * Math.PI;
  40. },
  41. get dickMass() {
  42. return this.dickVolume * this.dickDensity;
  43. },
  44. "baseBallDiameter": 0.05,
  45. "ballDensity": 1000,
  46. "ballScale": 1,
  47. get ballDiameter() { return this.scaling(this.baseBallDiameter * this.ballScale, this.scale, 1); },
  48. get ballArea() { return 2 * Math.PI * Math.pow(this.ballDiameter/2, 2) },
  49. get ballVolume() {
  50. var radius = this.ballDiameter / 2;
  51. return 4/3 * Math.PI * Math.pow(radius,3);
  52. },
  53. get ballMass() {
  54. var volume = this.ballVolume;
  55. return volume * this.ballDensity;
  56. },
  57. "baseCumRatio": 0.25,
  58. "cumScale": 1,
  59. get cumVolume() {
  60. return this.ballVolume * this.baseCumRatio * this.cumScale + Math.max(0,this.cumStorage.amount - this.cumStorage.limit);
  61. },
  62. "baseVaginaLength": 0.1,
  63. "baseVaginaWidth": 0.05,
  64. "vaginaScale": 1,
  65. get vaginaLength() { return this.scaling(this.baseVaginaLength * this.vaginaScale, this.scale, 1); },
  66. get vaginaWidth() { return this.scaling(this.baseVaginaWidth * this.vaginaScale, this.scale, 1); },
  67. get vaginaArea() { return this.vaginaLength * this.vaginaWidth },
  68. get vaginaVolume() { return this.vaginaArea * this.vaginaWidth },
  69. "femcumRatio": 0.25,
  70. "femcumScale": 1,
  71. get femcumVolume() {
  72. return this.vaginaVolume * this.femcumRatio * this.femcumScale + Math.max(0,this.femcumStorage.amount - this.femcumStorage.limit);
  73. },
  74. "baseBreastDiameter": 0.1,
  75. "breastScale": 1,
  76. "breastDensity": 1000,
  77. get breastDiameter() { return this.scaling(this.baseDickLength * this.breastScale, this.scale, 1); },
  78. get breastArea() {
  79. return 2 * Math.PI * Math.pow(this.breastDiameter/2,2);
  80. },
  81. get breastVolume() {
  82. var radius = this.breastDiameter / 2;
  83. return 4/3 * Math.PI * Math.pow(radius,3);
  84. },
  85. get breastMass() {
  86. var volume = this.breastVolume;
  87. return volume * this.breastDensity;
  88. },
  89. "digest": function(owner,organ) {
  90. var count = Math.min(organ.contents.length, organ.maxDigest);
  91. var container = new Container();
  92. while (count > 0) {
  93. var victim = organ.contents.shift();
  94. if (victim.name != "Container")
  95. victim = new Container([victim]);
  96. container = container.merge(victim);
  97. --count;
  98. }
  99. var digested = container.sum();
  100. for (var key in victims[organ.name]) {
  101. if (victims[organ.name].hasOwnProperty(key) && digested.hasOwnProperty(key) ) {
  102. victims["digested"][key] += digested[key];
  103. victims[organ.name][key] -= digested[key];
  104. }
  105. }
  106. var line = organ.describeDigestion(container);
  107. organ.fill(this,container);
  108. var summary = summarize(container.sum());
  109. if (organ.contents.length > 0) {
  110. setTimeout(function() { owner.digest(owner,organ) }, 15000);
  111. }
  112. update([line,summary,newline]);
  113. },
  114. "stomach": {
  115. "name": "stomach",
  116. "feed": function(prey) {
  117. this.feedFunc(prey,this,this.owner);
  118. },
  119. "feedFunc": function(prey,self,owner) {
  120. if (self.contents.length == 0)
  121. setTimeout(function() { owner.digest(owner,self) }, 15000);
  122. this.contents.push(prey);
  123. },
  124. "describeDigestion": function(container) {
  125. return "Your stomach gurgles as it digests " + container.describe(false);
  126. },
  127. "fill": function(owner,container) {
  128. //no-op
  129. },
  130. "contents": [],
  131. "maxDigest": 5
  132. },
  133. "bowels": {
  134. "name" : "bowels",
  135. "feed": function(prey) {
  136. this.feedFunc(prey,this,this.owner);
  137. },
  138. "feedFunc": function(prey,self,owner) {
  139. if (self.contents.length == 0)
  140. setTimeout(function() { owner.digest(owner,self) }, 15000);
  141. this.contents.push(prey);
  142. },
  143. "describeDigestion" : function(container) {
  144. return "Your bowels churn as they absorb " + container.describe(false);
  145. },
  146. "fill": function(owner,container) {
  147. //no-op
  148. },
  149. "contents" : [],
  150. "maxDigest" : 3
  151. },
  152. "womb": {
  153. "name" : "womb",
  154. "feed": function(prey) {
  155. this.feedFunc(prey,this,this.owner);
  156. },
  157. "feedFunc": function(prey,self,owner) {
  158. if (self.contents.length == 0)
  159. setTimeout(function() { owner.digest(owner,self) }, 15000);
  160. this.contents.push(prey);
  161. },
  162. "describeDigestion" : function(container) {
  163. return "Your womb squeezes as it dissolves " + container.describe(false);
  164. },
  165. "fill": function(owner,container) {
  166. owner.femcumStorage.amount += container.sum_property("mass") / 1e3;
  167. },
  168. "contents" : [],
  169. "maxDigest" : 1
  170. },
  171. "balls": {
  172. "name" : "balls",
  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 "Your balls slosh as they transform " + container.describe(false) + " into cum";
  183. },
  184. "fill": function(owner,container) {
  185. owner.cumStorage.amount += container.sum_property("mass") / 1e3;
  186. },
  187. "contents" : [],
  188. "maxDigest" : 1
  189. },
  190. "init": function() {
  191. this.stomach.owner = this;
  192. this.bowels.owner = this;
  193. this.womb.owner = this;
  194. this.balls.owner = this;
  195. this.cumStorage.owner = this;
  196. this.femcumStorage.owner = this;
  197. if (this.maleParts)
  198. this.fillCum(this)
  199. if (this.femaleParts)
  200. this.fillFemcum(this)
  201. },
  202. "maleParts": true,
  203. "femaleParts": true,
  204. "fillCum": function(self) {
  205. self.cumStorage.amount += self.ballVolume / 30;
  206. if (self.cumStorage.amount > self.cumStorage.limit)
  207. self.arouse(10 * (self.cumStorage.amount / self.cumStorage.limit - 1));
  208. setTimeout(function () { self.fillCum(self) }, 1000);
  209. update();
  210. },
  211. "fillFemcum": function(self) {
  212. self.femcumStorage.amount += self.vaginaVolume / 30;
  213. if (self.femcumStorage.amount > self.femcumStorage.limit)
  214. self.arouse(10 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
  215. setTimeout(function () { self.fillFemcum(self) }, 1000);
  216. update();
  217. },
  218. "cumStorage": {
  219. "amount": 0,
  220. get limit() {
  221. return this.owner.ballVolume;
  222. }
  223. },
  224. "femcumStorage": {
  225. "amount": 0,
  226. get limit() {
  227. return this.owner.vaginaVolume;
  228. }
  229. },
  230. "orgasm": false,
  231. "arousal": 0,
  232. "arouse": function(amount) {
  233. this.arousal += amount;
  234. if (this.arousal >= 100) {
  235. this.arousal = 100;
  236. if (!this.orgasm) {
  237. this.orgasm = true;
  238. if (this.maleParts) {
  239. this.maleOrgasm(this);
  240. }
  241. if (this.femaleParts) {
  242. this.femaleOrgasm(this);
  243. }
  244. }
  245. }
  246. },
  247. "quench": function(amount) {
  248. this.arousal -= amount;
  249. if (this.arousal <= 0) {
  250. this.arousal = 0;
  251. if (this.orgasm) {
  252. this.orgasm = false;
  253. }
  254. }
  255. },
  256. "maleOrgasm": function(self) {
  257. if (self.orgasm) {
  258. self.quench(10);
  259. var amount = Math.min(this.cumVolume, this.cumStorage.amount);
  260. this.cumStorage.amount -= amount;
  261. male_orgasm(amount);
  262. setTimeout(function() { self.maleOrgasm(self) }, 2000);
  263. }
  264. },
  265. "femaleOrgasm": function(self) {
  266. if (this.orgasm) {
  267. this.quench(10);
  268. var amount = Math.min(this.femcumVolume, this.femcumStorage.amount);
  269. this.femcumStorage.amount -= amount;
  270. female_orgasm(amount);
  271. setTimeout(function() { self.femaleOrgasm(self) }, 2000);
  272. }
  273. },
  274. get description() {
  275. result = [];
  276. line = "You are a " + length(macro.height, unit, true) + " tall " + macro.species + ". You weigh " + mass(macro.mass, unit) + ".";
  277. result.push(line);
  278. if (this.maleParts) {
  279. line = "Your " + length(macro.dickLength, unit, true) + " long dick hangs from your hips, with two " + mass(macro.ballMass, unit, true) + ", " + length(macro.ballDiameter, unit, true) + "-wide balls hanging beneath.";
  280. result.push(line);
  281. }
  282. if (this.femaleParts) {
  283. line = "Your glistening " + length(macro.vaginaLength, unit, true) + " long slit is oozing between your legs."
  284. result.push(line);
  285. line = "You have two " + length(macro.breastDiameter, unit, true) + "-wide breasts that weigh " + mass(macro.breastMass, unit) + " apiece.";
  286. result.push(line);
  287. }
  288. return result;
  289. },
  290. "scale": 1,
  291. "scaleWithMass": function(mass) {
  292. var startMass = this.mass;
  293. var newMass = startMass + mass;
  294. this.scale = Math.pow(newMass / this.baseMass, 1/3);
  295. }
  296. }
  297. function look()
  298. {
  299. var desc = macro.description;
  300. var line2 = ""
  301. if (macro.height > 1e6)
  302. line2 = "You're standing...on pretty much everything at once.";
  303. else
  304. switch(biome) {
  305. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  306. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  307. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  308. 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.";
  309. }
  310. desc = desc.concat([newline,line2,newline]);
  311. update(desc);
  312. }
  313. function get_living_prey(sum) {
  314. var total = 0;
  315. for (var key in sum) {
  316. if (sum.hasOwnProperty(key)) {
  317. if (key == "Person" || key == "Cow")
  318. total += sum[key];
  319. }
  320. }
  321. return total;
  322. }
  323. function toggle_auto()
  324. {
  325. strolling = !strolling;
  326. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  327. if (strolling)
  328. update(["You start walking.",newline]);
  329. else
  330. update(["You stop walking.",newline]);
  331. }
  332. function change_location()
  333. {
  334. switch(biome) {
  335. case "suburb": biome = "city"; break;
  336. case "city": biome = "downtown"; break;
  337. case "downtown": biome = "rural"; break;
  338. case "rural": biome = "suburb"; break;
  339. }
  340. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  341. }
  342. function toggle_units()
  343. {
  344. switch(unit) {
  345. case "metric": unit = "customary"; break;
  346. case "customary": unit = "approx"; break;
  347. case "approx": unit = "metric"; break;
  348. }
  349. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  350. update();
  351. }
  352. function toggle_verbose()
  353. {
  354. verbose = !verbose;
  355. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  356. }
  357. function initVictims()
  358. {
  359. return {
  360. "Person": 0,
  361. "Cow": 0,
  362. "Car": 0,
  363. "Bus": 0,
  364. "Tram": 0,
  365. "Motorcycle": 0,
  366. "House": 0,
  367. "Barn": 0,
  368. "Small Skyscraper": 0,
  369. "Train": 0,
  370. "Train Car": 0,
  371. "Parking Garage": 0,
  372. "Overpass": 0,
  373. "Town": 0,
  374. "City": 0,
  375. "Continent": 0,
  376. "Planet": 0
  377. };
  378. };
  379. // lists out total people
  380. function summarize(sum, fatal = true)
  381. {
  382. var count = get_living_prey(sum);
  383. return "<b>(" + count + " " + (fatal ? (count > 1 ? "kills" : "kill") : (count > 1 ? "prey" : "prey")) + ")</b>";
  384. }
  385. function getOnePrey(biome,area)
  386. {
  387. var potential = ["Person"];
  388. if(macro.height > 1e6)
  389. potential = ["Town","City","Continent","Planet"];
  390. else
  391. switch(biome) {
  392. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  393. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  394. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Parking Garage"]; break;
  395. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  396. }
  397. var potAreas = []
  398. potential.forEach(function (x) {
  399. potAreas.push([x,areas[x]]);
  400. });
  401. potAreas = potAreas.sort(function (x,y) {
  402. return y[1] - x[1];
  403. });
  404. for (var i=0; i<potAreas.length; i++) {
  405. x = potAreas[i];
  406. if (x[1] < area) {
  407. return new things[x[0]](1);
  408. }
  409. };
  410. return new Person(1);
  411. }
  412. function getPrey(region, area)
  413. {
  414. var weights = {"Person": 1};
  415. if (macro.height > 1e6) {
  416. weights = {
  417. "Town": 0.1,
  418. "City": 0.05,
  419. "Continent": 0.5,
  420. "Planet": 1
  421. }
  422. }
  423. else {
  424. switch(region)
  425. {
  426. case "rural": weights = {
  427. "Person": 0.05,
  428. "House": 0.01,
  429. "Barn": 0.01,
  430. "Cow": 0.2
  431. }; break;
  432. case "suburb": weights = {
  433. "Person": 0.5,
  434. "House": 0.5,
  435. "Car": 0.2,
  436. "Train": 0.1,
  437. "Bus": 0.1
  438. }; break;
  439. case "city": weights = {
  440. "Person": 0.5,
  441. "House": 0.2,
  442. "Car": 0.2,
  443. "Train": 0.1,
  444. "Bus": 0.1,
  445. "Tram": 0.1,
  446. "Parking Garage": 0.02
  447. }; break;
  448. case "downtown": weights = {
  449. "Person": 0.5,
  450. "Car": 0.3,
  451. "Bus": 0.15,
  452. "Tram": 0.1,
  453. "Parking Garage": 0.02,
  454. "Small Skyscraper": 0.4
  455. }; break;
  456. }
  457. }
  458. return fill_area2(area,weights);
  459. }
  460. function updateVictims(type,prey)
  461. {
  462. var sums = prey.sum();
  463. for (var key in sums) {
  464. if (sums.hasOwnProperty(key)) {
  465. victims[type][key] += sums[key];
  466. }
  467. }
  468. }
  469. function feed()
  470. {
  471. var area = macro.handArea;
  472. var prey = getPrey(biome, area);
  473. var line = prey.eat(verbose)
  474. var linesummary = summarize(prey.sum(), false);
  475. var people = get_living_prey(prey.sum());
  476. var sound = "Ulp";
  477. if (people < 3) {
  478. sound = "Ulp.";
  479. } else if (people < 10) {
  480. sound = "Gulp.";
  481. } else if (people < 50) {
  482. sound = "Glrrp.";
  483. } else if (people < 500) {
  484. sound = "Glrrrpkh!";
  485. } else if (people < 5000) {
  486. sound = "GLRRKPKH!";
  487. } else {
  488. sound = "Oh the humanity!";
  489. }
  490. var preyMass = prey.sum_property("mass");
  491. macro.scaleWithMass(preyMass);
  492. macro.stomach.feed(prey);
  493. macro.arouse(5);
  494. updateVictims("stomach",prey);
  495. update([sound,line,linesummary,newline]);
  496. }
  497. function stomp()
  498. {
  499. var area = macro.pawArea;
  500. var prey = getPrey(biome, area);
  501. var line = prey.stomp(verbose)
  502. var linesummary = summarize(prey.sum(), true);
  503. var people = get_living_prey(prey.sum());
  504. var sound = "Thump";
  505. if (people < 3) {
  506. sound = "Thump!";
  507. } else if (people < 10) {
  508. sound = "Squish!";
  509. } else if (people < 50) {
  510. sound = "Crunch!";
  511. } else if (people < 500) {
  512. sound = "CRUNCH!";
  513. } else if (people < 5000) {
  514. sound = "CRRUUUNCH!!";
  515. } else {
  516. sound = "Oh the humanity!";
  517. }
  518. var preyMass = prey.sum_property("mass");
  519. macro.scaleWithMass(preyMass);
  520. macro.arouse(5);
  521. updateVictims("stomped",prey);
  522. update([sound,line,linesummary,newline]);
  523. }
  524. function anal_vore()
  525. {
  526. var area = macro.analVoreArea;
  527. var prey = getOnePrey(biome,area);
  528. area = macro.assArea;
  529. var crushed = getPrey(biome,area);
  530. var line1 = prey.anal_vore(verbose, macro.height);
  531. var line1summary = summarize(prey.sum(), false);
  532. var line2 = crushed.buttcrush(verbose);
  533. var line2summary = summarize(crushed.sum(), true);
  534. var people = get_living_prey(prey.sum());
  535. var sound = "Shlp";
  536. if (people < 3) {
  537. sound = "Shlp.";
  538. } else if (people < 10) {
  539. sound = "Squelch.";
  540. } else if (people < 50) {
  541. sound = "Shlurrp.";
  542. } else if (people < 500) {
  543. sound = "SHLRP!";
  544. } else if (people < 5000) {
  545. sound = "SQLCH!!";
  546. } else {
  547. sound = "Oh the humanity!";
  548. }
  549. var people = get_living_prey(crushed.sum());
  550. var sound2 = "Thump";
  551. if (people < 3) {
  552. sound2 = "Thump!";
  553. } else if (people < 10) {
  554. sound2 = "Squish!";
  555. } else if (people < 50) {
  556. sound2 = "Crunch!";
  557. } else if (people < 500) {
  558. sound2 = "CRUNCH!";
  559. } else if (people < 5000) {
  560. sound2 = "CRRUUUNCH!!";
  561. } else {
  562. sound2 = "Oh the humanity!";
  563. }
  564. var preyMass = prey.sum_property("mass");
  565. var crushedMass = prey.sum_property("mass");
  566. macro.scaleWithMass(preyMass);
  567. macro.scaleWithMass(crushedMass);
  568. macro.bowels.feed(prey);
  569. macro.arouse(10);
  570. updateVictims("bowels",prey);
  571. updateVictims("stomped",crushed);
  572. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  573. }
  574. function breast_crush()
  575. {
  576. var area = macro.breastArea;
  577. var prey = getPrey(biome, area);
  578. var line = prey.breast_crush(verbose);
  579. var linesummary = summarize(prey.sum(), true);
  580. var people = get_living_prey(prey.sum());
  581. var sound = "Thump";
  582. if (people < 3) {
  583. sound = "Thump!";
  584. } else if (people < 10) {
  585. sound = "Squish!";
  586. } else if (people < 50) {
  587. sound = "Crunch!";
  588. } else if (people < 500) {
  589. sound = "CRUNCH!";
  590. } else if (people < 5000) {
  591. sound = "CRRUUUNCH!!";
  592. } else {
  593. sound = "Oh the humanity!";
  594. }
  595. var preyMass = prey.sum_property("mass");
  596. macro.scaleWithMass(preyMass);
  597. macro.arouse(10);
  598. updateVictims("breasts",prey);
  599. update([sound,line,linesummary,newline]);
  600. }
  601. function unbirth()
  602. {
  603. var area = macro.vaginaArea;
  604. var prey = getPrey(biome, area);
  605. var line = prey.unbirth(verbose)
  606. var linesummary = summarize(prey.sum(), false);
  607. var people = get_living_prey(prey.sum());
  608. var sound = "";
  609. if (people < 3) {
  610. sound = "Shlp.";
  611. } else if (people < 10) {
  612. sound = "Squelch.";
  613. } else if (people < 50) {
  614. sound = "Shlurrp.";
  615. } else if (people < 500) {
  616. sound = "SHLRP!";
  617. } else if (people < 5000) {
  618. sound = "SQLCH!!";
  619. } else {
  620. sound = "Oh the humanity!";
  621. }
  622. var preyMass = prey.sum_property("mass");
  623. macro.scaleWithMass(preyMass);
  624. macro.womb.feed(prey);
  625. macro.arouse(20);
  626. updateVictims("womb",prey);
  627. update([sound,line,linesummary,newline]);
  628. }
  629. function cockslap()
  630. {
  631. var area = macro.dickArea;
  632. var prey = getPrey(biome, area);
  633. var line = prey.cockslap(verbose)
  634. var linesummary = summarize(prey.sum(), true);
  635. var people = get_living_prey(prey.sum());
  636. var sound = "Thump";
  637. if (people < 3) {
  638. sound = "Thump!";
  639. } else if (people < 10) {
  640. sound = "Squish!";
  641. } else if (people < 50) {
  642. sound = "Crunch!";
  643. } else if (people < 500) {
  644. sound = "CRUNCH!";
  645. } else if (people < 5000) {
  646. sound = "CRRUUUNCH!!";
  647. } else {
  648. sound = "Oh the humanity!";
  649. }
  650. var preyMass = prey.sum_property("mass");
  651. macro.scaleWithMass(preyMass);
  652. macro.arouse(15);
  653. updateVictims("cock",prey);
  654. update([sound,line,linesummary,newline]);
  655. }
  656. function cock_vore()
  657. {
  658. var area = macro.dickGirth;
  659. var prey = getPrey(biome, area);
  660. var line = prey.cock_vore(verbose)
  661. var linesummary = summarize(prey.sum(), true);
  662. var people = get_living_prey(prey.sum());
  663. var sound = "lp";
  664. if (people < 3) {
  665. sound = "Shlp.";
  666. } else if (people < 10) {
  667. sound = "Squelch.";
  668. } else if (people < 50) {
  669. sound = "Shlurrp.";
  670. } else if (people < 500) {
  671. sound = "SHLRP!";
  672. } else if (people < 5000) {
  673. sound = "SQLCH!!";
  674. } else {
  675. sound = "Oh the humanity!";
  676. }
  677. var preyMass = prey.sum_property("mass");
  678. macro.scaleWithMass(preyMass);
  679. macro.balls.feed(prey);
  680. macro.arouse(20);
  681. updateVictims("balls",prey);
  682. update([sound,line,linesummary,newline]);
  683. }
  684. function ball_smother()
  685. {
  686. var area = macro.ballArea * 2;
  687. var prey = getPrey(biome, area);
  688. var line = prey.ball_smother(verbose)
  689. var linesummary = summarize(prey.sum(), true);
  690. var people = get_living_prey(prey.sum());
  691. var sound = "Thump";
  692. if (people < 3) {
  693. sound = "Thump!";
  694. } else if (people < 10) {
  695. sound = "Squish!";
  696. } else if (people < 50) {
  697. sound = "Smoosh!";
  698. } else if (people < 500) {
  699. sound = "SMOOSH!";
  700. } else if (people < 5000) {
  701. sound = "SMOOOOOSH!!";
  702. } else {
  703. sound = "Oh the humanity!";
  704. }
  705. var preyMass = prey.sum_property("mass");
  706. macro.scaleWithMass(preyMass);
  707. macro.arouse(10);
  708. updateVictims("balls",prey);
  709. update([sound,line,linesummary,newline]);
  710. }
  711. function male_orgasm(vol)
  712. {
  713. var area = Math.pow(vol, 2/3);
  714. var prey = getPrey(biome, area);
  715. var line = prey.male_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false))
  716. var linesummary = summarize(prey.sum(), true);
  717. var people = get_living_prey(prey.sum());
  718. var sound = "Spurt!";
  719. if (people < 3) {
  720. sound = "Spurt!";
  721. } else if (people < 10) {
  722. sound = "Sploosh!";
  723. } else if (people < 50) {
  724. sound = "Sploooooosh!";
  725. } else if (people < 500) {
  726. sound = "SPLOOSH!";
  727. } else if (people < 5000) {
  728. sound = "SPLOOOOOOOOOOSH!!";
  729. } else {
  730. sound = "Oh the humanity!";
  731. }
  732. var preyMass = prey.sum_property("mass");
  733. macro.scaleWithMass(preyMass);
  734. updateVictims("splooged",prey);
  735. update([sound,line,linesummary,newline]);
  736. }
  737. function female_orgasm(vol)
  738. {
  739. var area = Math.pow(vol, 2/3);
  740. var prey = getPrey(biome, area);
  741. var line = prey.female_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false));
  742. var linesummary = summarize(prey.sum(), true);
  743. var people = get_living_prey(prey.sum());
  744. var sound = "Spurt!";
  745. if (people < 3) {
  746. sound = "Spurt!";
  747. } else if (people < 10) {
  748. sound = "Sploosh!";
  749. } else if (people < 50) {
  750. sound = "Sploooooosh!";
  751. } else if (people < 500) {
  752. sound = "SPLOOSH!";
  753. } else if (people < 5000) {
  754. sound = "SPLOOOOOOOOOOSH!!";
  755. } else {
  756. sound = "Oh the humanity!";
  757. }
  758. var preyMass = prey.sum_property("mass");
  759. macro.scaleWithMass(preyMass);
  760. updateVictims("splooged",prey);
  761. update([sound,line,linesummary,newline]);
  762. }
  763. function update(lines = [])
  764. {
  765. var log = document.getElementById("log");
  766. lines.forEach(function (x) {
  767. var line = document.createElement('div');
  768. line.innerHTML = x;
  769. log.appendChild(line);
  770. });
  771. if (lines.length > 0)
  772. log.scrollTop = log.scrollHeight;
  773. document.getElementById("height").innerHTML = "Height: " + length(macro.height, unit);
  774. document.getElementById("mass").innerHTML = "Mass: " + mass(macro.mass, unit);
  775. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  776. document.getElementById("cum").innerHTML = "Cum: " + volume(macro.cumStorage.amount,unit,false) + "/" + volume(macro.cumStorage.limit,unit,false);
  777. document.getElementById("femcum").innerHTML = "Femcum: " + volume(macro.femcumStorage.amount,unit,false) + "/" + volume(macro.femcumStorage.limit,unit,false);
  778. for (var type in victims) {
  779. if (victims.hasOwnProperty(type)) {
  780. for (var key in victims[type]){
  781. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  782. document.getElementById("stat-" + key).style.display = "table-row";
  783. document.getElementById("stat-" + type + "-" + key).innerHTML = victims[type][key];
  784. }
  785. }
  786. }
  787. }
  788. }
  789. function pick_move()
  790. {
  791. if (!strolling) {
  792. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  793. return;
  794. }
  795. var choice = Math.random();
  796. if (choice < 0.2) {
  797. anal_vore();
  798. } else if (choice < 0.6) {
  799. stomp();
  800. } else {
  801. feed();
  802. }
  803. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  804. }
  805. function grow()
  806. {
  807. var oldHeight = macro.height;
  808. var oldMass = macro.mass;
  809. macro.scale *= 1.2;
  810. var newHeight = macro.height;
  811. var newMass = macro.mass;
  812. var heightDelta = newHeight - oldHeight;
  813. var massDelta = newMass - oldMass;
  814. var heightStr = length(heightDelta, unit);
  815. var massStr = mass(massDelta, unit);
  816. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  817. }
  818. function grow_lots()
  819. {
  820. var oldHeight = macro.height;
  821. var oldMass = macro.mass;
  822. macro.scale *= 100;
  823. var newHeight = macro.height;
  824. var newMass = macro.mass;
  825. var heightDelta = newHeight - oldHeight;
  826. var massDelta = newMass - oldMass;
  827. var heightStr = length(heightDelta, unit);
  828. var massStr = mass(massDelta, unit);
  829. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  830. }
  831. function option_male() {
  832. macro.maleParts = !macro.maleParts;
  833. document.getElementById("button-male-genitals").innerHTML = (macro.maleParts ? "Male genitals on" : "Male genitals off");
  834. }
  835. function option_female() {
  836. macro.femaleParts = !macro.femaleParts;
  837. document.getElementById("button-female-genitals").innerHTML = (macro.femaleParts ? "Female genitals on" : "Female genitals off");
  838. }
  839. function preset(name) {
  840. switch(name){
  841. case "Fen":
  842. macro.species = "crux";
  843. macro.baseHeight = 2.2606;
  844. macro.baseMass = 124.738;
  845. break;
  846. case "Renard":
  847. macro.species = "fox";
  848. macro.baseHeight = 1.549;
  849. macro.baseMass = 83.9;
  850. case "Vulpes":
  851. macro.species = "fox";
  852. macro.baseHeight = 20000;
  853. macro.baseMass = 180591661866272;
  854. }
  855. }
  856. function startGame() {
  857. document.getElementById("option-panel").style.display = 'none';
  858. document.getElementById("action-panel").style.display = 'flex';
  859. victimTypes = ["stomped","digested","stomach","bowels"];
  860. if (macro.maleParts) {
  861. victimTypes = victimTypes.concat(["cock","balls"]);
  862. } else {
  863. document.getElementById("button-cockslap").style.display = 'none';
  864. document.getElementById("button-cock_vore").style.display = 'none';
  865. document.getElementById("button-ball_smother").style.display = 'none';
  866. document.getElementById("cum").style.display = 'none';
  867. }
  868. if (macro.femaleParts) {
  869. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  870. } else {
  871. document.getElementById("button-breast_crush").style.display = 'none';
  872. document.getElementById("button-unbirth").style.display = 'none';
  873. document.getElementById("femcum").style.display = 'none';
  874. }
  875. if (macro.maleParts || macro.femaleParts) {
  876. victimTypes.push("splooged");
  877. }
  878. var table = document.getElementById("victim-table");
  879. var tr = document.createElement('tr');
  880. var th = document.createElement('th');
  881. th.innerHTML = "Method";
  882. tr.appendChild(th);
  883. for (var i = 0; i < victimTypes.length; i++) {
  884. var th = document.createElement('th');
  885. th.classList.add("victim-table-cell");
  886. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  887. tr.appendChild(th);
  888. }
  889. table.appendChild(tr);
  890. for (var key in things) {
  891. if (things.hasOwnProperty(key) && key != "Container") {
  892. var tr = document.createElement('tr');
  893. tr.id = "stat-" + key;
  894. tr.style.display = "none";
  895. var th = document.createElement('th');
  896. th.innerHTML = key;
  897. tr.appendChild(th);
  898. for (var i = 0; i < victimTypes.length; i++) {
  899. var th = document.createElement('th');
  900. th.innerHTML = 0;
  901. th.id = "stat-" + victimTypes[i] + "-" + key;
  902. tr.appendChild(th);
  903. }
  904. table.appendChild(tr);
  905. }
  906. }
  907. //var species = document.getElementById("option-species").value;
  908. //var re = /^[a-zA-Z\- ]+$/;
  909. // tricksy tricksy players
  910. //if (re.test(species)) {
  911. // macro.species = species;
  912. //}
  913. macro.init();
  914. update();
  915. document.getElementById("stat-container").style.display = 'flex';
  916. }
  917. window.addEventListener('load', function(event) {
  918. victims["stomped"] = initVictims();
  919. victims["digested"] = initVictims();
  920. victims["stomach"] = initVictims();
  921. victims["bowels"] = initVictims();
  922. victims["breasts"] = initVictims();
  923. victims["womb"] = initVictims();
  924. victims["cock"] = initVictims();
  925. victims["balls"] = initVictims();
  926. victims["smothered"] = initVictims();
  927. victims["splooged"] = initVictims();
  928. document.getElementById("button-look").addEventListener("click",look);
  929. document.getElementById("button-grow").addEventListener("click",grow);
  930. document.getElementById("button-feed").addEventListener("click",feed);
  931. document.getElementById("button-stomp").addEventListener("click",stomp);
  932. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  933. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  934. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  935. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  936. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  937. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  938. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  939. document.getElementById("button-location").addEventListener("click",change_location);
  940. document.getElementById("button-units").addEventListener("click",toggle_units);
  941. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  942. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  943. document.getElementById("button-male-genitals").addEventListener("click",option_male);
  944. document.getElementById("button-female-genitals").addEventListener("click",option_female);
  945. document.getElementById("button-start").addEventListener("click",startGame);
  946. setTimeout(pick_move, 2000);
  947. });