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

1319 строки
36 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. "growthPoints": 0,
  293. "addGrowthPoints": function(mass) {
  294. this.growthPoints += Math.round(50 * mass / (this.scale*this.scale));
  295. },
  296. "scale": 3,
  297. }
  298. function look()
  299. {
  300. var desc = macro.description;
  301. var line2 = ""
  302. if (macro.height > 1e12)
  303. line2 = "You're pretty much everywhere at once.";
  304. else if (macro.height > 1e6)
  305. line2 = "You're standing...on pretty much everything at once.";
  306. else
  307. switch(biome) {
  308. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  309. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  310. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  311. 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.";
  312. }
  313. desc = desc.concat([newline,line2,newline]);
  314. update(desc);
  315. }
  316. function get_living_prey(sum) {
  317. var total = 0;
  318. for (var key in sum) {
  319. if (sum.hasOwnProperty(key)) {
  320. if (key == "Person" || key == "Cow")
  321. total += sum[key];
  322. }
  323. }
  324. return total;
  325. }
  326. function toggle_auto()
  327. {
  328. strolling = !strolling;
  329. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  330. if (strolling)
  331. update(["You start walking.",newline]);
  332. else
  333. update(["You stop walking.",newline]);
  334. }
  335. function change_location()
  336. {
  337. switch(biome) {
  338. case "suburb": biome = "city"; break;
  339. case "city": biome = "downtown"; break;
  340. case "downtown": biome = "rural"; break;
  341. case "rural": biome = "suburb"; break;
  342. }
  343. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  344. }
  345. function toggle_units()
  346. {
  347. switch(unit) {
  348. case "metric": unit = "customary"; break;
  349. case "customary": unit = "approx"; break;
  350. case "approx": unit = "metric"; break;
  351. }
  352. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  353. update();
  354. }
  355. function toggle_numbers() {
  356. switch(numbers) {
  357. case "full": numbers="prefix"; break;
  358. case "prefix": numbers="words"; break;
  359. case "words": numbers = "scientific"; break;
  360. case "scientific": numbers = "full"; break;
  361. }
  362. document.getElementById("button-numbers").innerHTML = "Numbers: " + numbers.charAt(0).toUpperCase() + numbers.slice(1);
  363. update();
  364. }
  365. function toggle_verbose()
  366. {
  367. verbose = !verbose;
  368. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  369. }
  370. function initVictims()
  371. {
  372. return {
  373. "Person": 0,
  374. "Cow": 0,
  375. "Car": 0,
  376. "Bus": 0,
  377. "Tram": 0,
  378. "Motorcycle": 0,
  379. "House": 0,
  380. "Barn": 0,
  381. "Small Skyscraper": 0,
  382. "Large 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", "Large 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": 1e-10,
  437. "Star": 1e-10,
  438. "Solar System": 1e-10,
  439. "Galaxy": 1e-10
  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. "Large Skyscraper": 0.1
  483. }; break;
  484. }
  485. }
  486. return fill_area(area,weights);
  487. }
  488. function updateVictims(type,prey)
  489. {
  490. var sums = prey.sum();
  491. for (var key in sums) {
  492. if (sums.hasOwnProperty(key)) {
  493. victims[type][key] += sums[key];
  494. }
  495. }
  496. }
  497. function feed()
  498. {
  499. var area = macro.handArea;
  500. var prey = getPrey(biome, area);
  501. var line = describe("eat", prey, macro, verbose)
  502. var linesummary = summarize(prey.sum(), false);
  503. var people = get_living_prey(prey.sum());
  504. var sound = "";
  505. if (people == 0) {
  506. sound = "";
  507. } else if (people < 3) {
  508. sound = "Ulp.";
  509. } else if (people < 10) {
  510. sound = "Gulp.";
  511. } else if (people < 50) {
  512. sound = "Glrrp.";
  513. } else if (people < 500) {
  514. sound = "Glrrrpkh!";
  515. } else if (people < 5000) {
  516. sound = "GLRRKPKH!";
  517. } else {
  518. sound = "Oh the humanity!";
  519. }
  520. var preyMass = prey.sum_property("mass");
  521. macro.addGrowthPoints(preyMass);
  522. macro.stomach.feed(prey);
  523. macro.arouse(5);
  524. updateVictims("stomach",prey);
  525. update([sound,line,linesummary,newline]);
  526. }
  527. function stomp()
  528. {
  529. var area = macro.pawArea;
  530. var prey = getPrey(biome, area);
  531. var line = describe("stomp", prey, macro, verbose)
  532. var linesummary = summarize(prey.sum(), true);
  533. var people = get_living_prey(prey.sum());
  534. var sound = "Thump";
  535. if (people < 3) {
  536. sound = "Thump!";
  537. } else if (people < 10) {
  538. sound = "Squish!";
  539. } else if (people < 50) {
  540. sound = "Crunch!";
  541. } else if (people < 500) {
  542. sound = "CRUNCH!";
  543. } else if (people < 5000) {
  544. sound = "CRRUUUNCH!!";
  545. } else {
  546. sound = "Oh the humanity!";
  547. }
  548. var preyMass = prey.sum_property("mass");
  549. macro.addGrowthPoints(preyMass);
  550. macro.arouse(5);
  551. updateVictims("stomped",prey);
  552. update([sound,line,linesummary,newline]);
  553. }
  554. function anal_vore()
  555. {
  556. var area = macro.analVoreArea;
  557. var prey = getOnePrey(biome,area);
  558. area = macro.assArea;
  559. var crushed = getPrey(biome,area);
  560. var line1 = describe("anal-vore", prey, macro, verbose);
  561. var line1summary = summarize(prey.sum(), false);
  562. var line2 = describe("ass-crush", crushed, macro, verbose);
  563. var line2summary = summarize(crushed.sum(), true);
  564. var people = get_living_prey(prey.sum());
  565. var sound = "Shlp";
  566. if (people < 3) {
  567. sound = "Shlp.";
  568. } else if (people < 10) {
  569. sound = "Squelch.";
  570. } else if (people < 50) {
  571. sound = "Shlurrp.";
  572. } else if (people < 500) {
  573. sound = "SHLRP!";
  574. } else if (people < 5000) {
  575. sound = "SQLCH!!";
  576. } else {
  577. sound = "Oh the humanity!";
  578. }
  579. var people = get_living_prey(crushed.sum());
  580. var sound2 = "Thump";
  581. if (people < 3) {
  582. sound2 = "Thump!";
  583. } else if (people < 10) {
  584. sound2 = "Squish!";
  585. } else if (people < 50) {
  586. sound2 = "Crunch!";
  587. } else if (people < 500) {
  588. sound2 = "CRUNCH!";
  589. } else if (people < 5000) {
  590. sound2 = "CRRUUUNCH!!";
  591. } else {
  592. sound2 = "Oh the humanity!";
  593. }
  594. var preyMass = prey.sum_property("mass");
  595. var crushedMass = prey.sum_property("mass");
  596. macro.addGrowthPoints(preyMass);
  597. macro.addGrowthPoints(crushedMass);
  598. macro.bowels.feed(prey);
  599. macro.arouse(10);
  600. updateVictims("bowels",prey);
  601. updateVictims("stomped",crushed);
  602. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  603. }
  604. function breast_crush()
  605. {
  606. var area = macro.breastArea;
  607. var prey = getPrey(biome, area);
  608. var line = describe("breast-crush", prey, macro, verbose);
  609. var linesummary = summarize(prey.sum(), true);
  610. var people = get_living_prey(prey.sum());
  611. var sound = "Thump";
  612. if (people < 3) {
  613. sound = "Thump!";
  614. } else if (people < 10) {
  615. sound = "Squish!";
  616. } else if (people < 50) {
  617. sound = "Crunch!";
  618. } else if (people < 500) {
  619. sound = "CRUNCH!";
  620. } else if (people < 5000) {
  621. sound = "CRRUUUNCH!!";
  622. } else {
  623. sound = "Oh the humanity!";
  624. }
  625. var preyMass = prey.sum_property("mass");
  626. macro.addGrowthPoints(preyMass);
  627. macro.arouse(10);
  628. updateVictims("breasts",prey);
  629. update([sound,line,linesummary,newline]);
  630. }
  631. function unbirth()
  632. {
  633. var area = macro.vaginaArea;
  634. var prey = getPrey(biome, area);
  635. var line = describe("unbirth", prey, macro, verbose)
  636. var linesummary = summarize(prey.sum(), false);
  637. var people = get_living_prey(prey.sum());
  638. var sound = "";
  639. if (people < 3) {
  640. sound = "Shlp.";
  641. } else if (people < 10) {
  642. sound = "Squelch.";
  643. } else if (people < 50) {
  644. sound = "Shlurrp.";
  645. } else if (people < 500) {
  646. sound = "SHLRP!";
  647. } else if (people < 5000) {
  648. sound = "SQLCH!!";
  649. } else {
  650. sound = "Oh the humanity!";
  651. }
  652. var preyMass = prey.sum_property("mass");
  653. macro.addGrowthPoints(preyMass);
  654. macro.womb.feed(prey);
  655. macro.arouse(20);
  656. updateVictims("womb",prey);
  657. update([sound,line,linesummary,newline]);
  658. }
  659. function cockslap()
  660. {
  661. var area = macro.dickArea;
  662. var prey = getPrey(biome, area);
  663. var line = describe("cockslap", prey, macro, verbose)
  664. var linesummary = summarize(prey.sum(), true);
  665. var people = get_living_prey(prey.sum());
  666. var sound = "Thump";
  667. if (people < 3) {
  668. sound = "Thump!";
  669. } else if (people < 10) {
  670. sound = "Squish!";
  671. } else if (people < 50) {
  672. sound = "Crunch!";
  673. } else if (people < 500) {
  674. sound = "CRUNCH!";
  675. } else if (people < 5000) {
  676. sound = "CRRUUUNCH!!";
  677. } else {
  678. sound = "Oh the humanity!";
  679. }
  680. var preyMass = prey.sum_property("mass");
  681. macro.addGrowthPoints(preyMass);
  682. macro.arouse(15);
  683. updateVictims("cock",prey);
  684. update([sound,line,linesummary,newline]);
  685. }
  686. function cock_vore()
  687. {
  688. var area = macro.dickGirth;
  689. var prey = getPrey(biome, area);
  690. var line = describe("cock-vore", prey, macro, verbose)
  691. var linesummary = summarize(prey.sum(), false);
  692. var people = get_living_prey(prey.sum());
  693. var sound = "lp";
  694. if (people < 3) {
  695. sound = "Shlp.";
  696. } else if (people < 10) {
  697. sound = "Squelch.";
  698. } else if (people < 50) {
  699. sound = "Shlurrp.";
  700. } else if (people < 500) {
  701. sound = "SHLRP!";
  702. } else if (people < 5000) {
  703. sound = "SQLCH!!";
  704. } else {
  705. sound = "Oh the humanity!";
  706. }
  707. var preyMass = prey.sum_property("mass");
  708. macro.addGrowthPoints(preyMass);
  709. macro.balls.feed(prey);
  710. macro.arouse(20);
  711. updateVictims("balls",prey);
  712. update([sound,line,linesummary,newline]);
  713. }
  714. function ball_smother()
  715. {
  716. var area = macro.ballArea * 2;
  717. var prey = getPrey(biome, area);
  718. var line = describe("ball-smother", prey, macro, verbose)
  719. var linesummary = summarize(prey.sum(), true);
  720. var people = get_living_prey(prey.sum());
  721. var sound = "Thump";
  722. if (people < 3) {
  723. sound = "Thump!";
  724. } else if (people < 10) {
  725. sound = "Squish!";
  726. } else if (people < 50) {
  727. sound = "Smoosh!";
  728. } else if (people < 500) {
  729. sound = "SMOOSH!";
  730. } else if (people < 5000) {
  731. sound = "SMOOOOOSH!!";
  732. } else {
  733. sound = "Oh the humanity!";
  734. }
  735. var preyMass = prey.sum_property("mass");
  736. macro.addGrowthPoints(preyMass);
  737. macro.arouse(10);
  738. updateVictims("balls",prey);
  739. update([sound,line,linesummary,newline]);
  740. }
  741. function male_orgasm(vol)
  742. {
  743. var area = Math.pow(vol, 2/3);
  744. var prey = getPrey(biome, area);
  745. var line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  746. var linesummary = summarize(prey.sum(), true);
  747. var people = get_living_prey(prey.sum());
  748. var sound = "Spurt!";
  749. if (people < 3) {
  750. sound = "Spurt!";
  751. } else if (people < 10) {
  752. sound = "Sploosh!";
  753. } else if (people < 50) {
  754. sound = "Sploooooosh!";
  755. } else if (people < 500) {
  756. sound = "SPLOOSH!";
  757. } else if (people < 5000) {
  758. sound = "SPLOOOOOOOOOOSH!!";
  759. } else {
  760. sound = "Oh the humanity!";
  761. }
  762. var preyMass = prey.sum_property("mass");
  763. macro.addGrowthPoints(preyMass);
  764. updateVictims("splooged",prey);
  765. update([sound,line,linesummary,newline]);
  766. }
  767. function female_orgasm(vol)
  768. {
  769. var area = Math.pow(vol, 2/3);
  770. var prey = getPrey(biome, area);
  771. var line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  772. var linesummary = summarize(prey.sum(), true);
  773. var people = get_living_prey(prey.sum());
  774. var sound = "Spurt!";
  775. if (people < 3) {
  776. sound = "Spurt!";
  777. } else if (people < 10) {
  778. sound = "Sploosh!";
  779. } else if (people < 50) {
  780. sound = "Sploooooosh!";
  781. } else if (people < 500) {
  782. sound = "SPLOOSH!";
  783. } else if (people < 5000) {
  784. sound = "SPLOOOOOOOOOOSH!!";
  785. } else {
  786. sound = "Oh the humanity!";
  787. }
  788. var preyMass = prey.sum_property("mass");
  789. macro.addGrowthPoints(preyMass);
  790. updateVictims("splooged",prey);
  791. update([sound,line,linesummary,newline]);
  792. }
  793. function transformNumbers(line)
  794. {
  795. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  796. }
  797. function update(lines = [])
  798. {
  799. var log = document.getElementById("log");
  800. lines.forEach(function (x) {
  801. var line = document.createElement('div');
  802. line.innerHTML = transformNumbers(x);
  803. log.appendChild(line);
  804. });
  805. if (lines.length > 0)
  806. log.scrollTop = log.scrollHeight;
  807. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  808. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  809. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  810. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  811. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false))
  812. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  813. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  814. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  815. for (var type in victims) {
  816. if (victims.hasOwnProperty(type)) {
  817. for (var key in victims[type]){
  818. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  819. document.getElementById("stat-" + key).style.display = "table-row";
  820. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  821. }
  822. }
  823. }
  824. }
  825. }
  826. function pick_move()
  827. {
  828. if (!strolling) {
  829. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  830. return;
  831. }
  832. var choice = Math.random();
  833. if (choice < 0.2) {
  834. anal_vore();
  835. } else if (choice < 0.6) {
  836. stomp();
  837. } else {
  838. feed();
  839. }
  840. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  841. }
  842. function grow_pick(times) {
  843. if (document.getElementById("part-body").checked == true) {
  844. grow(times);
  845. }
  846. else if (document.getElementById("part-ass").checked == true) {
  847. grow_ass(times);
  848. }
  849. else if (document.getElementById("part-dick").checked == true) {
  850. grow_dick(times);
  851. }
  852. else if (document.getElementById("part-balls").checked == true) {
  853. grow_balls(times);
  854. }
  855. else if (document.getElementById("part-breasts").checked == true) {
  856. grow_breasts(times);
  857. }
  858. else if (document.getElementById("part-vagina").checked == true) {
  859. grow_vagina(times);
  860. }
  861. }
  862. function grow(times=1)
  863. {
  864. if (macro.growthPoints < 100 * times) {
  865. update(["You don't feel like growing right now."]);
  866. return;
  867. }
  868. macro.growthPoints -= 100 * times;
  869. var oldHeight = macro.height;
  870. var oldMass = macro.mass;
  871. macro.scale *= Math.pow(1.02,times);
  872. var newHeight = macro.height;
  873. var newMass = macro.mass;
  874. var heightDelta = newHeight - oldHeight;
  875. var massDelta = newMass - oldMass;
  876. var heightStr = length(heightDelta, unit);
  877. var massStr = mass(massDelta, unit);
  878. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  879. }
  880. function grow_dick(times=1)
  881. {
  882. if (macro.growthPoints < 10 * times) {
  883. update(["You don't feel like growing right now."]);
  884. return;
  885. }
  886. macro.growthPoints -= 10 * times;
  887. var oldLength = macro.dickLength;
  888. var oldMass = macro.dickMass;
  889. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  890. var lengthDelta = macro.dickLength - oldLength;
  891. var massDelta = macro.dickMass - oldMass;
  892. update(["Power surges through you as your cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]);
  893. }
  894. function grow_balls(times=1)
  895. {
  896. if (macro.growthPoints < 10 * times) {
  897. update(["You don't feel like growing right now."]);
  898. return;
  899. }
  900. macro.growthPoints -= 10 * times;
  901. var oldDiameter = macro.ballDiameter;
  902. var oldMass = macro.ballMass;
  903. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  904. var diameterDelta = macro.ballDiameter - oldDiameter;
  905. var massDelta = macro.ballMass - oldMass;
  906. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  907. }
  908. function grow_breasts(times=1)
  909. {
  910. if (macro.growthPoints < 10 * times) {
  911. update(["You don't feel like growing right now."]);
  912. return;
  913. }
  914. macro.growthPoints -= 10 * times;
  915. var oldDiameter = macro.breastDiameter;
  916. var oldMass = macro.breastMass;
  917. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  918. var diameterDelta = macro.breastDiameter - oldDiameter;
  919. var massDelta = macro.breastMass - oldMass;
  920. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  921. }
  922. function grow_vagina(times=1)
  923. {
  924. if (macro.growthPoints < 10 * times) {
  925. update(["You don't feel like growing right now."]);
  926. return;
  927. }
  928. macro.growthPoints -= 10 * times;
  929. var oldLength = macro.vaginaLength;
  930. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  931. var lengthDelta = macro.vaginaLength - oldLength;
  932. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  933. }
  934. function grow_ass(times=1)
  935. {
  936. if (macro.growthPoints < 10 * times) {
  937. update(["You don't feel like growing right now."]);
  938. return;
  939. }
  940. macro.growthPoints -= 10 * times;
  941. var oldDiameter = Math.pow(macro.assArea,1/2);
  942. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  943. var diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  944. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  945. }
  946. function grow_lots()
  947. {
  948. var oldHeight = macro.height;
  949. var oldMass = macro.mass;
  950. macro.scale *= 100;
  951. var newHeight = macro.height;
  952. var newMass = macro.mass;
  953. var heightDelta = newHeight - oldHeight;
  954. var massDelta = newMass - oldMass;
  955. var heightStr = length(heightDelta, unit);
  956. var massStr = mass(massDelta, unit);
  957. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  958. }
  959. function preset(name) {
  960. switch(name){
  961. case "Fen":
  962. macro.species = "crux";
  963. macro.baseHeight = 2.2606;
  964. macro.baseMass = 124.738;
  965. break;
  966. case "Renard":
  967. macro.species = "fox";
  968. macro.baseHeight = 1.549;
  969. macro.baseMass = 83.9;
  970. case "Vulpes":
  971. macro.species = "fox";
  972. macro.baseHeight = 20000;
  973. macro.baseMass = 180591661866272;
  974. }
  975. }
  976. function startGame(e) {
  977. form = document.forms.namedItem("custom-species-form");
  978. for (var i=0; i<form.length; i++) {
  979. if (form[i].value != "") {
  980. if (form[i].type == "text")
  981. macro[form[i].name] = form[i].value;
  982. else if (form[i].type == "number")
  983. macro[form[i].name] = parseFloat(form[i].value);
  984. else if (form[i].type == "checkbox") {
  985. macro[form[i].name] = form[i].checked;
  986. }
  987. }
  988. }
  989. document.getElementById("log-area").style.display = 'inline';
  990. document.getElementById("option-panel").style.display = 'none';
  991. document.getElementById("action-panel").style.display = 'flex';
  992. victimTypes = ["stomped","digested","stomach","bowels"];
  993. if (macro.maleParts) {
  994. victimTypes = victimTypes.concat(["cock","balls"]);
  995. } else {
  996. document.getElementById("button-cockslap").style.display = 'none';
  997. document.getElementById("button-cock_vore").style.display = 'none';
  998. document.getElementById("button-ball_smother").style.display = 'none';
  999. document.getElementById("cum").style.display = 'none';
  1000. document.getElementById("button-grow-dick").style.display = 'none';
  1001. document.getElementById("button-grow-balls").style.display = 'none';
  1002. }
  1003. if (macro.femaleParts) {
  1004. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  1005. } else {
  1006. document.getElementById("button-breast_crush").style.display = 'none';
  1007. document.getElementById("button-unbirth").style.display = 'none';
  1008. document.getElementById("femcum").style.display = 'none';
  1009. document.getElementById("button-grow-vagina").style.display = 'none';
  1010. document.getElementById("button-grow-breasts").style.display = 'none';
  1011. }
  1012. if (macro.maleParts || macro.femaleParts) {
  1013. victimTypes.push("splooged");
  1014. }
  1015. var table = document.getElementById("victim-table");
  1016. var tr = document.createElement('tr');
  1017. var th = document.createElement('th');
  1018. th.innerHTML = "Method";
  1019. tr.appendChild(th);
  1020. for (var i = 0; i < victimTypes.length; i++) {
  1021. var th = document.createElement('th');
  1022. th.classList.add("victim-table-cell");
  1023. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  1024. tr.appendChild(th);
  1025. }
  1026. table.appendChild(tr);
  1027. for (var key in things) {
  1028. if (things.hasOwnProperty(key) && key != "Container") {
  1029. var tr = document.createElement('tr');
  1030. tr.id = "stat-" + key;
  1031. tr.style.display = "none";
  1032. var th = document.createElement('th');
  1033. th.innerHTML = key;
  1034. tr.appendChild(th);
  1035. for (var i = 0; i < victimTypes.length; i++) {
  1036. var th = document.createElement('th');
  1037. th.innerHTML = 0;
  1038. th.id = "stat-" + victimTypes[i] + "-" + key;
  1039. tr.appendChild(th);
  1040. }
  1041. table.appendChild(tr);
  1042. }
  1043. }
  1044. //var species = document.getElementById("option-species").value;
  1045. //var re = /^[a-zA-Z\- ]+$/;
  1046. // tricksy tricksy players
  1047. //if (re.test(species)) {
  1048. // macro.species = species;
  1049. //}
  1050. macro.init();
  1051. update();
  1052. document.getElementById("stat-container").style.display = 'flex';
  1053. }
  1054. window.addEventListener('load', function(event) {
  1055. victims["stomped"] = initVictims();
  1056. victims["digested"] = initVictims();
  1057. victims["stomach"] = initVictims();
  1058. victims["bowels"] = initVictims();
  1059. victims["breasts"] = initVictims();
  1060. victims["womb"] = initVictims();
  1061. victims["cock"] = initVictims();
  1062. victims["balls"] = initVictims();
  1063. victims["smothered"] = initVictims();
  1064. victims["splooged"] = initVictims();
  1065. document.getElementById("button-look").addEventListener("click",look);
  1066. document.getElementById("button-feed").addEventListener("click",feed);
  1067. document.getElementById("button-stomp").addEventListener("click",stomp);
  1068. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  1069. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  1070. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  1071. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  1072. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  1073. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  1074. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  1075. document.getElementById("button-location").addEventListener("click",change_location);
  1076. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  1077. document.getElementById("button-units").addEventListener("click",toggle_units);
  1078. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  1079. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  1080. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  1081. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  1082. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  1083. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  1084. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  1085. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  1086. document.getElementById("button-start").addEventListener("click",startGame);
  1087. setTimeout(pick_move, 2000);
  1088. });