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

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