big steppy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

1896 satır
51 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. "name": "",
  14. "species": "crux",
  15. "color" : "blue",
  16. "baseHeight": 2.26,
  17. get height() { return this.scaling(this.baseHeight, this.scale, 1); },
  18. "baseMass": 135,
  19. get mass () { return this.scaling(this.baseMass, this.scale, 3); },
  20. "basePawArea": 0.1,
  21. get pawArea() { return this.scaling(this.basePawArea, this.scale, 2); },
  22. "baseAnalVoreArea": 0.1,
  23. get analVoreArea() { return this.scaling(this.baseAnalVoreArea, this.scale, 2); },
  24. "baseAssArea": 0.4,
  25. get assArea() { return this.scaling(this.baseAssArea * this.assScale, this.scale, 2); },
  26. "baseHandArea": 0.1,
  27. get handArea() { return this.scaling(this.baseHandArea, this.scale, 2); },
  28. "assScale": 1,
  29. "hasTail": true,
  30. "tailType": "slinky",
  31. "tailCount": 1,
  32. "baseTailLength": 1,
  33. "baseTailDiameter": 0.1,
  34. "tailDensity": 250,
  35. "tailScale": 1,
  36. "tailMaw": false,
  37. get tailLength() {
  38. return this.scaling(this.baseTailLength * this.tailScale, this.scale, 1);
  39. },
  40. get tailDiameter() {
  41. return this.scaling(this.baseTailDiameter * this.tailScale, this.scale, 1);
  42. },
  43. get tailGirth() {
  44. return Math.pow(this.tailDiameter/2,2) * Math.PI;
  45. },
  46. get tailArea() {
  47. return this.tailLength * this.tailDiameter;
  48. },
  49. get tailVolume() {
  50. return this.tailGirth * this.tailLength;
  51. },
  52. get tailMass() {
  53. return this.tailVolume * this.tailDensity;
  54. },
  55. "dickType": "canine",
  56. "baseDickLength": 0.3,
  57. "baseDickDiameter": 0.08,
  58. "dickDensity": 1000,
  59. "dickScale": 1,
  60. get dickLength() {
  61. factor = 1;
  62. if (!this.arousalEnabled || this.arousal < 25) {
  63. factor = 0.5;
  64. } else if (this.arousal < 75) {
  65. factor = 0.5 + (this.arousal - 25) / 100;
  66. }
  67. return this.scaling(this.baseDickLength * this.dickScale * factor, this.scale, 1);
  68. },
  69. get dickDiameter() {
  70. factor = 1;
  71. if (!this.arousalEnabled || this.arousal < 25) {
  72. factor = 0.5;
  73. } else if (this.arousal < 75) {
  74. factor = 0.5 + (this.arousal - 25) / 100;
  75. }
  76. return this.scaling(this.baseDickDiameter * this.dickScale * factor, this.scale, 1);
  77. },
  78. get dickGirth() {
  79. return Math.pow((this.dickDiameter/ 2),2) * Math.PI;
  80. },
  81. get dickArea() {
  82. return this.dickLength* this.dickDiameter* Math.PI / 2;
  83. },
  84. get dickVolume() {
  85. return this.dickLength* Math.pow(this.dickDiameter2,2) * Math.PI;
  86. },
  87. get dickMass() {
  88. return this.dickVolume* this.dickDensity;
  89. },
  90. "baseBallDiameter": 0.05,
  91. "ballDensity": 1000,
  92. "ballScale": 1,
  93. get ballDiameter() { return this.scaling(this.baseBallDiameter * this.ballScale, this.scale, 1); },
  94. get ballArea() { return 2 * Math.PI * Math.pow(this.ballDiameter/2, 2) },
  95. get ballVolume() {
  96. var radius = this.ballDiameter / 2;
  97. return 4/3 * Math.PI * Math.pow(radius,3);
  98. },
  99. get ballMass() {
  100. var volume = this.ballVolume;
  101. return volume * this.ballDensity;
  102. },
  103. "baseCumRatio": 1,
  104. "cumScale": 1,
  105. get cumVolume() {
  106. return this.dickGirth * this.baseCumRatio * this.cumScale * (1 + this.edge) + Math.max(0,this.cumStorage.amount - this.cumStorage.limit);
  107. },
  108. "baseVaginaLength": 0.1,
  109. "baseVaginaWidth": 0.05,
  110. "vaginaScale": 1,
  111. get vaginaLength() { return this.scaling(this.baseVaginaLength * this.vaginaScale, this.scale, 1); },
  112. get vaginaWidth() { return this.scaling(this.baseVaginaWidth * this.vaginaScale, this.scale, 1); },
  113. get vaginaArea() { return this.vaginaLength * this.vaginaWidth },
  114. get vaginaVolume() { return this.vaginaArea * this.vaginaWidth },
  115. "baseFemcumRatio": 1,
  116. "femcumScale": 1,
  117. get femcumVolume() {
  118. return this.vaginaArea * this.baseFemcumRatio * this.femcumScale * (1 + this.edge) + Math.max(0,this.femcumStorage.amount - this.femcumStorage.limit);
  119. },
  120. hasBreasts: true,
  121. lactationEnabled: true,
  122. lactationScale: 1,
  123. lactationFactor: 0.25,
  124. get lactationVolume() {
  125. return this.milkStorage.limit * this.lactationFactor;
  126. },
  127. "baseBreastDiameter": 0.1,
  128. "breastScale": 1,
  129. "breastDensity": 1000,
  130. get breastDiameter() { return this.scaling(this.baseBreastDiameter * this.breastScale, this.scale, 1); },
  131. get breastArea() {
  132. return 2 * Math.PI * Math.pow(this.breastDiameter/2,2);
  133. },
  134. get breastVolume() {
  135. var radius = this.breastDiameter / 2;
  136. return 4/3 * Math.PI * Math.pow(radius,3);
  137. },
  138. get breastMass() {
  139. var volume = this.breastVolume;
  140. return volume * this.breastDensity;
  141. },
  142. "digest": function(owner,organ) {
  143. var count = Math.min(organ.contents.length, organ.maxDigest);
  144. var container = new Container();
  145. while (count > 0) {
  146. var victim = organ.contents.shift();
  147. if (victim.name != "Container")
  148. victim = new Container([victim]);
  149. container = container.merge(victim);
  150. --count;
  151. }
  152. var digested = container.sum();
  153. for (var key in victims[organ.name]) {
  154. if (victims[organ.name].hasOwnProperty(key) && digested.hasOwnProperty(key) ) {
  155. victims["digested"][key] += digested[key];
  156. victims[organ.name][key] -= digested[key];
  157. }
  158. }
  159. var line = organ.describeDigestion(container);
  160. organ.fill(this,container);
  161. var summary = summarize(container.sum());
  162. if (organ.contents.length > 0) {
  163. setTimeout(function() { owner.digest(owner,organ) }, 15000);
  164. }
  165. update([line,summary,newline]);
  166. },
  167. "stomach": {
  168. "name": "stomach",
  169. "feed": function(prey) {
  170. this.feedFunc(prey,this,this.owner);
  171. },
  172. "feedFunc": function(prey,self,owner) {
  173. if (self.contents.length == 0)
  174. setTimeout(function() { owner.digest(owner,self) }, 15000);
  175. this.contents.push(prey);
  176. },
  177. "describeDigestion": function(container) {
  178. return describe("stomach",container,this.owner,verbose);
  179. },
  180. "fill": function(owner,container) {
  181. //no-op
  182. },
  183. "contents": [],
  184. "maxDigest": 5
  185. },
  186. "bowels": {
  187. "name" : "bowels",
  188. "feed": function(prey) {
  189. this.feedFunc(prey,this,this.owner);
  190. },
  191. "feedFunc": function(prey,self,owner) {
  192. if (self.contents.length == 0)
  193. setTimeout(function() { owner.digest(owner,self) }, 15000);
  194. this.contents.push(prey);
  195. },
  196. "describeDigestion" : function(container) {
  197. return describe("bowels",container,this.owner,verbose);
  198. },
  199. "fill": function(owner,container) {
  200. //no-op
  201. },
  202. "contents" : [],
  203. "maxDigest" : 3
  204. },
  205. "womb": {
  206. "name" : "womb",
  207. "feed": function(prey) {
  208. this.feedFunc(prey,this,this.owner);
  209. },
  210. "feedFunc": function(prey,self,owner) {
  211. if (self.contents.length == 0)
  212. setTimeout(function() { owner.digest(owner,self) }, 15000);
  213. this.contents.push(prey);
  214. },
  215. "describeDigestion" : function(container) {
  216. return describe("womb",container,this.owner,verbose);
  217. },
  218. "fill": function(owner,container) {
  219. owner.femcumStorage.amount += container.sum_property("mass") / 1e3;
  220. },
  221. "contents" : [],
  222. "maxDigest" : 1
  223. },
  224. "balls": {
  225. "name" : "balls",
  226. "feed": function(prey) {
  227. this.feedFunc(prey,this,this.owner);
  228. },
  229. "feedFunc": function(prey,self,owner) {
  230. if (self.contents.length == 0)
  231. setTimeout(function() { owner.digest(owner,self) }, 15000);
  232. this.contents.push(prey);
  233. },
  234. "describeDigestion": function(container) {
  235. return describe("balls",container,this.owner,verbose);
  236. },
  237. "fill": function(owner,container) {
  238. owner.cumStorage.amount += container.sum_property("mass") / 1e3;
  239. },
  240. "contents" : [],
  241. "maxDigest" : 1
  242. },
  243. "init": function() {
  244. this.stomach.owner = this;
  245. this.bowels.owner = this;
  246. this.womb.owner = this;
  247. this.balls.owner = this;
  248. this.cumStorage.owner = this;
  249. this.femcumStorage.owner = this;
  250. this.milkStorage.owner = this;
  251. if (this.maleParts)
  252. this.fillCum(this);
  253. if (this.femaleParts)
  254. this.fillFemcum(this);
  255. if (this.hasBreasts)
  256. this.fillBreasts(this);
  257. if (this.maleParts || this.femaleParts) {
  258. this.quenchExcess(this);
  259. }
  260. },
  261. "maleParts": true,
  262. "femaleParts": true,
  263. "fillCum": function(self) {
  264. self.cumStorage.amount += self.cumScale * self.ballVolume / 1200;
  265. if (self.cumStorage.amount > self.cumStorage.limit)
  266. self.arouse(1 * (self.cumStorage.amount / self.cumStorage.limit - 1));
  267. setTimeout(function () { self.fillCum(self) }, 100);
  268. update();
  269. },
  270. "fillFemcum": function(self) {
  271. self.femcumStorage.amount += self.femcumScale * self.vaginaVolume / 1200;
  272. if (self.femcumStorage.amount > self.femcumStorage.limit)
  273. self.arouse(1 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
  274. setTimeout(function () { self.fillFemcum(self) }, 100);
  275. update();
  276. },
  277. "fillBreasts": function(self) {
  278. self.milkStorage.amount += self.lactationScale * self.milkStorage.limit / 1200;
  279. if (self.milkStorage.amount > self.milkStorage.limit)
  280. self.milkStorage.amount = self.milkStorage.limit;
  281. setTimeout(function () { self.fillBreasts(self) }, 100);
  282. update();
  283. },
  284. "cumStorage": {
  285. "amount": 0,
  286. get limit() {
  287. return this.owner.ballVolume;
  288. }
  289. },
  290. "femcumStorage": {
  291. "amount": 0,
  292. get limit() {
  293. return this.owner.vaginaVolume;
  294. }
  295. },
  296. "milkStorage": {
  297. "amount": 0,
  298. get limit() {
  299. return this.owner.breastVolume * 2;
  300. }
  301. },
  302. "orgasm": false,
  303. "afterglow": false,
  304. "arousalEnabled": true,
  305. "arousalFactor": 1,
  306. "arousal": 0,
  307. "edge": 0,
  308. "maleSpurt": 0,
  309. "femaleSpurt": 0,
  310. "arouse": function(amount) {
  311. if (!this.arousalEnabled)
  312. return;
  313. if (this.afterglow)
  314. return;
  315. this.arousal += amount * this.arousalFactor;
  316. if (this.arousal >= 200) {
  317. this.arousal = 200;
  318. if (!this.orgasm) {
  319. this.orgasm = true;
  320. if (this.maleParts) {
  321. this.maleOrgasm(this);
  322. }
  323. if (this.femaleParts) {
  324. this.femaleOrgasm(this);
  325. }
  326. }
  327. }
  328. },
  329. "quench": function(amount) {
  330. if (!this.arousalEnabled)
  331. return;
  332. this.arousal -= amount;
  333. if (this.arousal <= 100) {
  334. if (this.orgasm) {
  335. this.orgasm = false;
  336. this.afterglow = true;
  337. }
  338. }
  339. if (this.arousal < 0) {
  340. this.arousal = 0;
  341. this.afterglow = false;
  342. }
  343. update();
  344. },
  345. "quenchExcess": function(self) {
  346. if (self.arousalEnabled) {
  347. if (self.arousal > 100 && !self.orgasm) {
  348. self.arousal = Math.max(100,self.arousal-1);
  349. self.edge += Math.sqrt((self.arousal - 100)) / 500;
  350. self.edge = Math.min(1,self.edge);
  351. self.edge = Math.max(0,self.edge - 0.002);
  352. if (self.maleParts)
  353. self.maleSpurt += ((self.arousal-100)/100 + Math.random()) / 25 * (self.edge);
  354. if (self.femaleParts)
  355. self.femaleSpurt += ((self.arousal-100)/100 + Math.random()) / 25 * (self.edge);
  356. if (self.maleSpurt > 1) {
  357. male_spurt(macro.cumVolume * (0.1 + Math.random() / 10));
  358. self.maleSpurt = 0;
  359. }
  360. if (self.femaleSpurt > 1) {
  361. female_spurt(macro.femcumVolume * (0.1 + Math.random() / 10));
  362. self.femaleSpurt = 0;
  363. }
  364. update();
  365. } else if (self.afterglow) {
  366. self.quench(0.5);
  367. self.edge = Math.max(0,self.edge - 0.01);
  368. }
  369. }
  370. setTimeout(function() { self.quenchExcess(self); }, 200);
  371. },
  372. "maleOrgasm": function(self) {
  373. if (!this.arousalEnabled)
  374. return;
  375. if (self.orgasm) {
  376. self.quench(10);
  377. var amount = Math.min(this.cumVolume, this.cumStorage.amount);
  378. this.cumStorage.amount -= amount;
  379. male_orgasm(amount);
  380. setTimeout(function() { self.maleOrgasm(self) }, 2000);
  381. }
  382. },
  383. "femaleOrgasm": function(self) {
  384. if (!this.arousalEnabled)
  385. return;
  386. if (this.orgasm) {
  387. this.quench(10);
  388. var amount = Math.min(this.femcumVolume, this.femcumStorage.amount);
  389. this.femcumStorage.amount -= amount;
  390. female_orgasm(amount);
  391. setTimeout(function() { self.femaleOrgasm(self) }, 2000);
  392. }
  393. },
  394. get description() {
  395. result = [];
  396. line = "You are " + (macro.name == "" ? "" : macro.name + ", ") + "a " + length(macro.height, unit, true) + " tall " + macro.species + ". You weigh " + mass(macro.mass, unit) + ".";
  397. result.push(line);
  398. if (this.hasTail) {
  399. line = "Your " + macro.describeTail + (macro.tailCount > 1 ? " tails sway as you walk," : "sways as you walk.");
  400. if (this.tailMaw) {
  401. line += (macro.tailCount > 1 ? "Their maws are drooling" : "Its maw is drooling");
  402. }
  403. result.push(line);
  404. }
  405. if (this.arousalEnabled) {
  406. if (this.afterglow) {
  407. result.push("You're basking in the afterglow of a powerful orgasm.");
  408. }
  409. else if (this.orgasm) {
  410. result.push("You're cumming!");
  411. } else if (this.arousal < 25) {
  412. } else if (this.arousal < 75) {
  413. result.push("You're feeling a little aroused.");
  414. } else if (this.arousal < 150) {
  415. result.push("You're feeling aroused.");
  416. } else if (this.arousal < 200) {
  417. result.push("You're on the edge of an orgasm!");
  418. }
  419. }
  420. if (this.maleParts) {
  421. line = "Your " + this.describeDick + " cock hangs from your hips, with two " + mass(macro.ballMass, unit, true) + ", " + length(macro.ballDiameter, unit, true) + "-wide balls hanging beneath.";
  422. result.push(line);
  423. }
  424. if (this.femaleParts) {
  425. line = "Your glistening " + this.describeVagina + " slit peeks out from between your legs."
  426. result.push(line);
  427. }
  428. if (this.hasBreasts) {
  429. line = "You have two " + length(macro.breastDiameter, unit, true) + "-wide breasts that weigh " + mass(macro.breastMass, unit) + " apiece.";
  430. result.push(line);
  431. }
  432. return result;
  433. },
  434. get describeTail() {
  435. return (this.tailCount > 1 ? this.tailCount + " " : "") + length(this.tailLength, unit, true) + "-long " + this.tailType;
  436. },
  437. get describeDick() {
  438. state = "";
  439. if (!this.arousalEnabled) {
  440. state = "limp";
  441. } else if (this.orgasm) {
  442. state = "spurting";
  443. } else {
  444. if (this.arousal < 25) {
  445. state = "limp";
  446. } else if (this.arousal < 75) {
  447. state = "swelling";
  448. } else if (this.arousal < 100) {
  449. state = "erect";
  450. } else if (this.arousal < 150) {
  451. state = "erect, throbbing";
  452. } else if (this.arousal < 200) {
  453. state = "erect, throbbing, pre-soaked";
  454. }
  455. }
  456. return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType;
  457. },
  458. get describeVagina() {
  459. state = "";
  460. if (!this.arousalEnabled) {
  461. state = "unassuming";
  462. } else if (this.orgasm) {
  463. state = "gushing, quivering";
  464. } else {
  465. if (this.arousal < 25) {
  466. state = "unassuming";
  467. } else if (this.arousal < 75) {
  468. state = "moist";
  469. } else if (this.arousal < 100) {
  470. state = "glistening";
  471. } else if (this.arousal < 150) {
  472. state = "dripping";
  473. } else if (this.arousal < 200) {
  474. state = "dripping, quivering";
  475. }
  476. }
  477. return length(this.vaginaLength, unit, true) + " long " + state
  478. },
  479. "growthPoints": 0,
  480. "addGrowthPoints": function(mass) {
  481. this.growthPoints += Math.round(50 * mass / (this.scale*this.scale));
  482. },
  483. // 0 = entirely non-fatal
  484. // 1 = fatal, but not specific
  485. // 2 = gory
  486. "brutality": 1,
  487. "scale": 1,
  488. }
  489. function look()
  490. {
  491. var desc = macro.description;
  492. var line2 = ""
  493. if (macro.height > 1e12)
  494. line2 = "You're pretty much everywhere at once.";
  495. else if (macro.height > 1e6)
  496. line2 = "You're standing...on pretty much everything at once.";
  497. else
  498. switch(biome) {
  499. case "rural": line2 = "You're standing amongst rural farmhouses and expansive ranches. Cattle are milling about at your feet."; break;
  500. case "suburb": line2 = "You're striding through the winding roads of a suburb."; break;
  501. case "city": line2 = "You're terrorizing the streets of a city. Heavy traffic, worsened by your rampage, is everywhere."; break;
  502. 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.";
  503. }
  504. desc = desc.concat([newline,line2,newline]);
  505. update(desc);
  506. }
  507. function get_living_prey(sum) {
  508. var total = 0;
  509. for (var key in sum) {
  510. if (sum.hasOwnProperty(key)) {
  511. if (key == "Person" || key == "Cow")
  512. total += sum[key];
  513. }
  514. }
  515. return total;
  516. }
  517. function toggle_auto()
  518. {
  519. strolling = !strolling;
  520. document.getElementById("button-stroll").innerHTML = "Status: " + (strolling ? "Strolling" : "Standing");
  521. if (strolling)
  522. update(["You start walking.",newline]);
  523. else
  524. update(["You stop walking.",newline]);
  525. }
  526. function change_location()
  527. {
  528. switch(biome) {
  529. case "suburb": biome = "city"; break;
  530. case "city": biome = "downtown"; break;
  531. case "downtown": biome = "rural"; break;
  532. case "rural": biome = "suburb"; break;
  533. }
  534. document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
  535. }
  536. function toggle_units()
  537. {
  538. switch(unit) {
  539. case "metric": unit = "customary"; break;
  540. case "customary": unit = "approx"; break;
  541. case "approx": unit = "metric"; break;
  542. }
  543. document.getElementById("button-units").innerHTML = "Units: " + unit.charAt(0).toUpperCase() + unit.slice(1);
  544. update();
  545. }
  546. function toggle_numbers() {
  547. switch(numbers) {
  548. case "full": numbers="prefix"; break;
  549. case "prefix": numbers="words"; break;
  550. case "words": numbers = "scientific"; break;
  551. case "scientific": numbers = "full"; break;
  552. }
  553. document.getElementById("button-numbers").innerHTML = "Numbers: " + numbers.charAt(0).toUpperCase() + numbers.slice(1);
  554. update();
  555. }
  556. function toggle_verbose()
  557. {
  558. verbose = !verbose;
  559. document.getElementById("button-verbose").innerHTML = "Descriptions: " + (verbose ? "Verbose" : "Simple");
  560. }
  561. function toggle_arousal()
  562. {
  563. macro.arousalEnabled = !macro.arousalEnabled;
  564. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  565. if (macro.arousalEnabled) {
  566. document.getElementById("arousal").style.display = "block";
  567. document.getElementById("edge").style.display = "block";
  568. } else {
  569. document.getElementById("arousal").style.display = "none";
  570. document.getElementById("edge").style.display = "none";
  571. }
  572. macro.orgasm = false;
  573. macro.afterglow = false;
  574. }
  575. function initVictims()
  576. {
  577. return {
  578. "Person": 0,
  579. "Cow": 0,
  580. "Car": 0,
  581. "Bus": 0,
  582. "Tram": 0,
  583. "Motorcycle": 0,
  584. "House": 0,
  585. "Barn": 0,
  586. "Small Skyscraper": 0,
  587. "Large Skyscraper": 0,
  588. "Train": 0,
  589. "Train Car": 0,
  590. "Parking Garage": 0,
  591. "Overpass": 0,
  592. "Town": 0,
  593. "City": 0,
  594. "Continent": 0,
  595. "Planet": 0,
  596. "Star": 0,
  597. "Solar System": 0,
  598. "Galaxy": 0
  599. };
  600. };
  601. // lists out total people
  602. function summarize(sum, fatal = true)
  603. {
  604. var word;
  605. var count = get_living_prey(sum);
  606. if (fatal && macro.brutality > 0)
  607. word = count > 1 ? "kills" : "kill";
  608. else if (!fatal && macro.brutality > 0)
  609. word = "prey";
  610. else
  611. word = count > 1 ? "victims" : "victim";
  612. return "<b>(" + count + " " + word + ")</b>";
  613. }
  614. function getOnePrey(biome,area)
  615. {
  616. var potential = ["Person"];
  617. if (macro.height > 1e12)
  618. potential = ["Planet","Star","Solar System","Galaxy"];
  619. else if (macro.height > 1e6)
  620. potential = ["Town","City","Continent","Planet"];
  621. else
  622. switch(biome) {
  623. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  624. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  625. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Large Skyscraper", "Parking Garage"]; break;
  626. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  627. }
  628. var potAreas = []
  629. potential.forEach(function (x) {
  630. potAreas.push([x,areas[x]]);
  631. });
  632. potAreas = potAreas.sort(function (x,y) {
  633. return y[1] - x[1];
  634. });
  635. for (var i=0; i<potAreas.length; i++) {
  636. x = potAreas[i];
  637. if (x[1] < area) {
  638. return new Container([new things[x[0]](1)]);
  639. }
  640. };
  641. return new Container([new Person(1)]);
  642. }
  643. function getPrey(region, area)
  644. {
  645. var weights = {"Person": 1};
  646. if (macro.height > 1e12) {
  647. weights = {
  648. "Planet": 1.47e-10,
  649. "Star": 1.7713746e-12,
  650. "Solar System": 4e-10,
  651. "Galaxy": 0.1,
  652. }
  653. }
  654. else if (macro.height > 1e6) {
  655. weights = {
  656. "Town": 0.1,
  657. "City": 0.05,
  658. "Continent": 0.005,
  659. "Planet": 0.0001
  660. }
  661. }
  662. else {
  663. switch(region)
  664. {
  665. case "rural": weights = {
  666. "Person": 0.05,
  667. "House": 0.01,
  668. "Barn": 0.01,
  669. "Cow": 0.2
  670. }; break;
  671. case "suburb": weights = {
  672. "Person": 0.5,
  673. "House": 0.5,
  674. "Car": 0.2,
  675. "Train": 0.1,
  676. "Bus": 0.1
  677. }; break;
  678. case "city": weights = {
  679. "Person": 0.5,
  680. "House": 0.2,
  681. "Car": 0.2,
  682. "Train": 0.1,
  683. "Bus": 0.1,
  684. "Tram": 0.1,
  685. "Parking Garage": 0.02
  686. }; break;
  687. case "downtown": weights = {
  688. "Person": 0.5,
  689. "Car": 0.3,
  690. "Bus": 0.15,
  691. "Tram": 0.1,
  692. "Parking Garage": 0.02,
  693. "Small Skyscraper": 0.4,
  694. "Large Skyscraper": 0.1
  695. }; break;
  696. }
  697. }
  698. return fill_area(area,weights);
  699. }
  700. function updateVictims(type,prey)
  701. {
  702. var sums = prey.sum();
  703. for (var key in sums) {
  704. if (sums.hasOwnProperty(key)) {
  705. victims[type][key] += sums[key];
  706. }
  707. }
  708. }
  709. function feed()
  710. {
  711. var area = macro.handArea;
  712. var prey = getPrey(biome, area);
  713. var line = describe("eat", prey, macro, verbose)
  714. var linesummary = summarize(prey.sum(), false);
  715. var people = get_living_prey(prey.sum());
  716. var sound = "";
  717. if (people == 0) {
  718. sound = "";
  719. } else if (people < 3) {
  720. sound = "Ulp.";
  721. } else if (people < 10) {
  722. sound = "Gulp.";
  723. } else if (people < 50) {
  724. sound = "Glrrp.";
  725. } else if (people < 500) {
  726. sound = "Glrrrpkh!";
  727. } else if (people < 5000) {
  728. sound = "GLRRKPKH!";
  729. } else {
  730. sound = "Oh the humanity!";
  731. }
  732. var preyMass = prey.sum_property("mass");
  733. macro.addGrowthPoints(preyMass);
  734. macro.stomach.feed(prey);
  735. macro.arouse(5);
  736. updateVictims("stomach",prey);
  737. update([sound,line,linesummary,newline]);
  738. }
  739. function stomp()
  740. {
  741. var area = macro.pawArea;
  742. var prey = getPrey(biome, area);
  743. var line = describe("stomp", prey, macro, verbose)
  744. var linesummary = summarize(prey.sum(), true);
  745. var people = get_living_prey(prey.sum());
  746. var sound = "Thump";
  747. if (people < 3) {
  748. sound = "Thump!";
  749. } else if (people < 10) {
  750. sound = "Squish!";
  751. } else if (people < 50) {
  752. sound = "Crunch!";
  753. } else if (people < 500) {
  754. sound = "CRUNCH!";
  755. } else if (people < 5000) {
  756. sound = "CRRUUUNCH!!";
  757. } else {
  758. sound = "Oh the humanity!";
  759. }
  760. var preyMass = prey.sum_property("mass");
  761. macro.addGrowthPoints(preyMass);
  762. macro.arouse(5);
  763. updateVictims("stomped",prey);
  764. update([sound,line,linesummary,newline]);
  765. }
  766. function grind()
  767. {
  768. var area = macro.assArea / 2;
  769. if (macro.maleParts)
  770. area += macro.dickArea
  771. if (macro.femalePartS)
  772. area += macro.vaginaArea;
  773. var prey = getPrey(biome,area);
  774. var line = describe("grind", prey, macro, verbose);
  775. var linesummary = summarize(prey.sum(), true);
  776. var people = get_living_prey(prey.sum());
  777. var sound = "";
  778. if (people < 3) {
  779. sound = "Thump.";
  780. } else if (people < 10) {
  781. sound = "Crunch.";
  782. } else if (people < 50) {
  783. sound = "Crrrrunch.";
  784. } else if (people < 500) {
  785. sound = "SMASH!";
  786. } else if (people < 5000) {
  787. sound = "CCCRASH!!";
  788. } else {
  789. sound = "Oh the humanity!";
  790. }
  791. var preyMass = prey.sum_property("mass");
  792. macro.addGrowthPoints(preyMass);
  793. macro.arouse(20);
  794. updateVictims("ground",prey);
  795. update([sound,line,linesummary,newline]);
  796. }
  797. function anal_vore()
  798. {
  799. var area = macro.analVoreArea;
  800. var prey = getOnePrey(biome,area);
  801. area = macro.assArea;
  802. var crushed = getPrey(biome,area);
  803. var line1 = describe("anal-vore", prey, macro, verbose);
  804. var line1summary = summarize(prey.sum(), false);
  805. var line2 = describe("ass-crush", crushed, macro, verbose);
  806. var line2summary = summarize(crushed.sum(), true);
  807. var people = get_living_prey(prey.sum());
  808. var sound = "Shlp";
  809. if (people < 3) {
  810. sound = "Shlp.";
  811. } else if (people < 10) {
  812. sound = "Squelch.";
  813. } else if (people < 50) {
  814. sound = "Shlurrp.";
  815. } else if (people < 500) {
  816. sound = "SHLRP!";
  817. } else if (people < 5000) {
  818. sound = "SQLCH!!";
  819. } else {
  820. sound = "Oh the humanity!";
  821. }
  822. var people = get_living_prey(crushed.sum());
  823. var sound2 = "Thump";
  824. if (people < 3) {
  825. sound2 = "Thump!";
  826. } else if (people < 10) {
  827. sound2 = "Squish!";
  828. } else if (people < 50) {
  829. sound2 = "Crunch!";
  830. } else if (people < 500) {
  831. sound2 = "CRUNCH!";
  832. } else if (people < 5000) {
  833. sound2 = "CRRUUUNCH!!";
  834. } else {
  835. sound2 = "Oh the humanity!";
  836. }
  837. var preyMass = prey.sum_property("mass");
  838. var crushedMass = prey.sum_property("mass");
  839. macro.addGrowthPoints(preyMass);
  840. macro.addGrowthPoints(crushedMass);
  841. macro.bowels.feed(prey);
  842. macro.arouse(10);
  843. updateVictims("bowels",prey);
  844. updateVictims("stomped",crushed);
  845. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  846. }
  847. function breast_crush()
  848. {
  849. var area = macro.breastArea;
  850. var prey = getPrey(biome, area);
  851. var line = describe("breast-crush", prey, macro, verbose);
  852. var linesummary = summarize(prey.sum(), true);
  853. var people = get_living_prey(prey.sum());
  854. var sound = "Thump";
  855. if (people < 3) {
  856. sound = "Thump!";
  857. } else if (people < 10) {
  858. sound = "Squish!";
  859. } else if (people < 50) {
  860. sound = "Crunch!";
  861. } else if (people < 500) {
  862. sound = "CRUNCH!";
  863. } else if (people < 5000) {
  864. sound = "CRRUUUNCH!!";
  865. } else {
  866. sound = "Oh the humanity!";
  867. }
  868. var preyMass = prey.sum_property("mass");
  869. macro.addGrowthPoints(preyMass);
  870. macro.arouse(10);
  871. updateVictims("breasts",prey);
  872. update([sound,line,linesummary,newline]);
  873. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  874. var amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  875. milk_breasts(null, amount);
  876. }
  877. }
  878. function milk_breasts(e,vol)
  879. {
  880. if (vol == undefined) {
  881. var vol = Math.min(macro.lactationVolume, macro.milkStorage.amount);
  882. }
  883. macro.milkStorage.amount -= vol;
  884. var area = Math.pow(vol, 2/3);
  885. var prey = getPrey(biome, area);
  886. var line = describe("breast-milk", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  887. var linesummary = summarize(prey.sum(), true);
  888. var people = get_living_prey(prey.sum());
  889. var sound = "Dribble.";
  890. if (people < 3) {
  891. sound = "Dribble.";
  892. } else if (people < 10) {
  893. sound = "Splash.";
  894. } else if (people < 50) {
  895. sound = "Splash!";
  896. } else if (people < 500) {
  897. sound = "SPLOOSH!";
  898. } else if (people < 5000) {
  899. sound = "SPLOOOOOOOOOOSH!!";
  900. } else {
  901. sound = "Oh the humanity!";
  902. }
  903. var preyMass = prey.sum_property("mass");
  904. macro.addGrowthPoints(preyMass);
  905. updateVictims("flooded",prey);
  906. update([sound,line,linesummary,newline]);
  907. }
  908. function unbirth()
  909. {
  910. var area = macro.vaginaArea;
  911. var prey = getPrey(biome, area);
  912. var line = describe("unbirth", prey, macro, verbose)
  913. var linesummary = summarize(prey.sum(), false);
  914. var people = get_living_prey(prey.sum());
  915. var sound = "";
  916. if (people < 3) {
  917. sound = "Shlp.";
  918. } else if (people < 10) {
  919. sound = "Squelch.";
  920. } else if (people < 50) {
  921. sound = "Shlurrp.";
  922. } else if (people < 500) {
  923. sound = "SHLRP!";
  924. } else if (people < 5000) {
  925. sound = "SQLCH!!";
  926. } else {
  927. sound = "Oh the humanity!";
  928. }
  929. var preyMass = prey.sum_property("mass");
  930. macro.addGrowthPoints(preyMass);
  931. macro.womb.feed(prey);
  932. macro.arouse(20);
  933. updateVictims("womb",prey);
  934. update([sound,line,linesummary,newline]);
  935. }
  936. function cockslap()
  937. {
  938. var area = macro.dickArea;
  939. var prey = getPrey(biome, area);
  940. var line = describe("cockslap", prey, macro, verbose)
  941. var linesummary = summarize(prey.sum(), true);
  942. var people = get_living_prey(prey.sum());
  943. var sound = "Thump";
  944. if (people < 3) {
  945. sound = "Thump!";
  946. } else if (people < 10) {
  947. sound = "Squish!";
  948. } else if (people < 50) {
  949. sound = "Crunch!";
  950. } else if (people < 500) {
  951. sound = "CRUNCH!";
  952. } else if (people < 5000) {
  953. sound = "CRRUUUNCH!!";
  954. } else {
  955. sound = "Oh the humanity!";
  956. }
  957. var preyMass = prey.sum_property("mass");
  958. macro.addGrowthPoints(preyMass);
  959. macro.arouse(15);
  960. updateVictims("cock",prey);
  961. update([sound,line,linesummary,newline]);
  962. }
  963. function cock_vore()
  964. {
  965. var area = macro.dickGirth;
  966. var prey = getPrey(biome, area);
  967. var line = describe("cock-vore", prey, macro, verbose)
  968. var linesummary = summarize(prey.sum(), false);
  969. var people = get_living_prey(prey.sum());
  970. var sound = "lp";
  971. if (people < 3) {
  972. sound = "Shlp.";
  973. } else if (people < 10) {
  974. sound = "Squelch.";
  975. } else if (people < 50) {
  976. sound = "Shlurrp.";
  977. } else if (people < 500) {
  978. sound = "SHLRP!";
  979. } else if (people < 5000) {
  980. sound = "SQLCH!!";
  981. } else {
  982. sound = "Oh the humanity!";
  983. }
  984. var preyMass = prey.sum_property("mass");
  985. macro.addGrowthPoints(preyMass);
  986. macro.balls.feed(prey);
  987. macro.arouse(20);
  988. updateVictims("balls",prey);
  989. update([sound,line,linesummary,newline]);
  990. }
  991. function ball_smother()
  992. {
  993. var area = macro.ballArea * 2;
  994. var prey = getPrey(biome, area);
  995. var line = describe("ball-smother", prey, macro, verbose)
  996. var linesummary = summarize(prey.sum(), true);
  997. var people = get_living_prey(prey.sum());
  998. var sound = "Thump";
  999. if (people < 3) {
  1000. sound = "Thump!";
  1001. } else if (people < 10) {
  1002. sound = "Squish!";
  1003. } else if (people < 50) {
  1004. sound = "Smoosh!";
  1005. } else if (people < 500) {
  1006. sound = "SMOOSH!";
  1007. } else if (people < 5000) {
  1008. sound = "SMOOOOOSH!!";
  1009. } else {
  1010. sound = "Oh the humanity!";
  1011. }
  1012. var preyMass = prey.sum_property("mass");
  1013. macro.addGrowthPoints(preyMass);
  1014. macro.arouse(10);
  1015. updateVictims("balls",prey);
  1016. update([sound,line,linesummary,newline]);
  1017. }
  1018. function male_spurt(vol)
  1019. {
  1020. var area = Math.pow(vol, 2/3);
  1021. var prey = getPrey(biome, area);
  1022. var line = describe("male-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1023. var linesummary = summarize(prey.sum(), true);
  1024. var people = get_living_prey(prey.sum());
  1025. var sound = "Spurt!";
  1026. if (people < 3) {
  1027. sound = "Spurt!";
  1028. } else if (people < 10) {
  1029. sound = "Sploosh!";
  1030. } else if (people < 50) {
  1031. sound = "Sploooooosh!";
  1032. } else if (people < 500) {
  1033. sound = "SPLOOSH!";
  1034. } else if (people < 5000) {
  1035. sound = "SPLOOOOOOOOOOSH!!";
  1036. } else {
  1037. sound = "Oh the humanity!";
  1038. }
  1039. var preyMass = prey.sum_property("mass");
  1040. macro.addGrowthPoints(preyMass);
  1041. updateVictims("splooged",prey);
  1042. update([sound,line,linesummary,newline]);
  1043. }
  1044. function male_orgasm(vol)
  1045. {
  1046. var area = Math.pow(vol, 2/3);
  1047. var prey = getPrey(biome, area);
  1048. var line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1049. var linesummary = summarize(prey.sum(), true);
  1050. var people = get_living_prey(prey.sum());
  1051. var sound = "Spurt!";
  1052. if (people < 3) {
  1053. sound = "Spurt!";
  1054. } else if (people < 10) {
  1055. sound = "Sploosh!";
  1056. } else if (people < 50) {
  1057. sound = "Sploooooosh!";
  1058. } else if (people < 500) {
  1059. sound = "SPLOOSH!";
  1060. } else if (people < 5000) {
  1061. sound = "SPLOOOOOOOOOOSH!!";
  1062. } else {
  1063. sound = "Oh the humanity!";
  1064. }
  1065. var preyMass = prey.sum_property("mass");
  1066. macro.addGrowthPoints(preyMass);
  1067. updateVictims("splooged",prey);
  1068. update([sound,line,linesummary,newline]);
  1069. }
  1070. function female_spurt(vol)
  1071. {
  1072. var area = Math.pow(vol, 2/3);
  1073. var prey = getPrey(biome, area);
  1074. var line = describe("female-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1075. var linesummary = summarize(prey.sum(), true);
  1076. var people = get_living_prey(prey.sum());
  1077. var sound = "Spurt!";
  1078. if (people < 3) {
  1079. sound = "Spurt!";
  1080. } else if (people < 10) {
  1081. sound = "Sploosh!";
  1082. } else if (people < 50) {
  1083. sound = "Sploooooosh!";
  1084. } else if (people < 500) {
  1085. sound = "SPLOOSH!";
  1086. } else if (people < 5000) {
  1087. sound = "SPLOOOOOOOOOOSH!!";
  1088. } else {
  1089. sound = "Oh the humanity!";
  1090. }
  1091. var preyMass = prey.sum_property("mass");
  1092. macro.addGrowthPoints(preyMass);
  1093. updateVictims("splooged",prey);
  1094. update([sound,line,linesummary,newline]);
  1095. }
  1096. function female_orgasm(vol)
  1097. {
  1098. var area = Math.pow(vol, 2/3);
  1099. var prey = getPrey(biome, area);
  1100. var line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1101. var linesummary = summarize(prey.sum(), true);
  1102. var people = get_living_prey(prey.sum());
  1103. var sound = "Spurt!";
  1104. if (people < 3) {
  1105. sound = "Spurt!";
  1106. } else if (people < 10) {
  1107. sound = "Sploosh!";
  1108. } else if (people < 50) {
  1109. sound = "Sploooooosh!";
  1110. } else if (people < 500) {
  1111. sound = "SPLOOSH!";
  1112. } else if (people < 5000) {
  1113. sound = "SPLOOOOOOOOOOSH!!";
  1114. } else {
  1115. sound = "Oh the humanity!";
  1116. }
  1117. var preyMass = prey.sum_property("mass");
  1118. macro.addGrowthPoints(preyMass);
  1119. updateVictims("splooged",prey);
  1120. update([sound,line,linesummary,newline]);
  1121. }
  1122. function tail_slap()
  1123. {
  1124. var area = macro.tailArea * macro.tailCount;
  1125. var prey = getPrey(biome, area);
  1126. var line = describe("tail-slap", prey, macro, verbose)
  1127. var linesummary = summarize(prey.sum(), true);
  1128. var people = get_living_prey(prey.sum());
  1129. var sound = "Thump";
  1130. if (people < 3) {
  1131. sound = "Thump!";
  1132. } else if (people < 10) {
  1133. sound = "Squish!";
  1134. } else if (people < 50) {
  1135. sound = "Crunch!";
  1136. } else if (people < 500) {
  1137. sound = "CRUNCH!";
  1138. } else if (people < 5000) {
  1139. sound = "CRRUUUNCH!!";
  1140. } else {
  1141. sound = "Oh the humanity!";
  1142. }
  1143. var preyMass = prey.sum_property("mass");
  1144. macro.addGrowthPoints(preyMass);
  1145. macro.arouse(5);
  1146. updateVictims("tailslapped",prey);
  1147. update([sound,line,linesummary,newline]);
  1148. }
  1149. function tail_vore()
  1150. {
  1151. var area = macro.tailGirth * macro.tailCount;
  1152. var prey = getPrey(biome, area);
  1153. var line = describe("tail-vore", prey, macro, verbose)
  1154. var linesummary = summarize(prey.sum(), false);
  1155. var people = get_living_prey(prey.sum());
  1156. var sound = "";
  1157. if (people == 0) {
  1158. sound = "";
  1159. } else if (people < 3) {
  1160. sound = "Ulp.";
  1161. } else if (people < 10) {
  1162. sound = "Gulp.";
  1163. } else if (people < 50) {
  1164. sound = "Glrrp.";
  1165. } else if (people < 500) {
  1166. sound = "Glrrrpkh!";
  1167. } else if (people < 5000) {
  1168. sound = "GLRRKPKH!";
  1169. } else {
  1170. sound = "Oh the humanity!";
  1171. }
  1172. var preyMass = prey.sum_property("mass");
  1173. macro.addGrowthPoints(preyMass);
  1174. macro.arouse(5);
  1175. macro.stomach.feed(prey);
  1176. updateVictims("tailmaw'd",prey);
  1177. update([sound,line,linesummary,newline]);
  1178. }
  1179. function transformNumbers(line)
  1180. {
  1181. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  1182. }
  1183. function update(lines = [])
  1184. {
  1185. var log = document.getElementById("log");
  1186. lines.forEach(function (x) {
  1187. var line = document.createElement('div');
  1188. line.innerHTML = transformNumbers(x);
  1189. log.appendChild(line);
  1190. });
  1191. if (lines.length > 0)
  1192. log.scrollTop = log.scrollHeight;
  1193. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  1194. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  1195. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  1196. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  1197. document.getElementById("edge").innerHTML = "Edge: " + round(macro.edge * 100,0) + "%";
  1198. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false))
  1199. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  1200. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  1201. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  1202. document.getElementById("milk").innerHTML = "Milk: " + transformNumbers(volume(macro.milkStorage.amount,unit,false));
  1203. document.getElementById("milkPercent").innerHTML = Math.round(macro.milkStorage.amount / macro.milkStorage.limit * 100) + "%";
  1204. for (var type in victims) {
  1205. if (victims.hasOwnProperty(type)) {
  1206. for (var key in victims[type]){
  1207. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  1208. document.getElementById("stat-" + key).style.display = "table-row";
  1209. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  1210. }
  1211. }
  1212. }
  1213. }
  1214. }
  1215. function pick_move()
  1216. {
  1217. if (!strolling) {
  1218. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1219. return;
  1220. }
  1221. var choice = Math.random();
  1222. if (choice < 0.2) {
  1223. anal_vore();
  1224. } else if (choice < 0.6) {
  1225. stomp();
  1226. } else {
  1227. feed();
  1228. }
  1229. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1230. }
  1231. function grow_pick(times) {
  1232. if (document.getElementById("part-body").checked == true) {
  1233. grow(times);
  1234. }
  1235. else if (document.getElementById("part-ass").checked == true) {
  1236. grow_ass(times);
  1237. }
  1238. else if (document.getElementById("part-dick").checked == true) {
  1239. grow_dick(times);
  1240. }
  1241. else if (document.getElementById("part-balls").checked == true) {
  1242. grow_balls(times);
  1243. }
  1244. else if (document.getElementById("part-breasts").checked == true) {
  1245. grow_breasts(times);
  1246. }
  1247. else if (document.getElementById("part-vagina").checked == true) {
  1248. grow_vagina(times);
  1249. }
  1250. }
  1251. function grow(times=1)
  1252. {
  1253. if (macro.growthPoints < 100 * times) {
  1254. update(["You don't feel like growing right now."]);
  1255. return;
  1256. }
  1257. macro.growthPoints -= 100 * times;
  1258. var oldHeight = macro.height;
  1259. var oldMass = macro.mass;
  1260. macro.scale *= Math.pow(1.02,times);
  1261. var newHeight = macro.height;
  1262. var newMass = macro.mass;
  1263. var heightDelta = newHeight - oldHeight;
  1264. var massDelta = newMass - oldMass;
  1265. var heightStr = length(heightDelta, unit);
  1266. var massStr = mass(massDelta, unit);
  1267. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1268. }
  1269. function grow_dick(times=1)
  1270. {
  1271. if (macro.growthPoints < 10 * times) {
  1272. update(["You don't feel like growing right now."]);
  1273. return;
  1274. }
  1275. macro.growthPoints -= 10 * times;
  1276. var oldLength = macro.dickLength;
  1277. var oldMass = macro.dickMass;
  1278. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  1279. var lengthDelta = macro.dickLength - oldLength;
  1280. var massDelta = macro.dickMass - oldMass;
  1281. update(["Power surges through you as your " + macro.dickType + " cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]);
  1282. }
  1283. function grow_balls(times=1)
  1284. {
  1285. if (macro.growthPoints < 10 * times) {
  1286. update(["You don't feel like growing right now."]);
  1287. return;
  1288. }
  1289. macro.growthPoints -= 10 * times;
  1290. var oldDiameter = macro.ballDiameter;
  1291. var oldMass = macro.ballMass;
  1292. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  1293. var diameterDelta = macro.ballDiameter - oldDiameter;
  1294. var massDelta = macro.ballMass - oldMass;
  1295. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1296. }
  1297. function grow_breasts(times=1)
  1298. {
  1299. if (macro.growthPoints < 10 * times) {
  1300. update(["You don't feel like growing right now."]);
  1301. return;
  1302. }
  1303. macro.growthPoints -= 10 * times;
  1304. var oldDiameter = macro.breastDiameter;
  1305. var oldMass = macro.breastMass;
  1306. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  1307. var diameterDelta = macro.breastDiameter - oldDiameter;
  1308. var massDelta = macro.breastMass - oldMass;
  1309. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1310. }
  1311. function grow_vagina(times=1)
  1312. {
  1313. if (macro.growthPoints < 10 * times) {
  1314. update(["You don't feel like growing right now."]);
  1315. return;
  1316. }
  1317. macro.growthPoints -= 10 * times;
  1318. var oldLength = macro.vaginaLength;
  1319. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  1320. var lengthDelta = macro.vaginaLength - oldLength;
  1321. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  1322. }
  1323. function grow_ass(times=1)
  1324. {
  1325. if (macro.growthPoints < 10 * times) {
  1326. update(["You don't feel like growing right now."]);
  1327. return;
  1328. }
  1329. macro.growthPoints -= 10 * times;
  1330. var oldDiameter = Math.pow(macro.assArea,1/2);
  1331. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  1332. var diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  1333. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  1334. }
  1335. function grow_lots()
  1336. {
  1337. var oldHeight = macro.height;
  1338. var oldMass = macro.mass;
  1339. macro.scale *= 100;
  1340. var newHeight = macro.height;
  1341. var newMass = macro.mass;
  1342. var heightDelta = newHeight - oldHeight;
  1343. var massDelta = newMass - oldMass;
  1344. var heightStr = length(heightDelta, unit);
  1345. var massStr = mass(massDelta, unit);
  1346. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1347. }
  1348. function preset(name) {
  1349. switch(name){
  1350. case "Fen":
  1351. macro.species = "crux";
  1352. macro.baseHeight = 2.2606;
  1353. macro.baseMass = 124.738;
  1354. break;
  1355. case "Renard":
  1356. macro.species = "fox";
  1357. macro.baseHeight = 1.549;
  1358. macro.baseMass = 83.9;
  1359. case "Vulpes":
  1360. macro.species = "fox";
  1361. macro.baseHeight = 20000;
  1362. macro.baseMass = 180591661866272;
  1363. }
  1364. }
  1365. function saveSettings() {
  1366. storage = window.localStorage;
  1367. settings = {};
  1368. form = document.forms.namedItem("custom-species-form");
  1369. for (var i=0; i<form.length; i++) {
  1370. if (form[i].value != "") {
  1371. if (form[i].type == "text")
  1372. settings[form[i].name] = form[i].value;
  1373. else if (form[i].type == "number")
  1374. settings[form[i].name] = parseFloat(form[i].value);
  1375. else if (form[i].type == "checkbox") {
  1376. settings[form[i].name] = form[i].checked;
  1377. } else if (form[i].type == "radio") {
  1378. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1379. if (form[i].checked)
  1380. settings[name] = form[i].id
  1381. }
  1382. }
  1383. }
  1384. storage.setItem('settings',JSON.stringify(settings));
  1385. }
  1386. function loadSettings() {
  1387. if (window.localStorage.getItem('settings') == null)
  1388. return;
  1389. storage = window.localStorage;
  1390. settings = JSON.parse(storage.getItem('settings'));
  1391. form = document.forms.namedItem("custom-species-form");
  1392. for (var i=0; i<form.length; i++) {
  1393. if (settings[form[i].name] != undefined) {
  1394. if (form[i].type == "text")
  1395. form[i].value = settings[form[i].name];
  1396. else if (form[i].type == "number")
  1397. form[i].value = settings[form[i].name];
  1398. else if (form[i].type == "checkbox") {
  1399. form[i].checked = settings[form[i].name];
  1400. } else if (form[i].type == "radio") {
  1401. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1402. form[i].checked = (settings[name] == form[i].id);
  1403. }
  1404. }
  1405. }
  1406. }
  1407. function startGame(e) {
  1408. form = document.forms.namedItem("custom-species-form");
  1409. for (var i=0; i<form.length; i++) {
  1410. if (form[i].value != "") {
  1411. if (form[i].type == "text")
  1412. macro[form[i].name] = form[i].value;
  1413. else if (form[i].type == "number")
  1414. macro[form[i].name] = parseFloat(form[i].value);
  1415. else if (form[i].type == "checkbox") {
  1416. macro[form[i].name] = form[i].checked;
  1417. } else if (form[i].type == "radio") {
  1418. if (form[i].checked) {
  1419. switch(form[i].id) {
  1420. case "brutality-0": macro.brutality = 0; break;
  1421. case "brutality-1": macro.brutality = 1; break;
  1422. case "brutality-2": macro.brutality = 2; break;
  1423. }
  1424. }
  1425. }
  1426. }
  1427. }
  1428. if (!macro.hasTail) {
  1429. macro.tailCount = 0;
  1430. }
  1431. document.getElementById("log-area").style.display = 'inline';
  1432. document.getElementById("option-panel").style.display = 'none';
  1433. document.getElementById("action-panel").style.display = 'flex';
  1434. victimTypes = ["stomped","digested","stomach","bowels","ground"];
  1435. if (macro.tailCount > 0) {
  1436. victimTypes = victimTypes.concat(["tailslapped"]);
  1437. if (macro.tailMaw) {
  1438. victimTypes = victimTypes.concat(["tailmaw'd"]);
  1439. } else {
  1440. document.getElementById("button-tail_vore").style.display = 'none';
  1441. }
  1442. } else {
  1443. document.getElementById("button-tail_slap").style.display = 'none';
  1444. document.getElementById("button-tail_vore").style.display = 'none';
  1445. }
  1446. if (macro.maleParts) {
  1447. victimTypes = victimTypes.concat(["cock","balls"]);
  1448. } else {
  1449. document.getElementById("button-cockslap").style.display = 'none';
  1450. document.getElementById("button-cock_vore").style.display = 'none';
  1451. document.getElementById("button-ball_smother").style.display = 'none';
  1452. document.getElementById("cum").style.display = 'none';
  1453. document.querySelector("#part-balls+label").style.display = 'none';
  1454. document.querySelector("#part-dick+label").style.display = 'none';
  1455. }
  1456. if (macro.femaleParts) {
  1457. victimTypes = victimTypes.concat(["womb"]);
  1458. } else {
  1459. document.getElementById("button-unbirth").style.display = 'none';
  1460. document.getElementById("femcum").style.display = 'none';
  1461. document.querySelector("#part-vagina+label").style.display = 'none';
  1462. }
  1463. if (macro.hasBreasts) {
  1464. victimTypes = victimTypes.concat(["breasts"]);
  1465. if (macro.lactationEnabled) {
  1466. victimTypes = victimTypes.concat(["flooded"]);
  1467. } else {
  1468. document.getElementById("button-breast_milk").style.display = 'none';
  1469. }
  1470. } else {
  1471. document.getElementById("button-breast_milk").style.display = 'none';
  1472. document.getElementById("button-breast_crush").style.display = 'none';
  1473. document.querySelector("#part-breasts+label").style.display = 'none';
  1474. }
  1475. if (macro.maleParts || macro.femaleParts) {
  1476. victimTypes.push("splooged");
  1477. }
  1478. var table = document.getElementById("victim-table");
  1479. var tr = document.createElement('tr');
  1480. var th = document.createElement('th');
  1481. th.innerHTML = "Method";
  1482. tr.appendChild(th);
  1483. for (var i = 0; i < victimTypes.length; i++) {
  1484. var th = document.createElement('th');
  1485. th.classList.add("victim-table-cell");
  1486. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  1487. tr.appendChild(th);
  1488. }
  1489. table.appendChild(tr);
  1490. for (var key in things) {
  1491. if (things.hasOwnProperty(key) && key != "Container") {
  1492. var tr = document.createElement('tr');
  1493. tr.id = "stat-" + key;
  1494. tr.style.display = "none";
  1495. var th = document.createElement('th');
  1496. th.innerHTML = key;
  1497. tr.appendChild(th);
  1498. for (var i = 0; i < victimTypes.length; i++) {
  1499. var th = document.createElement('th');
  1500. th.innerHTML = 0;
  1501. th.id = "stat-" + victimTypes[i] + "-" + key;
  1502. tr.appendChild(th);
  1503. }
  1504. table.appendChild(tr);
  1505. }
  1506. }
  1507. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  1508. if (!macro.arousalEnabled) {
  1509. document.getElementById("arousal").style.display = "none";
  1510. document.getElementById("edge").style.display = "none";
  1511. }
  1512. //var species = document.getElementById("option-species").value;
  1513. //var re = /^[a-zA-Z\- ]+$/;
  1514. // tricksy tricksy players
  1515. //if (re.test(species)) {
  1516. // macro.species = species;
  1517. //}
  1518. macro.init();
  1519. update();
  1520. document.getElementById("stat-container").style.display = 'flex';
  1521. }
  1522. window.addEventListener('load', function(event) {
  1523. victims["stomped"] = initVictims();
  1524. victims["tailslapped"] = initVictims();
  1525. victims["tailmaw'd"] = initVictims();
  1526. victims["bowels"] = initVictims();
  1527. victims["digested"] = initVictims();
  1528. victims["stomach"] = initVictims();
  1529. victims["breasts"] = initVictims();
  1530. victims["flooded"] = initVictims();
  1531. victims["womb"] = initVictims();
  1532. victims["cock"] = initVictims();
  1533. victims["balls"] = initVictims();
  1534. victims["smothered"] = initVictims();
  1535. victims["splooged"] = initVictims();
  1536. victims["ground"] = initVictims();
  1537. document.getElementById("button-look").addEventListener("click",look);
  1538. document.getElementById("button-feed").addEventListener("click",feed);
  1539. document.getElementById("button-stomp").addEventListener("click",stomp);
  1540. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  1541. document.getElementById("button-tail_slap").addEventListener("click",tail_slap);
  1542. document.getElementById("button-tail_vore").addEventListener("click",tail_vore);
  1543. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  1544. document.getElementById("button-breast_milk").addEventListener("click",milk_breasts);
  1545. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  1546. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  1547. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  1548. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  1549. document.getElementById("button-grind").addEventListener("click",grind);
  1550. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  1551. document.getElementById("button-location").addEventListener("click",change_location);
  1552. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  1553. document.getElementById("button-units").addEventListener("click",toggle_units);
  1554. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  1555. document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
  1556. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  1557. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  1558. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  1559. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  1560. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  1561. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  1562. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  1563. document.getElementById("button-load-custom").addEventListener("click",loadSettings);
  1564. document.getElementById("button-save-custom").addEventListener("click",saveSettings);
  1565. document.getElementById("button-start").addEventListener("click",startGame);
  1566. setTimeout(pick_move, 2000);
  1567. });