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.
 
 
 

1159 lines
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.1,
  25. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  26. "baseDickLength": 0.3,
  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 > 1e12)
  302. line2 = "You're pretty much everywhere at once.";
  303. else if (macro.height > 1e6)
  304. line2 = "You're standing...on pretty much everything at once.";
  305. else
  306. switch(biome) {
  307. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  308. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  309. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  310. 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.";
  311. }
  312. desc = desc.concat([newline,line2,newline]);
  313. update(desc);
  314. }
  315. function get_living_prey(sum) {
  316. var total = 0;
  317. for (var key in sum) {
  318. if (sum.hasOwnProperty(key)) {
  319. if (key == "Person" || key == "Cow")
  320. total += sum[key];
  321. }
  322. }
  323. return total;
  324. }
  325. function toggle_auto()
  326. {
  327. strolling = !strolling;
  328. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  329. if (strolling)
  330. update(["You start walking.",newline]);
  331. else
  332. update(["You stop walking.",newline]);
  333. }
  334. function change_location()
  335. {
  336. switch(biome) {
  337. case "suburb": biome = "city"; break;
  338. case "city": biome = "downtown"; break;
  339. case "downtown": biome = "rural"; break;
  340. case "rural": biome = "suburb"; break;
  341. }
  342. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  343. }
  344. function toggle_units()
  345. {
  346. switch(unit) {
  347. case "metric": unit = "customary"; break;
  348. case "customary": unit = "approx"; break;
  349. case "approx": unit = "metric"; break;
  350. }
  351. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  352. update();
  353. }
  354. function toggle_verbose()
  355. {
  356. verbose = !verbose;
  357. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  358. }
  359. function initVictims()
  360. {
  361. return {
  362. "Person": 0,
  363. "Cow": 0,
  364. "Car": 0,
  365. "Bus": 0,
  366. "Tram": 0,
  367. "Motorcycle": 0,
  368. "House": 0,
  369. "Barn": 0,
  370. "Small Skyscraper": 0,
  371. "Train": 0,
  372. "Train Car": 0,
  373. "Parking Garage": 0,
  374. "Overpass": 0,
  375. "Town": 0,
  376. "City": 0,
  377. "Continent": 0,
  378. "Planet": 0,
  379. "Star": 0,
  380. "Solar System": 0,
  381. "Galaxy": 0
  382. };
  383. };
  384. // lists out total people
  385. function summarize(sum, fatal = true)
  386. {
  387. var count = get_living_prey(sum);
  388. return "<b>(" + count + " " + (fatal ? (count > 1 ? "kills" : "kill") : (count > 1 ? "prey" : "prey")) + ")</b>";
  389. }
  390. function getOnePrey(biome,area)
  391. {
  392. var potential = ["Person"];
  393. if (macro.height > 1e12)
  394. potential = ["Planet","Star","Solar System","Galaxy"];
  395. else if (macro.height > 1e6)
  396. potential = ["Town","City","Continent","Planet"];
  397. else
  398. switch(biome) {
  399. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  400. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  401. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Parking Garage"]; break;
  402. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  403. }
  404. var potAreas = []
  405. potential.forEach(function (x) {
  406. potAreas.push([x,areas[x]]);
  407. });
  408. potAreas = potAreas.sort(function (x,y) {
  409. return y[1] - x[1];
  410. });
  411. for (var i=0; i<potAreas.length; i++) {
  412. x = potAreas[i];
  413. if (x[1] < area) {
  414. return new things[x[0]](1);
  415. }
  416. };
  417. return new Person(1);
  418. }
  419. function getPrey(region, area)
  420. {
  421. var weights = {"Person": 1};
  422. if (macro.height > 1e12) {
  423. weights = {
  424. "Planet": 0.0001,
  425. "Star": 0.0001,
  426. "Solar System": 0.00001,
  427. "Galaxy": 0.01
  428. }
  429. }
  430. else if (macro.height > 1e6) {
  431. weights = {
  432. "Town": 0.1,
  433. "City": 0.05,
  434. "Continent": 0.005,
  435. "Planet": 0.0001
  436. }
  437. }
  438. else {
  439. switch(region)
  440. {
  441. case "rural": weights = {
  442. "Person": 0.05,
  443. "House": 0.01,
  444. "Barn": 0.01,
  445. "Cow": 0.2
  446. }; break;
  447. case "suburb": weights = {
  448. "Person": 0.5,
  449. "House": 0.5,
  450. "Car": 0.2,
  451. "Train": 0.1,
  452. "Bus": 0.1
  453. }; break;
  454. case "city": weights = {
  455. "Person": 0.5,
  456. "House": 0.2,
  457. "Car": 0.2,
  458. "Train": 0.1,
  459. "Bus": 0.1,
  460. "Tram": 0.1,
  461. "Parking Garage": 0.02
  462. }; break;
  463. case "downtown": weights = {
  464. "Person": 0.5,
  465. "Car": 0.3,
  466. "Bus": 0.15,
  467. "Tram": 0.1,
  468. "Parking Garage": 0.02,
  469. "Small Skyscraper": 0.4
  470. }; break;
  471. }
  472. }
  473. return fill_area2(area,weights);
  474. }
  475. function updateVictims(type,prey)
  476. {
  477. var sums = prey.sum();
  478. for (var key in sums) {
  479. if (sums.hasOwnProperty(key)) {
  480. victims[type][key] += sums[key];
  481. }
  482. }
  483. }
  484. function feed()
  485. {
  486. var area = macro.handArea;
  487. var prey = getPrey(biome, area);
  488. var line = prey.eat(verbose)
  489. var linesummary = summarize(prey.sum(), false);
  490. var people = get_living_prey(prey.sum());
  491. var sound = "Ulp";
  492. if (people < 3) {
  493. sound = "Ulp.";
  494. } else if (people < 10) {
  495. sound = "Gulp.";
  496. } else if (people < 50) {
  497. sound = "Glrrp.";
  498. } else if (people < 500) {
  499. sound = "Glrrrpkh!";
  500. } else if (people < 5000) {
  501. sound = "GLRRKPKH!";
  502. } else {
  503. sound = "Oh the humanity!";
  504. }
  505. var preyMass = prey.sum_property("mass");
  506. macro.scaleWithMass(preyMass);
  507. macro.stomach.feed(prey);
  508. macro.arouse(5);
  509. updateVictims("stomach",prey);
  510. update([sound,line,linesummary,newline]);
  511. }
  512. function stomp()
  513. {
  514. var area = macro.pawArea;
  515. var prey = getPrey(biome, area);
  516. var line = prey.stomp(verbose)
  517. var linesummary = summarize(prey.sum(), true);
  518. var people = get_living_prey(prey.sum());
  519. var sound = "Thump";
  520. if (people < 3) {
  521. sound = "Thump!";
  522. } else if (people < 10) {
  523. sound = "Squish!";
  524. } else if (people < 50) {
  525. sound = "Crunch!";
  526. } else if (people < 500) {
  527. sound = "CRUNCH!";
  528. } else if (people < 5000) {
  529. sound = "CRRUUUNCH!!";
  530. } else {
  531. sound = "Oh the humanity!";
  532. }
  533. var preyMass = prey.sum_property("mass");
  534. macro.scaleWithMass(preyMass);
  535. macro.arouse(5);
  536. updateVictims("stomped",prey);
  537. update([sound,line,linesummary,newline]);
  538. }
  539. function anal_vore()
  540. {
  541. var area = macro.analVoreArea;
  542. var prey = getOnePrey(biome,area);
  543. area = macro.assArea;
  544. var crushed = getPrey(biome,area);
  545. var line1 = prey.anal_vore(verbose, macro.height);
  546. var line1summary = summarize(prey.sum(), false);
  547. var line2 = crushed.buttcrush(verbose);
  548. var line2summary = summarize(crushed.sum(), true);
  549. var people = get_living_prey(prey.sum());
  550. var sound = "Shlp";
  551. if (people < 3) {
  552. sound = "Shlp.";
  553. } else if (people < 10) {
  554. sound = "Squelch.";
  555. } else if (people < 50) {
  556. sound = "Shlurrp.";
  557. } else if (people < 500) {
  558. sound = "SHLRP!";
  559. } else if (people < 5000) {
  560. sound = "SQLCH!!";
  561. } else {
  562. sound = "Oh the humanity!";
  563. }
  564. var people = get_living_prey(crushed.sum());
  565. var sound2 = "Thump";
  566. if (people < 3) {
  567. sound2 = "Thump!";
  568. } else if (people < 10) {
  569. sound2 = "Squish!";
  570. } else if (people < 50) {
  571. sound2 = "Crunch!";
  572. } else if (people < 500) {
  573. sound2 = "CRUNCH!";
  574. } else if (people < 5000) {
  575. sound2 = "CRRUUUNCH!!";
  576. } else {
  577. sound2 = "Oh the humanity!";
  578. }
  579. var preyMass = prey.sum_property("mass");
  580. var crushedMass = prey.sum_property("mass");
  581. macro.scaleWithMass(preyMass);
  582. macro.scaleWithMass(crushedMass);
  583. macro.bowels.feed(prey);
  584. macro.arouse(10);
  585. updateVictims("bowels",prey);
  586. updateVictims("stomped",crushed);
  587. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  588. }
  589. function breast_crush()
  590. {
  591. var area = macro.breastArea;
  592. var prey = getPrey(biome, area);
  593. var line = prey.breast_crush(verbose);
  594. var linesummary = summarize(prey.sum(), true);
  595. var people = get_living_prey(prey.sum());
  596. var sound = "Thump";
  597. if (people < 3) {
  598. sound = "Thump!";
  599. } else if (people < 10) {
  600. sound = "Squish!";
  601. } else if (people < 50) {
  602. sound = "Crunch!";
  603. } else if (people < 500) {
  604. sound = "CRUNCH!";
  605. } else if (people < 5000) {
  606. sound = "CRRUUUNCH!!";
  607. } else {
  608. sound = "Oh the humanity!";
  609. }
  610. var preyMass = prey.sum_property("mass");
  611. macro.scaleWithMass(preyMass);
  612. macro.arouse(10);
  613. updateVictims("breasts",prey);
  614. update([sound,line,linesummary,newline]);
  615. }
  616. function unbirth()
  617. {
  618. var area = macro.vaginaArea;
  619. var prey = getPrey(biome, area);
  620. var line = prey.unbirth(verbose)
  621. var linesummary = summarize(prey.sum(), false);
  622. var people = get_living_prey(prey.sum());
  623. var sound = "";
  624. if (people < 3) {
  625. sound = "Shlp.";
  626. } else if (people < 10) {
  627. sound = "Squelch.";
  628. } else if (people < 50) {
  629. sound = "Shlurrp.";
  630. } else if (people < 500) {
  631. sound = "SHLRP!";
  632. } else if (people < 5000) {
  633. sound = "SQLCH!!";
  634. } else {
  635. sound = "Oh the humanity!";
  636. }
  637. var preyMass = prey.sum_property("mass");
  638. macro.scaleWithMass(preyMass);
  639. macro.womb.feed(prey);
  640. macro.arouse(20);
  641. updateVictims("womb",prey);
  642. update([sound,line,linesummary,newline]);
  643. }
  644. function cockslap()
  645. {
  646. var area = macro.dickArea;
  647. var prey = getPrey(biome, area);
  648. var line = prey.cockslap(verbose)
  649. var linesummary = summarize(prey.sum(), true);
  650. var people = get_living_prey(prey.sum());
  651. var sound = "Thump";
  652. if (people < 3) {
  653. sound = "Thump!";
  654. } else if (people < 10) {
  655. sound = "Squish!";
  656. } else if (people < 50) {
  657. sound = "Crunch!";
  658. } else if (people < 500) {
  659. sound = "CRUNCH!";
  660. } else if (people < 5000) {
  661. sound = "CRRUUUNCH!!";
  662. } else {
  663. sound = "Oh the humanity!";
  664. }
  665. var preyMass = prey.sum_property("mass");
  666. macro.scaleWithMass(preyMass);
  667. macro.arouse(15);
  668. updateVictims("cock",prey);
  669. update([sound,line,linesummary,newline]);
  670. }
  671. function cock_vore()
  672. {
  673. var area = macro.dickGirth;
  674. var prey = getPrey(biome, area);
  675. var line = prey.cock_vore(verbose)
  676. var linesummary = summarize(prey.sum(), true);
  677. var people = get_living_prey(prey.sum());
  678. var sound = "lp";
  679. if (people < 3) {
  680. sound = "Shlp.";
  681. } else if (people < 10) {
  682. sound = "Squelch.";
  683. } else if (people < 50) {
  684. sound = "Shlurrp.";
  685. } else if (people < 500) {
  686. sound = "SHLRP!";
  687. } else if (people < 5000) {
  688. sound = "SQLCH!!";
  689. } else {
  690. sound = "Oh the humanity!";
  691. }
  692. var preyMass = prey.sum_property("mass");
  693. macro.scaleWithMass(preyMass);
  694. macro.balls.feed(prey);
  695. macro.arouse(20);
  696. updateVictims("balls",prey);
  697. update([sound,line,linesummary,newline]);
  698. }
  699. function ball_smother()
  700. {
  701. var area = macro.ballArea * 2;
  702. var prey = getPrey(biome, area);
  703. var line = prey.ball_smother(verbose)
  704. var linesummary = summarize(prey.sum(), true);
  705. var people = get_living_prey(prey.sum());
  706. var sound = "Thump";
  707. if (people < 3) {
  708. sound = "Thump!";
  709. } else if (people < 10) {
  710. sound = "Squish!";
  711. } else if (people < 50) {
  712. sound = "Smoosh!";
  713. } else if (people < 500) {
  714. sound = "SMOOSH!";
  715. } else if (people < 5000) {
  716. sound = "SMOOOOOSH!!";
  717. } else {
  718. sound = "Oh the humanity!";
  719. }
  720. var preyMass = prey.sum_property("mass");
  721. macro.scaleWithMass(preyMass);
  722. macro.arouse(10);
  723. updateVictims("balls",prey);
  724. update([sound,line,linesummary,newline]);
  725. }
  726. function male_orgasm(vol)
  727. {
  728. var area = Math.pow(vol, 2/3);
  729. var prey = getPrey(biome, area);
  730. var line = prey.male_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false))
  731. var linesummary = summarize(prey.sum(), true);
  732. var people = get_living_prey(prey.sum());
  733. var sound = "Spurt!";
  734. if (people < 3) {
  735. sound = "Spurt!";
  736. } else if (people < 10) {
  737. sound = "Sploosh!";
  738. } else if (people < 50) {
  739. sound = "Sploooooosh!";
  740. } else if (people < 500) {
  741. sound = "SPLOOSH!";
  742. } else if (people < 5000) {
  743. sound = "SPLOOOOOOOOOOSH!!";
  744. } else {
  745. sound = "Oh the humanity!";
  746. }
  747. var preyMass = prey.sum_property("mass");
  748. macro.scaleWithMass(preyMass);
  749. updateVictims("splooged",prey);
  750. update([sound,line,linesummary,newline]);
  751. }
  752. function female_orgasm(vol)
  753. {
  754. var area = Math.pow(vol, 2/3);
  755. var prey = getPrey(biome, area);
  756. var line = prey.female_orgasm(verbose).replace("$VOLUME",volume(vol,unit,false));
  757. var linesummary = summarize(prey.sum(), true);
  758. var people = get_living_prey(prey.sum());
  759. var sound = "Spurt!";
  760. if (people < 3) {
  761. sound = "Spurt!";
  762. } else if (people < 10) {
  763. sound = "Sploosh!";
  764. } else if (people < 50) {
  765. sound = "Sploooooosh!";
  766. } else if (people < 500) {
  767. sound = "SPLOOSH!";
  768. } else if (people < 5000) {
  769. sound = "SPLOOOOOOOOOOSH!!";
  770. } else {
  771. sound = "Oh the humanity!";
  772. }
  773. var preyMass = prey.sum_property("mass");
  774. macro.scaleWithMass(preyMass);
  775. updateVictims("splooged",prey);
  776. update([sound,line,linesummary,newline]);
  777. }
  778. function update(lines = [])
  779. {
  780. var log = document.getElementById("log");
  781. lines.forEach(function (x) {
  782. var line = document.createElement('div');
  783. line.innerHTML = x;
  784. log.appendChild(line);
  785. });
  786. if (lines.length > 0)
  787. log.scrollTop = log.scrollHeight;
  788. document.getElementById("height").innerHTML = "Height: " + length(macro.height, unit);
  789. document.getElementById("mass").innerHTML = "Mass: " + mass(macro.mass, unit);
  790. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  791. document.getElementById("cum").innerHTML = "Cum: " + volume(macro.cumStorage.amount,unit,false) + "/" + volume(macro.cumStorage.limit,unit,false);
  792. document.getElementById("femcum").innerHTML = "Femcum: " + volume(macro.femcumStorage.amount,unit,false) + "/" + volume(macro.femcumStorage.limit,unit,false);
  793. for (var type in victims) {
  794. if (victims.hasOwnProperty(type)) {
  795. for (var key in victims[type]){
  796. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  797. document.getElementById("stat-" + key).style.display = "table-row";
  798. document.getElementById("stat-" + type + "-" + key).innerHTML = victims[type][key];
  799. }
  800. }
  801. }
  802. }
  803. }
  804. function pick_move()
  805. {
  806. if (!strolling) {
  807. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  808. return;
  809. }
  810. var choice = Math.random();
  811. if (choice < 0.2) {
  812. anal_vore();
  813. } else if (choice < 0.6) {
  814. stomp();
  815. } else {
  816. feed();
  817. }
  818. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  819. }
  820. function grow()
  821. {
  822. var oldHeight = macro.height;
  823. var oldMass = macro.mass;
  824. macro.scale *= 1.2;
  825. var newHeight = macro.height;
  826. var newMass = macro.mass;
  827. var heightDelta = newHeight - oldHeight;
  828. var massDelta = newMass - oldMass;
  829. var heightStr = length(heightDelta, unit);
  830. var massStr = mass(massDelta, unit);
  831. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  832. }
  833. function grow_lots()
  834. {
  835. var oldHeight = macro.height;
  836. var oldMass = macro.mass;
  837. macro.scale *= 100;
  838. var newHeight = macro.height;
  839. var newMass = macro.mass;
  840. var heightDelta = newHeight - oldHeight;
  841. var massDelta = newMass - oldMass;
  842. var heightStr = length(heightDelta, unit);
  843. var massStr = mass(massDelta, unit);
  844. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  845. }
  846. function preset(name) {
  847. switch(name){
  848. case "Fen":
  849. macro.species = "crux";
  850. macro.baseHeight = 2.2606;
  851. macro.baseMass = 124.738;
  852. break;
  853. case "Renard":
  854. macro.species = "fox";
  855. macro.baseHeight = 1.549;
  856. macro.baseMass = 83.9;
  857. case "Vulpes":
  858. macro.species = "fox";
  859. macro.baseHeight = 20000;
  860. macro.baseMass = 180591661866272;
  861. }
  862. }
  863. function startGame(e) {
  864. form = document.forms.namedItem("custom-species-form");
  865. for (var i=0; i<form.length; i++) {
  866. if (form[i].value != "") {
  867. if (form[i].type == "text")
  868. macro[form[i].name] = form[i].value;
  869. else if (form[i].type == "number")
  870. macro[form[i].name] = parseFloat(form[i].value);
  871. else if (form[i].type == "checkbox") {
  872. macro[form[i].name] = form[i].checked;
  873. }
  874. }
  875. }
  876. document.getElementById("log-area").style.display = 'inline';
  877. document.getElementById("option-panel").style.display = 'none';
  878. document.getElementById("action-panel").style.display = 'flex';
  879. victimTypes = ["stomped","digested","stomach","bowels"];
  880. if (macro.maleParts) {
  881. victimTypes = victimTypes.concat(["cock","balls"]);
  882. } else {
  883. document.getElementById("button-cockslap").style.display = 'none';
  884. document.getElementById("button-cock_vore").style.display = 'none';
  885. document.getElementById("button-ball_smother").style.display = 'none';
  886. document.getElementById("cum").style.display = 'none';
  887. }
  888. if (macro.femaleParts) {
  889. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  890. } else {
  891. document.getElementById("button-breast_crush").style.display = 'none';
  892. document.getElementById("button-unbirth").style.display = 'none';
  893. document.getElementById("femcum").style.display = 'none';
  894. }
  895. if (macro.maleParts || macro.femaleParts) {
  896. victimTypes.push("splooged");
  897. }
  898. var table = document.getElementById("victim-table");
  899. var tr = document.createElement('tr');
  900. var th = document.createElement('th');
  901. th.innerHTML = "Method";
  902. tr.appendChild(th);
  903. for (var i = 0; i < victimTypes.length; i++) {
  904. var th = document.createElement('th');
  905. th.classList.add("victim-table-cell");
  906. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  907. tr.appendChild(th);
  908. }
  909. table.appendChild(tr);
  910. for (var key in things) {
  911. if (things.hasOwnProperty(key) && key != "Container") {
  912. var tr = document.createElement('tr');
  913. tr.id = "stat-" + key;
  914. tr.style.display = "none";
  915. var th = document.createElement('th');
  916. th.innerHTML = key;
  917. tr.appendChild(th);
  918. for (var i = 0; i < victimTypes.length; i++) {
  919. var th = document.createElement('th');
  920. th.innerHTML = 0;
  921. th.id = "stat-" + victimTypes[i] + "-" + key;
  922. tr.appendChild(th);
  923. }
  924. table.appendChild(tr);
  925. }
  926. }
  927. //var species = document.getElementById("option-species").value;
  928. //var re = /^[a-zA-Z\- ]+$/;
  929. // tricksy tricksy players
  930. //if (re.test(species)) {
  931. // macro.species = species;
  932. //}
  933. macro.init();
  934. update();
  935. document.getElementById("stat-container").style.display = 'flex';
  936. }
  937. window.addEventListener('load', function(event) {
  938. victims["stomped"] = initVictims();
  939. victims["digested"] = initVictims();
  940. victims["stomach"] = initVictims();
  941. victims["bowels"] = initVictims();
  942. victims["breasts"] = initVictims();
  943. victims["womb"] = initVictims();
  944. victims["cock"] = initVictims();
  945. victims["balls"] = initVictims();
  946. victims["smothered"] = initVictims();
  947. victims["splooged"] = initVictims();
  948. document.getElementById("button-look").addEventListener("click",look);
  949. document.getElementById("button-grow").addEventListener("click",grow);
  950. document.getElementById("button-feed").addEventListener("click",feed);
  951. document.getElementById("button-stomp").addEventListener("click",stomp);
  952. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  953. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  954. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  955. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  956. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  957. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  958. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  959. document.getElementById("button-location").addEventListener("click",change_location);
  960. document.getElementById("button-units").addEventListener("click",toggle_units);
  961. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  962. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  963. document.getElementById("button-start").addEventListener("click",startGame);
  964. setTimeout(pick_move, 2000);
  965. });