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.
 
 
 

1254 lines
34 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 Container([new things[x[0]](1)]);
  427. }
  428. };
  429. return new Container([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_area(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 = describe("eat", prey, macro, verbose)
  501. var linesummary = summarize(prey.sum(), false);
  502. var people = get_living_prey(prey.sum());
  503. var sound = "";
  504. if (people == 0) {
  505. sound = "";
  506. } else if (people < 3) {
  507. sound = "Ulp.";
  508. } else if (people < 10) {
  509. sound = "Gulp.";
  510. } else if (people < 50) {
  511. sound = "Glrrp.";
  512. } else if (people < 500) {
  513. sound = "Glrrrpkh!";
  514. } else if (people < 5000) {
  515. sound = "GLRRKPKH!";
  516. } else {
  517. sound = "Oh the humanity!";
  518. }
  519. var preyMass = prey.sum_property("mass");
  520. macro.scaleWithMass(preyMass);
  521. macro.stomach.feed(prey);
  522. macro.arouse(5);
  523. updateVictims("stomach",prey);
  524. update([sound,line,linesummary,newline]);
  525. }
  526. function stomp()
  527. {
  528. var area = macro.pawArea;
  529. var prey = getPrey(biome, area);
  530. var line = describe("stomp", prey, macro, verbose)
  531. var linesummary = summarize(prey.sum(), true);
  532. var people = get_living_prey(prey.sum());
  533. var sound = "Thump";
  534. if (people < 3) {
  535. sound = "Thump!";
  536. } else if (people < 10) {
  537. sound = "Squish!";
  538. } else if (people < 50) {
  539. sound = "Crunch!";
  540. } else if (people < 500) {
  541. sound = "CRUNCH!";
  542. } else if (people < 5000) {
  543. sound = "CRRUUUNCH!!";
  544. } else {
  545. sound = "Oh the humanity!";
  546. }
  547. var preyMass = prey.sum_property("mass");
  548. macro.scaleWithMass(preyMass);
  549. macro.arouse(5);
  550. updateVictims("stomped",prey);
  551. update([sound,line,linesummary,newline]);
  552. }
  553. function anal_vore()
  554. {
  555. var area = macro.analVoreArea;
  556. var prey = getOnePrey(biome,area);
  557. area = macro.assArea;
  558. var crushed = getPrey(biome,area);
  559. var line1 = describe("anal-vore", prey, macro, verbose);
  560. var line1summary = summarize(prey.sum(), false);
  561. var line2 = describe("ass-crush", crushed, macro, verbose);
  562. var line2summary = summarize(crushed.sum(), true);
  563. var people = get_living_prey(prey.sum());
  564. var sound = "Shlp";
  565. if (people < 3) {
  566. sound = "Shlp.";
  567. } else if (people < 10) {
  568. sound = "Squelch.";
  569. } else if (people < 50) {
  570. sound = "Shlurrp.";
  571. } else if (people < 500) {
  572. sound = "SHLRP!";
  573. } else if (people < 5000) {
  574. sound = "SQLCH!!";
  575. } else {
  576. sound = "Oh the humanity!";
  577. }
  578. var people = get_living_prey(crushed.sum());
  579. var sound2 = "Thump";
  580. if (people < 3) {
  581. sound2 = "Thump!";
  582. } else if (people < 10) {
  583. sound2 = "Squish!";
  584. } else if (people < 50) {
  585. sound2 = "Crunch!";
  586. } else if (people < 500) {
  587. sound2 = "CRUNCH!";
  588. } else if (people < 5000) {
  589. sound2 = "CRRUUUNCH!!";
  590. } else {
  591. sound2 = "Oh the humanity!";
  592. }
  593. var preyMass = prey.sum_property("mass");
  594. var crushedMass = prey.sum_property("mass");
  595. macro.scaleWithMass(preyMass);
  596. macro.scaleWithMass(crushedMass);
  597. macro.bowels.feed(prey);
  598. macro.arouse(10);
  599. updateVictims("bowels",prey);
  600. updateVictims("stomped",crushed);
  601. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  602. }
  603. function breast_crush()
  604. {
  605. var area = macro.breastArea;
  606. var prey = getPrey(biome, area);
  607. var line = describe("breast-crush", prey, macro, verbose);
  608. var linesummary = summarize(prey.sum(), true);
  609. var people = get_living_prey(prey.sum());
  610. var sound = "Thump";
  611. if (people < 3) {
  612. sound = "Thump!";
  613. } else if (people < 10) {
  614. sound = "Squish!";
  615. } else if (people < 50) {
  616. sound = "Crunch!";
  617. } else if (people < 500) {
  618. sound = "CRUNCH!";
  619. } else if (people < 5000) {
  620. sound = "CRRUUUNCH!!";
  621. } else {
  622. sound = "Oh the humanity!";
  623. }
  624. var preyMass = prey.sum_property("mass");
  625. macro.scaleWithMass(preyMass);
  626. macro.arouse(10);
  627. updateVictims("breasts",prey);
  628. update([sound,line,linesummary,newline]);
  629. }
  630. function unbirth()
  631. {
  632. var area = macro.vaginaArea;
  633. var prey = getPrey(biome, area);
  634. var line = describe("unbirth", prey, macro, verbose)
  635. var linesummary = summarize(prey.sum(), false);
  636. var people = get_living_prey(prey.sum());
  637. var sound = "";
  638. if (people < 3) {
  639. sound = "Shlp.";
  640. } else if (people < 10) {
  641. sound = "Squelch.";
  642. } else if (people < 50) {
  643. sound = "Shlurrp.";
  644. } else if (people < 500) {
  645. sound = "SHLRP!";
  646. } else if (people < 5000) {
  647. sound = "SQLCH!!";
  648. } else {
  649. sound = "Oh the humanity!";
  650. }
  651. var preyMass = prey.sum_property("mass");
  652. macro.scaleWithMass(preyMass);
  653. macro.womb.feed(prey);
  654. macro.arouse(20);
  655. updateVictims("womb",prey);
  656. update([sound,line,linesummary,newline]);
  657. }
  658. function cockslap()
  659. {
  660. var area = macro.dickArea;
  661. var prey = getPrey(biome, area);
  662. var line = describe("cockslap", prey, macro, verbose)
  663. var linesummary = summarize(prey.sum(), true);
  664. var people = get_living_prey(prey.sum());
  665. var sound = "Thump";
  666. if (people < 3) {
  667. sound = "Thump!";
  668. } else if (people < 10) {
  669. sound = "Squish!";
  670. } else if (people < 50) {
  671. sound = "Crunch!";
  672. } else if (people < 500) {
  673. sound = "CRUNCH!";
  674. } else if (people < 5000) {
  675. sound = "CRRUUUNCH!!";
  676. } else {
  677. sound = "Oh the humanity!";
  678. }
  679. var preyMass = prey.sum_property("mass");
  680. macro.scaleWithMass(preyMass);
  681. macro.arouse(15);
  682. updateVictims("cock",prey);
  683. update([sound,line,linesummary,newline]);
  684. }
  685. function cock_vore()
  686. {
  687. var area = macro.dickGirth;
  688. var prey = getPrey(biome, area);
  689. var line = describe("cock-vore", prey, macro, verbose)
  690. var linesummary = summarize(prey.sum(), false);
  691. var people = get_living_prey(prey.sum());
  692. var sound = "lp";
  693. if (people < 3) {
  694. sound = "Shlp.";
  695. } else if (people < 10) {
  696. sound = "Squelch.";
  697. } else if (people < 50) {
  698. sound = "Shlurrp.";
  699. } else if (people < 500) {
  700. sound = "SHLRP!";
  701. } else if (people < 5000) {
  702. sound = "SQLCH!!";
  703. } else {
  704. sound = "Oh the humanity!";
  705. }
  706. var preyMass = prey.sum_property("mass");
  707. macro.scaleWithMass(preyMass);
  708. macro.balls.feed(prey);
  709. macro.arouse(20);
  710. updateVictims("balls",prey);
  711. update([sound,line,linesummary,newline]);
  712. }
  713. function ball_smother()
  714. {
  715. var area = macro.ballArea * 2;
  716. var prey = getPrey(biome, area);
  717. var line = describe("ball-smother", prey, macro, verbose)
  718. var linesummary = summarize(prey.sum(), true);
  719. var people = get_living_prey(prey.sum());
  720. var sound = "Thump";
  721. if (people < 3) {
  722. sound = "Thump!";
  723. } else if (people < 10) {
  724. sound = "Squish!";
  725. } else if (people < 50) {
  726. sound = "Smoosh!";
  727. } else if (people < 500) {
  728. sound = "SMOOSH!";
  729. } else if (people < 5000) {
  730. sound = "SMOOOOOSH!!";
  731. } else {
  732. sound = "Oh the humanity!";
  733. }
  734. var preyMass = prey.sum_property("mass");
  735. macro.scaleWithMass(preyMass);
  736. macro.arouse(10);
  737. updateVictims("balls",prey);
  738. update([sound,line,linesummary,newline]);
  739. }
  740. function male_orgasm(vol)
  741. {
  742. var area = Math.pow(vol, 2/3);
  743. var prey = getPrey(biome, area);
  744. var line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  745. var linesummary = summarize(prey.sum(), true);
  746. var people = get_living_prey(prey.sum());
  747. var sound = "Spurt!";
  748. if (people < 3) {
  749. sound = "Spurt!";
  750. } else if (people < 10) {
  751. sound = "Sploosh!";
  752. } else if (people < 50) {
  753. sound = "Sploooooosh!";
  754. } else if (people < 500) {
  755. sound = "SPLOOSH!";
  756. } else if (people < 5000) {
  757. sound = "SPLOOOOOOOOOOSH!!";
  758. } else {
  759. sound = "Oh the humanity!";
  760. }
  761. var preyMass = prey.sum_property("mass");
  762. macro.scaleWithMass(preyMass);
  763. updateVictims("splooged",prey);
  764. update([sound,line,linesummary,newline]);
  765. }
  766. function female_orgasm(vol)
  767. {
  768. var area = Math.pow(vol, 2/3);
  769. var prey = getPrey(biome, area);
  770. var line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  771. var linesummary = summarize(prey.sum(), true);
  772. var people = get_living_prey(prey.sum());
  773. var sound = "Spurt!";
  774. if (people < 3) {
  775. sound = "Spurt!";
  776. } else if (people < 10) {
  777. sound = "Sploosh!";
  778. } else if (people < 50) {
  779. sound = "Sploooooosh!";
  780. } else if (people < 500) {
  781. sound = "SPLOOSH!";
  782. } else if (people < 5000) {
  783. sound = "SPLOOOOOOOOOOSH!!";
  784. } else {
  785. sound = "Oh the humanity!";
  786. }
  787. var preyMass = prey.sum_property("mass");
  788. macro.scaleWithMass(preyMass);
  789. updateVictims("splooged",prey);
  790. update([sound,line,linesummary,newline]);
  791. }
  792. function transformNumbers(line)
  793. {
  794. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  795. }
  796. function update(lines = [])
  797. {
  798. var log = document.getElementById("log");
  799. lines.forEach(function (x) {
  800. var line = document.createElement('div');
  801. line.innerHTML = transformNumbers(x);
  802. log.appendChild(line);
  803. });
  804. if (lines.length > 0)
  805. log.scrollTop = log.scrollHeight;
  806. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  807. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  808. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  809. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false))
  810. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  811. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  812. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  813. for (var type in victims) {
  814. if (victims.hasOwnProperty(type)) {
  815. for (var key in victims[type]){
  816. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  817. document.getElementById("stat-" + key).style.display = "table-row";
  818. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  819. }
  820. }
  821. }
  822. }
  823. }
  824. function pick_move()
  825. {
  826. if (!strolling) {
  827. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  828. return;
  829. }
  830. var choice = Math.random();
  831. if (choice < 0.2) {
  832. anal_vore();
  833. } else if (choice < 0.6) {
  834. stomp();
  835. } else {
  836. feed();
  837. }
  838. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  839. }
  840. function grow()
  841. {
  842. var oldHeight = macro.height;
  843. var oldMass = macro.mass;
  844. macro.scale *= 1.2;
  845. var newHeight = macro.height;
  846. var newMass = macro.mass;
  847. var heightDelta = newHeight - oldHeight;
  848. var massDelta = newMass - oldMass;
  849. var heightStr = length(heightDelta, unit);
  850. var massStr = mass(massDelta, unit);
  851. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  852. }
  853. function grow_cock()
  854. {
  855. var oldLength = macro.dickLength;
  856. var oldMass = macro.dickMass;
  857. macro.dickScale *= 1.2;
  858. var lengthDelta = macro.dickLength - oldLength;
  859. var massDelta = macro.dickMass - oldMass;
  860. update(["Power surges through you as your cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]);
  861. }
  862. function grow_balls()
  863. {
  864. var oldDiameter = macro.ballDiameter;
  865. var oldMass = macro.ballMass;
  866. macro.ballScale *= 1.2;
  867. var diameterDelta = macro.ballDiameter - oldDiameter;
  868. var massDelta = macro.ballMass - oldMass;
  869. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  870. }
  871. function grow_breasts()
  872. {
  873. var oldDiameter = macro.breastDiameter;
  874. var oldMass = macro.breastMass;
  875. macro.breastScale *= 1.2;
  876. var diameterDelta = macro.breastDiameter - oldDiameter;
  877. var massDelta = macro.breastMass - oldMass;
  878. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  879. }
  880. function grow_vagina()
  881. {
  882. var oldLength = macro.vaginaLength;
  883. macro.vaginaScale *= 1.2;
  884. var lengthDelta = macro.vaginaLength - oldLength;
  885. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  886. }
  887. function grow_ass()
  888. {
  889. var oldDiameter = Math.pow(macro.assArea,1/2);
  890. macro.assScale *= 1.2;
  891. var diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  892. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  893. }
  894. function grow_lots()
  895. {
  896. var oldHeight = macro.height;
  897. var oldMass = macro.mass;
  898. macro.scale *= 100;
  899. var newHeight = macro.height;
  900. var newMass = macro.mass;
  901. var heightDelta = newHeight - oldHeight;
  902. var massDelta = newMass - oldMass;
  903. var heightStr = length(heightDelta, unit);
  904. var massStr = mass(massDelta, unit);
  905. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  906. }
  907. function preset(name) {
  908. switch(name){
  909. case "Fen":
  910. macro.species = "crux";
  911. macro.baseHeight = 2.2606;
  912. macro.baseMass = 124.738;
  913. break;
  914. case "Renard":
  915. macro.species = "fox";
  916. macro.baseHeight = 1.549;
  917. macro.baseMass = 83.9;
  918. case "Vulpes":
  919. macro.species = "fox";
  920. macro.baseHeight = 20000;
  921. macro.baseMass = 180591661866272;
  922. }
  923. }
  924. function startGame(e) {
  925. form = document.forms.namedItem("custom-species-form");
  926. for (var i=0; i<form.length; i++) {
  927. if (form[i].value != "") {
  928. if (form[i].type == "text")
  929. macro[form[i].name] = form[i].value;
  930. else if (form[i].type == "number")
  931. macro[form[i].name] = parseFloat(form[i].value);
  932. else if (form[i].type == "checkbox") {
  933. macro[form[i].name] = form[i].checked;
  934. }
  935. }
  936. }
  937. document.getElementById("log-area").style.display = 'inline';
  938. document.getElementById("option-panel").style.display = 'none';
  939. document.getElementById("action-panel").style.display = 'flex';
  940. victimTypes = ["stomped","digested","stomach","bowels"];
  941. if (macro.maleParts) {
  942. victimTypes = victimTypes.concat(["cock","balls"]);
  943. } else {
  944. document.getElementById("button-cockslap").style.display = 'none';
  945. document.getElementById("button-cock_vore").style.display = 'none';
  946. document.getElementById("button-ball_smother").style.display = 'none';
  947. document.getElementById("cum").style.display = 'none';
  948. document.getElementById("button-grow-dick").style.display = 'none';
  949. document.getElementById("button-grow-balls").style.display = 'none';
  950. }
  951. if (macro.femaleParts) {
  952. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  953. } else {
  954. document.getElementById("button-breast_crush").style.display = 'none';
  955. document.getElementById("button-unbirth").style.display = 'none';
  956. document.getElementById("femcum").style.display = 'none';
  957. document.getElementById("button-grow-vagina").style.display = 'none';
  958. document.getElementById("button-grow-breasts").style.display = 'none';
  959. }
  960. if (macro.maleParts || macro.femaleParts) {
  961. victimTypes.push("splooged");
  962. }
  963. var table = document.getElementById("victim-table");
  964. var tr = document.createElement('tr');
  965. var th = document.createElement('th');
  966. th.innerHTML = "Method";
  967. tr.appendChild(th);
  968. for (var i = 0; i < victimTypes.length; i++) {
  969. var th = document.createElement('th');
  970. th.classList.add("victim-table-cell");
  971. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  972. tr.appendChild(th);
  973. }
  974. table.appendChild(tr);
  975. for (var key in things) {
  976. if (things.hasOwnProperty(key) && key != "Container") {
  977. var tr = document.createElement('tr');
  978. tr.id = "stat-" + key;
  979. tr.style.display = "none";
  980. var th = document.createElement('th');
  981. th.innerHTML = key;
  982. tr.appendChild(th);
  983. for (var i = 0; i < victimTypes.length; i++) {
  984. var th = document.createElement('th');
  985. th.innerHTML = 0;
  986. th.id = "stat-" + victimTypes[i] + "-" + key;
  987. tr.appendChild(th);
  988. }
  989. table.appendChild(tr);
  990. }
  991. }
  992. //var species = document.getElementById("option-species").value;
  993. //var re = /^[a-zA-Z\- ]+$/;
  994. // tricksy tricksy players
  995. //if (re.test(species)) {
  996. // macro.species = species;
  997. //}
  998. macro.init();
  999. update();
  1000. document.getElementById("stat-container").style.display = 'flex';
  1001. }
  1002. window.addEventListener('load', function(event) {
  1003. victims["stomped"] = initVictims();
  1004. victims["digested"] = initVictims();
  1005. victims["stomach"] = initVictims();
  1006. victims["bowels"] = initVictims();
  1007. victims["breasts"] = initVictims();
  1008. victims["womb"] = initVictims();
  1009. victims["cock"] = initVictims();
  1010. victims["balls"] = initVictims();
  1011. victims["smothered"] = initVictims();
  1012. victims["splooged"] = initVictims();
  1013. document.getElementById("button-look").addEventListener("click",look);
  1014. document.getElementById("button-feed").addEventListener("click",feed);
  1015. document.getElementById("button-stomp").addEventListener("click",stomp);
  1016. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  1017. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  1018. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  1019. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  1020. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  1021. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  1022. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  1023. document.getElementById("button-location").addEventListener("click",change_location);
  1024. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  1025. document.getElementById("button-units").addEventListener("click",toggle_units);
  1026. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  1027. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  1028. document.getElementById("button-grow").addEventListener("click",grow);
  1029. document.getElementById("button-grow-dick").addEventListener("click",grow_cock);
  1030. document.getElementById("button-grow-balls").addEventListener("click",grow_balls);
  1031. document.getElementById("button-grow-breasts").addEventListener("click",grow_breasts);
  1032. document.getElementById("button-grow-vagina").addEventListener("click",grow_vagina);
  1033. document.getElementById("button-grow-ass").addEventListener("click",grow_ass);
  1034. document.getElementById("button-start").addEventListener("click",startGame);
  1035. setTimeout(pick_move, 2000);
  1036. });