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

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