big steppy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

706 рядки
18 KiB

  1. var strolling = false;
  2. var maxStomachDigest = 10;
  3. var maxBowelsDigest = 10;
  4. var unit = "metric";
  5. var verbose = true;
  6. var biome = "suburb";
  7. var newline = " ";
  8. victims = {};
  9. var macro =
  10. {
  11. "scaling": function(value, scale, factor) { return value * Math.pow(scale,factor); },
  12. "species": "crux",
  13. "color" : "blue",
  14. "baseHeight": 2.26,
  15. get height() { return this.scaling(this.baseHeight, this.scale, 1); },
  16. "baseMass": 135,
  17. get mass () { return this.scaling(this.baseMass, this.scale, 3); },
  18. "basePawArea": 0.1,
  19. get pawArea() { return this.scaling(this.basePawArea, this.scale, 2); },
  20. "baseAnalVoreArea": 0.1,
  21. get analVoreArea() { return this.scaling(this.baseAnalVoreArea, this.scale, 2); },
  22. "baseAssArea": 0.4,
  23. get assArea() { return this.scaling(this.baseAssArea, this.scale, 2); },
  24. "baseHandArea": 0.3,
  25. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  26. "baseDickLength": 0.3048,
  27. "baseDickDiameter": 0.08,
  28. "dickDensity": 1000,
  29. "dickScale": 1,
  30. get dickLength() { return this.scaling(this.baseDickLength * this.dickScale, this.scale, 1); },
  31. get dickDiameter() { return this.scaling(this.baseDickDiameter * this.dickScale, this.scale, 1); },
  32. get dickArea() {
  33. return this.dickLength * this.dickDiameter * Math.PI / 2;
  34. },
  35. get dickVolume() {
  36. return this.dickLength * Math.pow(this.dickDiameter/2,2) * Math.PI;
  37. },
  38. get dickMass() {
  39. return this.dickVolume * this.dickDensity;
  40. },
  41. "baseBallDiameter": 0.05,
  42. "ballDensity": 1000,
  43. "ballScale": 1,
  44. get ballDiameter() { return this.scaling(this.baseBallDiameter * this.ballScale, this.scale, 1); },
  45. get ballArea() { return 2 * Math.PI * Math.pow(this.ballDiameter/2, 2) },
  46. get ballVolume() {
  47. var radius = this.ballDiameter / 2;
  48. return 4/3 * Math.PI * Math.pow(radius,3);
  49. },
  50. get ballMass() {
  51. var volume = this.ballVolume;
  52. return volume * this.ballDensity;
  53. },
  54. "baseVaginaLength": 0.1,
  55. "baseVaginaWidth": 0.05,
  56. "vaginaScale": 1,
  57. get vaginaLength() { return this.scaling(this.baseVaginaLength * this.vaginaScale, this.scale, 1); },
  58. get vaginaWidth() { return this.scaling(this.baseVaginaWidth * this.vaginaScale, this.scale, 1); },
  59. get vaginaArea() { return this.vaginaLength * this.vaginaWidth },
  60. "baseBreastDiameter": 0.1,
  61. "breastScale": 1,
  62. "breastDensity": 1000,
  63. get breastDiameter() { return this.scaling(this.baseDickLength * this.breastScale, this.scale, 1); },
  64. get breastArea() {
  65. return 2 * Math.PI * Math.pow(this.breastDiameter/2,2);
  66. },
  67. get breastVolume() {
  68. var radius = this.breastDiameter / 2;
  69. return 4/3 * Math.PI * Math.pow(radius,3);
  70. },
  71. get breastMass() {
  72. var volume = this.breastVolume;
  73. return volume * this.breastDensity;
  74. },
  75. "maleParts": true,
  76. "femaleParts": true,
  77. get description() {
  78. result = [];
  79. line = "You are a " + length(macro.height, unit, true) + " tall " + macro.species + ". You weigh " + mass(macro.mass, unit) + ".";
  80. result.push(line);
  81. if (this.maleParts) {
  82. 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.";
  83. result.push(line);
  84. }
  85. if (this.femaleParts) {
  86. line = "Your glistening " + length(macro.vaginaLength, unit, true) + " long slit is oozing between your legs."
  87. result.push(line);
  88. line = "You have two " + length(macro.breastDiameter, unit, true) + "-wide breasts that weigh " + mass(macro.breastMass, unit) + " apiece.";
  89. result.push(line);
  90. }
  91. return result;
  92. },
  93. "scale": 3,
  94. "scaleWithMass": function(mass) {
  95. var startMass = this.mass;
  96. var newMass = startMass + mass;
  97. this.scale = Math.pow(newMass / this.baseMass, 1/3);
  98. }
  99. }
  100. function look()
  101. {
  102. var desc = macro.description;
  103. var line2 = ""
  104. switch(biome) {
  105. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  106. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  107. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  108. 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.";
  109. }
  110. desc = desc.concat([newline,line2,newline]);
  111. update(desc);
  112. }
  113. function get_living_prey(sum) {
  114. var total = 0;
  115. for (var key in sum) {
  116. if (sum.hasOwnProperty(key)) {
  117. if (key == "Person" || key == "Cow")
  118. total += sum[key];
  119. }
  120. }
  121. return total;
  122. }
  123. function toggle_auto()
  124. {
  125. strolling = !strolling;
  126. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  127. if (strolling)
  128. update(["You start walking.",newline]);
  129. else
  130. update(["You stop walking.",newline]);
  131. }
  132. function change_location()
  133. {
  134. switch(biome) {
  135. case "suburb": biome = "city"; break;
  136. case "city": biome = "downtown"; break;
  137. case "downtown": biome = "rural"; break;
  138. case "rural": biome = "suburb"; break;
  139. }
  140. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  141. }
  142. function toggle_units()
  143. {
  144. switch(unit) {
  145. case "metric": unit = "customary"; break;
  146. case "customary": unit = "approx"; break;
  147. case "approx": unit = "metric"; break;
  148. }
  149. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  150. update();
  151. }
  152. function toggle_verbose()
  153. {
  154. verbose = !verbose;
  155. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  156. }
  157. function initVictims()
  158. {
  159. return {
  160. "Person": 0,
  161. "Cow": 0,
  162. "Car": 0,
  163. "Bus": 0,
  164. "Tram": 0,
  165. "Motorcycle": 0,
  166. "House": 0,
  167. "Barn": 0,
  168. "Small Skyscraper": 0,
  169. "Train": 0,
  170. "Train Car": 0,
  171. "Parking Garage": 0,
  172. "Overpass": 0,
  173. };
  174. };
  175. // lists out total people
  176. function summarize(sum, fatal = true)
  177. {
  178. var count = get_living_prey(sum);
  179. return "<b>(" + count + " " + (fatal ? (count > 1 ? "kills" : "kill") : (count > 1 ? "prey" : "prey")) + ")</b>";
  180. }
  181. var stomach = []
  182. var bowels = []
  183. function getOnePrey(biome,area)
  184. {
  185. var potential = ["Person"];
  186. switch(biome) {
  187. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  188. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  189. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Parking Garage"]; break;
  190. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  191. }
  192. var potAreas = []
  193. potential.forEach(function (x) {
  194. potAreas.push([x,areas[x]]);
  195. });
  196. potAreas = potAreas.sort(function (x,y) {
  197. return y[1] - x[1];
  198. });
  199. for (var i=0; i<potAreas.length; i++) {
  200. x = potAreas[i];
  201. if (x[1] < area) {
  202. return new things[x[0]](1);
  203. }
  204. };
  205. return new Person(1);
  206. }
  207. function getPrey(region, area)
  208. {
  209. var weights = {"Person": 1};
  210. switch(region)
  211. {
  212. case "rural": weights = {
  213. "Person": 0.05,
  214. "House": 0.01,
  215. "Barn": 0.01,
  216. "Cow": 0.2
  217. }; break;
  218. case "suburb": weights = {
  219. "Person": 0.5,
  220. "House": 0.5,
  221. "Car": 0.2,
  222. "Train": 0.1,
  223. "Bus": 0.1
  224. }; break;
  225. case "city": weights = {
  226. "Person": 0.5,
  227. "House": 0.2,
  228. "Car": 0.2,
  229. "Train": 0.1,
  230. "Bus": 0.1,
  231. "Tram": 0.1,
  232. "Parking Garage": 0.02
  233. }; break;
  234. case "downtown": weights = {
  235. "Person": 0.5,
  236. "Car": 0.3,
  237. "Bus": 0.15,
  238. "Tram": 0.1,
  239. "Parking Garage": 0.02,
  240. "Small Skyscraper": 0.4
  241. }; break;
  242. }
  243. return fill_area2(area,weights);
  244. }
  245. function updateVictims(type,prey)
  246. {
  247. var sums = prey.sum();
  248. for (var key in sums) {
  249. if (sums.hasOwnProperty(key)) {
  250. victims[type][key] += sums[key];
  251. }
  252. }
  253. }
  254. function feed()
  255. {
  256. var area = macro.handArea;
  257. var prey = getPrey(biome, area);
  258. var line = prey.eat(verbose)
  259. var linesummary = summarize(prey.sum(), false);
  260. var people = get_living_prey(prey.sum());
  261. var sound = "Ulp";
  262. if (people < 3) {
  263. sound = "Ulp.";
  264. } else if (people < 10) {
  265. sound = "Gulp.";
  266. } else if (people < 50) {
  267. sound = "Glrrp.";
  268. } else if (people < 500) {
  269. sound = "Glrrrpkh!";
  270. } else if (people < 5000) {
  271. sound = "GLRRKPKH!";
  272. } else {
  273. sound = "Oh the humanity!";
  274. }
  275. var preyMass = prey.sum_property("mass");
  276. macro.scaleWithMass(preyMass);
  277. stomach.push(prey);
  278. if (stomach.length == 1)
  279. setTimeout(function() { doDigest("stomach"); }, 15000);
  280. updateVictims("stomach",prey);
  281. update([sound,line,linesummary,newline]);
  282. }
  283. function stomp()
  284. {
  285. var area = macro.pawArea;
  286. var prey = getPrey(biome, area);
  287. var line = prey.stomp(verbose)
  288. var linesummary = summarize(prey.sum(), true);
  289. var people = get_living_prey(prey.sum());
  290. var sound = "Thump";
  291. if (people < 3) {
  292. sound = "Thump!";
  293. } else if (people < 10) {
  294. sound = "Squish!";
  295. } else if (people < 50) {
  296. sound = "Crunch!";
  297. } else if (people < 500) {
  298. sound = "CRUNCH!";
  299. } else if (people < 5000) {
  300. sound = "CRRUUUNCH!!";
  301. } else {
  302. sound = "Oh the humanity!";
  303. }
  304. var preyMass = prey.sum_property("mass");
  305. macro.scaleWithMass(preyMass);
  306. updateVictims("stomped",prey);
  307. update([sound,line,linesummary,newline]);
  308. }
  309. function anal_vore()
  310. {
  311. var area = macro.analVoreArea;
  312. var prey = getOnePrey(biome,area);
  313. area = macro.assArea;
  314. var crushed = getPrey(biome,area);
  315. var line1 = prey.anal_vore(verbose, macro.height);
  316. var line1summary = summarize(prey.sum(), false);
  317. var line2 = crushed.buttcrush(verbose);
  318. var line2summary = summarize(crushed.sum(), true);
  319. var people = get_living_prey(prey.sum());
  320. var sound = "Shlp";
  321. if (people < 3) {
  322. sound = "Shlp.";
  323. } else if (people < 10) {
  324. sound = "Squelch.";
  325. } else if (people < 50) {
  326. sound = "Shlurrp.";
  327. } else if (people < 500) {
  328. sound = "SHLRP!";
  329. } else if (people < 5000) {
  330. sound = "SQLCH!!";
  331. } else {
  332. sound = "Oh the humanity!";
  333. }
  334. var people = get_living_prey(crushed.sum());
  335. var sound2 = "Thump";
  336. if (people < 3) {
  337. sound2 = "Thump!";
  338. } else if (people < 10) {
  339. sound2 = "Squish!";
  340. } else if (people < 50) {
  341. sound2 = "Crunch!";
  342. } else if (people < 500) {
  343. sound2 = "CRUNCH!";
  344. } else if (people < 5000) {
  345. sound2 = "CRRUUUNCH!!";
  346. } else {
  347. sound2 = "Oh the humanity!";
  348. }
  349. var preyMass = prey.sum_property("mass");
  350. var crushedMass = prey.sum_property("mass");
  351. macro.scaleWithMass(preyMass);
  352. macro.scaleWithMass(crushedMass);
  353. bowels.push(prey);
  354. if (bowels.length == 1)
  355. setTimeout(function() { doDigest("bowels"); }, 15000);
  356. updateVictims("bowels",prey);
  357. updateVictims("stomped",crushed);
  358. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  359. }
  360. function breast_crush()
  361. {
  362. var area = macro.breastArea;
  363. var prey = getPrey(biome, area);
  364. var line = prey.breast_crush(verbose);
  365. var linesummary = summarize(prey.sum(), true);
  366. var people = get_living_prey(prey.sum());
  367. var sound = "Thump";
  368. if (people < 3) {
  369. sound = "Thump!";
  370. } else if (people < 10) {
  371. sound = "Squish!";
  372. } else if (people < 50) {
  373. sound = "Crunch!";
  374. } else if (people < 500) {
  375. sound = "CRUNCH!";
  376. } else if (people < 5000) {
  377. sound = "CRRUUUNCH!!";
  378. } else {
  379. sound = "Oh the humanity!";
  380. }
  381. var preyMass = prey.sum_property("mass");
  382. macro.scaleWithMass(preyMass);
  383. updateVictims("breasts",prey);
  384. update([sound,line,linesummary,newline]);
  385. }
  386. function unbirth()
  387. {
  388. var area = macro.vaginaArea;
  389. var prey = getPrey(biome, area);
  390. var line = prey.unbirth(verbose)
  391. var linesummary = summarize(prey.sum(), true);
  392. var people = get_living_prey(prey.sum());
  393. var sound = "";
  394. if (people < 3) {
  395. sound = "Shlp.";
  396. } else if (people < 10) {
  397. sound = "Squelch.";
  398. } else if (people < 50) {
  399. sound = "Shlurrp.";
  400. } else if (people < 500) {
  401. sound = "SHLRP!";
  402. } else if (people < 5000) {
  403. sound = "SQLCH!!";
  404. } else {
  405. sound = "Oh the humanity!";
  406. }
  407. var preyMass = prey.sum_property("mass");
  408. macro.scaleWithMass(preyMass);
  409. updateVictims("womb",prey);
  410. update([sound,line,linesummary,newline]);
  411. }
  412. function cockslap()
  413. {
  414. var area = macro.dickArea;
  415. var prey = getPrey(biome, area);
  416. var line = prey.cockslap(verbose)
  417. var linesummary = summarize(prey.sum(), true);
  418. var people = get_living_prey(prey.sum());
  419. var sound = "Thump";
  420. if (people < 3) {
  421. sound = "Thump!";
  422. } else if (people < 10) {
  423. sound = "Squish!";
  424. } else if (people < 50) {
  425. sound = "Crunch!";
  426. } else if (people < 500) {
  427. sound = "CRUNCH!";
  428. } else if (people < 5000) {
  429. sound = "CRRUUUNCH!!";
  430. } else {
  431. sound = "Oh the humanity!";
  432. }
  433. var preyMass = prey.sum_property("mass");
  434. macro.scaleWithMass(preyMass);
  435. updateVictims("cock",prey);
  436. update([sound,line,linesummary,newline]);
  437. }
  438. function ball_smother()
  439. {
  440. var area = macro.ballArea * 2;
  441. var prey = getPrey(biome, area);
  442. var line = prey.ball_smother(verbose)
  443. var linesummary = summarize(prey.sum(), true);
  444. var people = get_living_prey(prey.sum());
  445. var sound = "Thump";
  446. if (people < 3) {
  447. sound = "Thump!";
  448. } else if (people < 10) {
  449. sound = "Squish!";
  450. } else if (people < 50) {
  451. sound = "Smoosh!";
  452. } else if (people < 500) {
  453. sound = "SMOOSH!";
  454. } else if (people < 5000) {
  455. sound = "SMOOOOOSH!!";
  456. } else {
  457. sound = "Oh the humanity!";
  458. }
  459. var preyMass = prey.sum_property("mass");
  460. macro.scaleWithMass(preyMass);
  461. updateVictims("balls",prey);
  462. update([sound,line,linesummary,newline]);
  463. }
  464. function update(lines = [])
  465. {
  466. var log = document.getElementById("log");
  467. lines.forEach(function (x) {
  468. var line = document.createElement('div');
  469. line.innerHTML = x;
  470. log.appendChild(line);
  471. });
  472. log.scrollTop = log.scrollHeight;
  473. document.getElementById("height").innerHTML = "Height: " + length(macro.height, unit);
  474. document.getElementById("mass").innerHTML = "Mass: " + mass(macro.mass, unit);
  475. for (var type in victims) {
  476. if (victims.hasOwnProperty(type)) {
  477. for (var key in victims[type]){
  478. if (victims[type].hasOwnProperty(key)) {
  479. if (document.getElementById("stats-" + type + "-" + key) == null) {
  480. if (victims[type][key] == 0)
  481. continue;
  482. child = document.createElement('div');
  483. child.id = "stats-" + type + "-" + key;
  484. child.classList.add("stat-line");
  485. document.getElementById("stats-" + type).appendChild(child);
  486. }
  487. document.getElementById("stats-" + type + "-" + key).innerHTML = key + ": " + victims[type][key];
  488. }
  489. }
  490. }
  491. }
  492. }
  493. function pick_move()
  494. {
  495. if (!strolling) {
  496. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  497. return;
  498. }
  499. var choice = Math.random();
  500. if (choice < 0.2) {
  501. anal_vore();
  502. } else if (choice < 0.6) {
  503. stomp();
  504. } else {
  505. feed();
  506. }
  507. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  508. }
  509. function grow()
  510. {
  511. var oldHeight = macro.height;
  512. var oldMass = macro.mass;
  513. macro.scale *= 1.2;
  514. var newHeight = macro.height;
  515. var newMass = macro.mass;
  516. var heightDelta = newHeight - oldHeight;
  517. var massDelta = newMass - oldMass;
  518. var heightStr = length(heightDelta, unit);
  519. var massStr = mass(massDelta, unit);
  520. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  521. }
  522. // pop the list and digest that object
  523. function doDigest(containerName)
  524. {
  525. var digestType = containerName == "stomach" ? stomach : bowels;
  526. var count = 0
  527. if (containerName == "stomach") {
  528. count = stomach.length;
  529. count = Math.min(count,maxStomachDigest);
  530. } else if (containerName == "bowels") {
  531. count = bowels.length;
  532. count = Math.min(count,maxBowelsDigest);
  533. }
  534. var container = new Container();
  535. while (count > 0) {
  536. --count;
  537. var toDigest = digestType.shift();
  538. if (toDigest.name != "Container")
  539. toDigest = new Container([toDigest]);
  540. container = container.merge(toDigest);
  541. }
  542. var digested = container.sum();
  543. for (var key in victims[containerName]) {
  544. if (victims[containerName].hasOwnProperty(key) && digested.hasOwnProperty(key) ) {
  545. victims["digested"][key] += digested[key];
  546. victims[containerName][key] -= digested[key];
  547. }
  548. }
  549. if (containerName == "stomach")
  550. update(["Your stomach gurgles as it digests " + container.describe(false),summarize(container.sum()),newline]);
  551. else if (containerName == "bowels")
  552. update(["Your bowels churn as they absorb " + container.describe(false),summarize(container.sum()),newline]);
  553. if (digestType.length > 0) {
  554. setTimeout(function() {
  555. doDigest(containerName);
  556. }, 15000);
  557. }
  558. }
  559. window.addEventListener('load', function(event) {
  560. victims["stomped"] = initVictims();
  561. victims["digested"] = initVictims();
  562. victims["stomach"] = initVictims();
  563. victims["bowels"] = initVictims();
  564. victims["breasts"] = initVictims();
  565. victims["womb"] = initVictims();
  566. victims["cock"] = initVictims();
  567. victims["balls"] = initVictims();
  568. document.getElementById("button-look").addEventListener("click",look);
  569. document.getElementById("button-grow").addEventListener("click",grow);
  570. document.getElementById("button-feed").addEventListener("click",feed);
  571. document.getElementById("button-stomp").addEventListener("click",stomp);
  572. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  573. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  574. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  575. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  576. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  577. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  578. document.getElementById("button-location").addEventListener("click",change_location);
  579. document.getElementById("button-units").addEventListener("click",toggle_units);
  580. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  581. setTimeout(pick_move, 2000);
  582. update();
  583. });