big steppy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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