big steppy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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