big steppy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

1804 líneas
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 / 120;
  255. if (self.cumStorage.amount > self.cumStorage.limit)
  256. self.arouse(10 * (self.cumStorage.amount / self.cumStorage.limit - 1));
  257. setTimeout(function () { self.fillCum(self) }, 1000);
  258. update();
  259. },
  260. "fillFemcum": function(self) {
  261. self.femcumStorage.amount += self.femcumScale * self.vaginaVolume / 120;
  262. if (self.femcumStorage.amount > self.femcumStorage.limit)
  263. self.arouse(10 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
  264. setTimeout(function () { self.fillFemcum(self) }, 1000);
  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. }
  548. function initVictims()
  549. {
  550. return {
  551. "Person": 0,
  552. "Cow": 0,
  553. "Car": 0,
  554. "Bus": 0,
  555. "Tram": 0,
  556. "Motorcycle": 0,
  557. "House": 0,
  558. "Barn": 0,
  559. "Small Skyscraper": 0,
  560. "Large Skyscraper": 0,
  561. "Train": 0,
  562. "Train Car": 0,
  563. "Parking Garage": 0,
  564. "Overpass": 0,
  565. "Town": 0,
  566. "City": 0,
  567. "Continent": 0,
  568. "Planet": 0,
  569. "Star": 0,
  570. "Solar System": 0,
  571. "Galaxy": 0
  572. };
  573. };
  574. // lists out total people
  575. function summarize(sum, fatal = true)
  576. {
  577. var word;
  578. var count = get_living_prey(sum);
  579. if (fatal && macro.brutality > 0)
  580. word = count > 1 ? "kills" : "kill";
  581. else if (!fatal && macro.brutality > 0)
  582. word = "prey";
  583. else
  584. word = count > 1 ? "victims" : "victim";
  585. return "<b>(" + count + " " + word + ")</b>";
  586. }
  587. function getOnePrey(biome,area)
  588. {
  589. var potential = ["Person"];
  590. if (macro.height > 1e12)
  591. potential = ["Planet","Star","Solar System","Galaxy"];
  592. else if (macro.height > 1e6)
  593. potential = ["Town","City","Continent","Planet"];
  594. else
  595. switch(biome) {
  596. case "suburb": potential = ["Person", "Car", "Bus", "Train", "House"]; break;
  597. case "city": potential = ["Person", "Car", "Bus", "Train", "Tram", "House", "Parking Garage"]; break;
  598. case "downtown": potential = ["Person", "Car", "Bus", "Tram", "Small Skyscraper", "Large Skyscraper", "Parking Garage"]; break;
  599. case "rural": potential = ["Person", "Barn", "House", "Cow"]; break;
  600. }
  601. var potAreas = []
  602. potential.forEach(function (x) {
  603. potAreas.push([x,areas[x]]);
  604. });
  605. potAreas = potAreas.sort(function (x,y) {
  606. return y[1] - x[1];
  607. });
  608. for (var i=0; i<potAreas.length; i++) {
  609. x = potAreas[i];
  610. if (x[1] < area) {
  611. return new Container([new things[x[0]](1)]);
  612. }
  613. };
  614. return new Container([new Person(1)]);
  615. }
  616. function getPrey(region, area)
  617. {
  618. var weights = {"Person": 1};
  619. if (macro.height > 1e12) {
  620. weights = {
  621. "Planet": 1e-10,
  622. "Star": 1e-10,
  623. "Solar System": 1e-10,
  624. "Galaxy": 1e-10
  625. }
  626. }
  627. else if (macro.height > 1e6) {
  628. weights = {
  629. "Town": 0.1,
  630. "City": 0.05,
  631. "Continent": 0.005,
  632. "Planet": 0.0001
  633. }
  634. }
  635. else {
  636. switch(region)
  637. {
  638. case "rural": weights = {
  639. "Person": 0.05,
  640. "House": 0.01,
  641. "Barn": 0.01,
  642. "Cow": 0.2
  643. }; break;
  644. case "suburb": weights = {
  645. "Person": 0.5,
  646. "House": 0.5,
  647. "Car": 0.2,
  648. "Train": 0.1,
  649. "Bus": 0.1
  650. }; break;
  651. case "city": weights = {
  652. "Person": 0.5,
  653. "House": 0.2,
  654. "Car": 0.2,
  655. "Train": 0.1,
  656. "Bus": 0.1,
  657. "Tram": 0.1,
  658. "Parking Garage": 0.02
  659. }; break;
  660. case "downtown": weights = {
  661. "Person": 0.5,
  662. "Car": 0.3,
  663. "Bus": 0.15,
  664. "Tram": 0.1,
  665. "Parking Garage": 0.02,
  666. "Small Skyscraper": 0.4,
  667. "Large Skyscraper": 0.1
  668. }; break;
  669. }
  670. }
  671. return fill_area(area,weights);
  672. }
  673. function updateVictims(type,prey)
  674. {
  675. var sums = prey.sum();
  676. for (var key in sums) {
  677. if (sums.hasOwnProperty(key)) {
  678. victims[type][key] += sums[key];
  679. }
  680. }
  681. }
  682. function feed()
  683. {
  684. var area = macro.handArea;
  685. var prey = getPrey(biome, area);
  686. var line = describe("eat", prey, macro, verbose)
  687. var linesummary = summarize(prey.sum(), false);
  688. var people = get_living_prey(prey.sum());
  689. var sound = "";
  690. if (people == 0) {
  691. sound = "";
  692. } else if (people < 3) {
  693. sound = "Ulp.";
  694. } else if (people < 10) {
  695. sound = "Gulp.";
  696. } else if (people < 50) {
  697. sound = "Glrrp.";
  698. } else if (people < 500) {
  699. sound = "Glrrrpkh!";
  700. } else if (people < 5000) {
  701. sound = "GLRRKPKH!";
  702. } else {
  703. sound = "Oh the humanity!";
  704. }
  705. var preyMass = prey.sum_property("mass");
  706. macro.addGrowthPoints(preyMass);
  707. macro.stomach.feed(prey);
  708. macro.arouse(5);
  709. updateVictims("stomach",prey);
  710. update([sound,line,linesummary,newline]);
  711. }
  712. function stomp()
  713. {
  714. var area = macro.pawArea;
  715. var prey = getPrey(biome, area);
  716. var line = describe("stomp", prey, macro, verbose)
  717. var linesummary = summarize(prey.sum(), true);
  718. var people = get_living_prey(prey.sum());
  719. var sound = "Thump";
  720. if (people < 3) {
  721. sound = "Thump!";
  722. } else if (people < 10) {
  723. sound = "Squish!";
  724. } else if (people < 50) {
  725. sound = "Crunch!";
  726. } else if (people < 500) {
  727. sound = "CRUNCH!";
  728. } else if (people < 5000) {
  729. sound = "CRRUUUNCH!!";
  730. } else {
  731. sound = "Oh the humanity!";
  732. }
  733. var preyMass = prey.sum_property("mass");
  734. macro.addGrowthPoints(preyMass);
  735. macro.arouse(5);
  736. updateVictims("stomped",prey);
  737. update([sound,line,linesummary,newline]);
  738. }
  739. function grind()
  740. {
  741. var area = macro.assArea / 2;
  742. if (macro.maleParts)
  743. area += macro.dickArea
  744. if (macro.femalePartS)
  745. area += macro.vaginaArea;
  746. var prey = getPrey(biome,area);
  747. var line = describe("grind", prey, macro, verbose);
  748. var linesummary = summarize(prey.sum(), true);
  749. var people = get_living_prey(prey.sum());
  750. var sound = "";
  751. if (people < 3) {
  752. sound = "Thump.";
  753. } else if (people < 10) {
  754. sound = "Crunch.";
  755. } else if (people < 50) {
  756. sound = "Crrrrunch.";
  757. } else if (people < 500) {
  758. sound = "SMASH!";
  759. } else if (people < 5000) {
  760. sound = "CCCRASH!!";
  761. } else {
  762. sound = "Oh the humanity!";
  763. }
  764. var preyMass = prey.sum_property("mass");
  765. macro.addGrowthPoints(preyMass);
  766. macro.arouse(20);
  767. updateVictims("ground",prey);
  768. update([sound,line,linesummary,newline]);
  769. }
  770. function anal_vore()
  771. {
  772. var area = macro.analVoreArea;
  773. var prey = getOnePrey(biome,area);
  774. area = macro.assArea;
  775. var crushed = getPrey(biome,area);
  776. var line1 = describe("anal-vore", prey, macro, verbose);
  777. var line1summary = summarize(prey.sum(), false);
  778. var line2 = describe("ass-crush", crushed, macro, verbose);
  779. var line2summary = summarize(crushed.sum(), true);
  780. var people = get_living_prey(prey.sum());
  781. var sound = "Shlp";
  782. if (people < 3) {
  783. sound = "Shlp.";
  784. } else if (people < 10) {
  785. sound = "Squelch.";
  786. } else if (people < 50) {
  787. sound = "Shlurrp.";
  788. } else if (people < 500) {
  789. sound = "SHLRP!";
  790. } else if (people < 5000) {
  791. sound = "SQLCH!!";
  792. } else {
  793. sound = "Oh the humanity!";
  794. }
  795. var people = get_living_prey(crushed.sum());
  796. var sound2 = "Thump";
  797. if (people < 3) {
  798. sound2 = "Thump!";
  799. } else if (people < 10) {
  800. sound2 = "Squish!";
  801. } else if (people < 50) {
  802. sound2 = "Crunch!";
  803. } else if (people < 500) {
  804. sound2 = "CRUNCH!";
  805. } else if (people < 5000) {
  806. sound2 = "CRRUUUNCH!!";
  807. } else {
  808. sound2 = "Oh the humanity!";
  809. }
  810. var preyMass = prey.sum_property("mass");
  811. var crushedMass = prey.sum_property("mass");
  812. macro.addGrowthPoints(preyMass);
  813. macro.addGrowthPoints(crushedMass);
  814. macro.bowels.feed(prey);
  815. macro.arouse(10);
  816. updateVictims("bowels",prey);
  817. updateVictims("stomped",crushed);
  818. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  819. }
  820. function breast_crush()
  821. {
  822. var area = macro.breastArea;
  823. var prey = getPrey(biome, area);
  824. var line = describe("breast-crush", prey, macro, verbose);
  825. var linesummary = summarize(prey.sum(), true);
  826. var people = get_living_prey(prey.sum());
  827. var sound = "Thump";
  828. if (people < 3) {
  829. sound = "Thump!";
  830. } else if (people < 10) {
  831. sound = "Squish!";
  832. } else if (people < 50) {
  833. sound = "Crunch!";
  834. } else if (people < 500) {
  835. sound = "CRUNCH!";
  836. } else if (people < 5000) {
  837. sound = "CRRUUUNCH!!";
  838. } else {
  839. sound = "Oh the humanity!";
  840. }
  841. var preyMass = prey.sum_property("mass");
  842. macro.addGrowthPoints(preyMass);
  843. macro.arouse(10);
  844. updateVictims("breasts",prey);
  845. update([sound,line,linesummary,newline]);
  846. }
  847. function unbirth()
  848. {
  849. var area = macro.vaginaArea;
  850. var prey = getPrey(biome, area);
  851. var line = describe("unbirth", prey, macro, verbose)
  852. var linesummary = summarize(prey.sum(), false);
  853. var people = get_living_prey(prey.sum());
  854. var sound = "";
  855. if (people < 3) {
  856. sound = "Shlp.";
  857. } else if (people < 10) {
  858. sound = "Squelch.";
  859. } else if (people < 50) {
  860. sound = "Shlurrp.";
  861. } else if (people < 500) {
  862. sound = "SHLRP!";
  863. } else if (people < 5000) {
  864. sound = "SQLCH!!";
  865. } else {
  866. sound = "Oh the humanity!";
  867. }
  868. var preyMass = prey.sum_property("mass");
  869. macro.addGrowthPoints(preyMass);
  870. macro.womb.feed(prey);
  871. macro.arouse(20);
  872. updateVictims("womb",prey);
  873. update([sound,line,linesummary,newline]);
  874. }
  875. function cockslap()
  876. {
  877. var area = macro.dickArea;
  878. var prey = getPrey(biome, area);
  879. var line = describe("cockslap", prey, macro, verbose)
  880. var linesummary = summarize(prey.sum(), true);
  881. var people = get_living_prey(prey.sum());
  882. var sound = "Thump";
  883. if (people < 3) {
  884. sound = "Thump!";
  885. } else if (people < 10) {
  886. sound = "Squish!";
  887. } else if (people < 50) {
  888. sound = "Crunch!";
  889. } else if (people < 500) {
  890. sound = "CRUNCH!";
  891. } else if (people < 5000) {
  892. sound = "CRRUUUNCH!!";
  893. } else {
  894. sound = "Oh the humanity!";
  895. }
  896. var preyMass = prey.sum_property("mass");
  897. macro.addGrowthPoints(preyMass);
  898. macro.arouse(15);
  899. updateVictims("cock",prey);
  900. update([sound,line,linesummary,newline]);
  901. }
  902. function cock_vore()
  903. {
  904. var area = macro.dickGirth;
  905. var prey = getPrey(biome, area);
  906. var line = describe("cock-vore", prey, macro, verbose)
  907. var linesummary = summarize(prey.sum(), false);
  908. var people = get_living_prey(prey.sum());
  909. var sound = "lp";
  910. if (people < 3) {
  911. sound = "Shlp.";
  912. } else if (people < 10) {
  913. sound = "Squelch.";
  914. } else if (people < 50) {
  915. sound = "Shlurrp.";
  916. } else if (people < 500) {
  917. sound = "SHLRP!";
  918. } else if (people < 5000) {
  919. sound = "SQLCH!!";
  920. } else {
  921. sound = "Oh the humanity!";
  922. }
  923. var preyMass = prey.sum_property("mass");
  924. macro.addGrowthPoints(preyMass);
  925. macro.balls.feed(prey);
  926. macro.arouse(20);
  927. updateVictims("balls",prey);
  928. update([sound,line,linesummary,newline]);
  929. }
  930. function ball_smother()
  931. {
  932. var area = macro.ballArea * 2;
  933. var prey = getPrey(biome, area);
  934. var line = describe("ball-smother", prey, macro, verbose)
  935. var linesummary = summarize(prey.sum(), true);
  936. var people = get_living_prey(prey.sum());
  937. var sound = "Thump";
  938. if (people < 3) {
  939. sound = "Thump!";
  940. } else if (people < 10) {
  941. sound = "Squish!";
  942. } else if (people < 50) {
  943. sound = "Smoosh!";
  944. } else if (people < 500) {
  945. sound = "SMOOSH!";
  946. } else if (people < 5000) {
  947. sound = "SMOOOOOSH!!";
  948. } else {
  949. sound = "Oh the humanity!";
  950. }
  951. var preyMass = prey.sum_property("mass");
  952. macro.addGrowthPoints(preyMass);
  953. macro.arouse(10);
  954. updateVictims("balls",prey);
  955. update([sound,line,linesummary,newline]);
  956. }
  957. function male_spurt(vol)
  958. {
  959. var area = Math.pow(vol, 2/3);
  960. var prey = getPrey(biome, area);
  961. var line = describe("male-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  962. var linesummary = summarize(prey.sum(), true);
  963. var people = get_living_prey(prey.sum());
  964. var sound = "Spurt!";
  965. if (people < 3) {
  966. sound = "Spurt!";
  967. } else if (people < 10) {
  968. sound = "Sploosh!";
  969. } else if (people < 50) {
  970. sound = "Sploooooosh!";
  971. } else if (people < 500) {
  972. sound = "SPLOOSH!";
  973. } else if (people < 5000) {
  974. sound = "SPLOOOOOOOOOOSH!!";
  975. } else {
  976. sound = "Oh the humanity!";
  977. }
  978. var preyMass = prey.sum_property("mass");
  979. macro.addGrowthPoints(preyMass);
  980. updateVictims("splooged",prey);
  981. update([sound,line,linesummary,newline]);
  982. }
  983. function male_orgasm(vol)
  984. {
  985. var area = Math.pow(vol, 2/3);
  986. var prey = getPrey(biome, area);
  987. var line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  988. var linesummary = summarize(prey.sum(), true);
  989. var people = get_living_prey(prey.sum());
  990. var sound = "Spurt!";
  991. if (people < 3) {
  992. sound = "Spurt!";
  993. } else if (people < 10) {
  994. sound = "Sploosh!";
  995. } else if (people < 50) {
  996. sound = "Sploooooosh!";
  997. } else if (people < 500) {
  998. sound = "SPLOOSH!";
  999. } else if (people < 5000) {
  1000. sound = "SPLOOOOOOOOOOSH!!";
  1001. } else {
  1002. sound = "Oh the humanity!";
  1003. }
  1004. var preyMass = prey.sum_property("mass");
  1005. macro.addGrowthPoints(preyMass);
  1006. updateVictims("splooged",prey);
  1007. update([sound,line,linesummary,newline]);
  1008. }
  1009. function female_spurt(vol)
  1010. {
  1011. var area = Math.pow(vol, 2/3);
  1012. var prey = getPrey(biome, area);
  1013. var line = describe("female-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1014. var linesummary = summarize(prey.sum(), true);
  1015. var people = get_living_prey(prey.sum());
  1016. var sound = "Spurt!";
  1017. if (people < 3) {
  1018. sound = "Spurt!";
  1019. } else if (people < 10) {
  1020. sound = "Sploosh!";
  1021. } else if (people < 50) {
  1022. sound = "Sploooooosh!";
  1023. } else if (people < 500) {
  1024. sound = "SPLOOSH!";
  1025. } else if (people < 5000) {
  1026. sound = "SPLOOOOOOOOOOSH!!";
  1027. } else {
  1028. sound = "Oh the humanity!";
  1029. }
  1030. var preyMass = prey.sum_property("mass");
  1031. macro.addGrowthPoints(preyMass);
  1032. updateVictims("splooged",prey);
  1033. update([sound,line,linesummary,newline]);
  1034. }
  1035. function female_orgasm(vol)
  1036. {
  1037. var area = Math.pow(vol, 2/3);
  1038. var prey = getPrey(biome, area);
  1039. var line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1040. var linesummary = summarize(prey.sum(), true);
  1041. var people = get_living_prey(prey.sum());
  1042. var sound = "Spurt!";
  1043. if (people < 3) {
  1044. sound = "Spurt!";
  1045. } else if (people < 10) {
  1046. sound = "Sploosh!";
  1047. } else if (people < 50) {
  1048. sound = "Sploooooosh!";
  1049. } else if (people < 500) {
  1050. sound = "SPLOOSH!";
  1051. } else if (people < 5000) {
  1052. sound = "SPLOOOOOOOOOOSH!!";
  1053. } else {
  1054. sound = "Oh the humanity!";
  1055. }
  1056. var preyMass = prey.sum_property("mass");
  1057. macro.addGrowthPoints(preyMass);
  1058. updateVictims("splooged",prey);
  1059. update([sound,line,linesummary,newline]);
  1060. }
  1061. function tail_slap()
  1062. {
  1063. var area = macro.tailArea * macro.tailCount;
  1064. var prey = getPrey(biome, area);
  1065. var line = describe("tail-slap", prey, macro, verbose)
  1066. var linesummary = summarize(prey.sum(), true);
  1067. var people = get_living_prey(prey.sum());
  1068. var sound = "Thump";
  1069. if (people < 3) {
  1070. sound = "Thump!";
  1071. } else if (people < 10) {
  1072. sound = "Squish!";
  1073. } else if (people < 50) {
  1074. sound = "Crunch!";
  1075. } else if (people < 500) {
  1076. sound = "CRUNCH!";
  1077. } else if (people < 5000) {
  1078. sound = "CRRUUUNCH!!";
  1079. } else {
  1080. sound = "Oh the humanity!";
  1081. }
  1082. var preyMass = prey.sum_property("mass");
  1083. macro.addGrowthPoints(preyMass);
  1084. macro.arouse(5);
  1085. updateVictims("tailslapped",prey);
  1086. update([sound,line,linesummary,newline]);
  1087. }
  1088. function tail_vore()
  1089. {
  1090. var area = macro.tailGirth * macro.tailCount;
  1091. var prey = getPrey(biome, area);
  1092. var line = describe("tail-vore", prey, macro, verbose)
  1093. var linesummary = summarize(prey.sum(), false);
  1094. var people = get_living_prey(prey.sum());
  1095. var sound = "";
  1096. if (people == 0) {
  1097. sound = "";
  1098. } else if (people < 3) {
  1099. sound = "Ulp.";
  1100. } else if (people < 10) {
  1101. sound = "Gulp.";
  1102. } else if (people < 50) {
  1103. sound = "Glrrp.";
  1104. } else if (people < 500) {
  1105. sound = "Glrrrpkh!";
  1106. } else if (people < 5000) {
  1107. sound = "GLRRKPKH!";
  1108. } else {
  1109. sound = "Oh the humanity!";
  1110. }
  1111. var preyMass = prey.sum_property("mass");
  1112. macro.addGrowthPoints(preyMass);
  1113. macro.arouse(5);
  1114. macro.stomach.feed(prey);
  1115. updateVictims("tailmaw'd",prey);
  1116. update([sound,line,linesummary,newline]);
  1117. }
  1118. function transformNumbers(line)
  1119. {
  1120. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  1121. }
  1122. function update(lines = [])
  1123. {
  1124. var log = document.getElementById("log");
  1125. lines.forEach(function (x) {
  1126. var line = document.createElement('div');
  1127. line.innerHTML = transformNumbers(x);
  1128. log.appendChild(line);
  1129. });
  1130. if (lines.length > 0)
  1131. log.scrollTop = log.scrollHeight;
  1132. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  1133. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  1134. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  1135. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  1136. document.getElementById("edge").innerHTML = "Edge: " + round(macro.edge * 100,0) + "%";
  1137. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false))
  1138. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  1139. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  1140. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  1141. for (var type in victims) {
  1142. if (victims.hasOwnProperty(type)) {
  1143. for (var key in victims[type]){
  1144. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  1145. document.getElementById("stat-" + key).style.display = "table-row";
  1146. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  1147. }
  1148. }
  1149. }
  1150. }
  1151. }
  1152. function pick_move()
  1153. {
  1154. if (!strolling) {
  1155. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1156. return;
  1157. }
  1158. var choice = Math.random();
  1159. if (choice < 0.2) {
  1160. anal_vore();
  1161. } else if (choice < 0.6) {
  1162. stomp();
  1163. } else {
  1164. feed();
  1165. }
  1166. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1167. }
  1168. function grow_pick(times) {
  1169. if (document.getElementById("part-body").checked == true) {
  1170. grow(times);
  1171. }
  1172. else if (document.getElementById("part-ass").checked == true) {
  1173. grow_ass(times);
  1174. }
  1175. else if (document.getElementById("part-dick").checked == true) {
  1176. grow_dick(times);
  1177. }
  1178. else if (document.getElementById("part-balls").checked == true) {
  1179. grow_balls(times);
  1180. }
  1181. else if (document.getElementById("part-breasts").checked == true) {
  1182. grow_breasts(times);
  1183. }
  1184. else if (document.getElementById("part-vagina").checked == true) {
  1185. grow_vagina(times);
  1186. }
  1187. }
  1188. function grow(times=1)
  1189. {
  1190. if (macro.growthPoints < 100 * times) {
  1191. update(["You don't feel like growing right now."]);
  1192. return;
  1193. }
  1194. macro.growthPoints -= 100 * times;
  1195. var oldHeight = macro.height;
  1196. var oldMass = macro.mass;
  1197. macro.scale *= Math.pow(1.02,times);
  1198. var newHeight = macro.height;
  1199. var newMass = macro.mass;
  1200. var heightDelta = newHeight - oldHeight;
  1201. var massDelta = newMass - oldMass;
  1202. var heightStr = length(heightDelta, unit);
  1203. var massStr = mass(massDelta, unit);
  1204. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1205. }
  1206. function grow_dick(times=1)
  1207. {
  1208. if (macro.growthPoints < 10 * times) {
  1209. update(["You don't feel like growing right now."]);
  1210. return;
  1211. }
  1212. macro.growthPoints -= 10 * times;
  1213. var oldLength = macro.dickLength;
  1214. var oldMass = macro.dickMass;
  1215. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  1216. var lengthDelta = macro.dickLength - oldLength;
  1217. var massDelta = macro.dickMass - oldMass;
  1218. 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]);
  1219. }
  1220. function grow_balls(times=1)
  1221. {
  1222. if (macro.growthPoints < 10 * times) {
  1223. update(["You don't feel like growing right now."]);
  1224. return;
  1225. }
  1226. macro.growthPoints -= 10 * times;
  1227. var oldDiameter = macro.ballDiameter;
  1228. var oldMass = macro.ballMass;
  1229. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  1230. var diameterDelta = macro.ballDiameter - oldDiameter;
  1231. var massDelta = macro.ballMass - oldMass;
  1232. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1233. }
  1234. function grow_breasts(times=1)
  1235. {
  1236. if (macro.growthPoints < 10 * times) {
  1237. update(["You don't feel like growing right now."]);
  1238. return;
  1239. }
  1240. macro.growthPoints -= 10 * times;
  1241. var oldDiameter = macro.breastDiameter;
  1242. var oldMass = macro.breastMass;
  1243. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  1244. var diameterDelta = macro.breastDiameter - oldDiameter;
  1245. var massDelta = macro.breastMass - oldMass;
  1246. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1247. }
  1248. function grow_vagina(times=1)
  1249. {
  1250. if (macro.growthPoints < 10 * times) {
  1251. update(["You don't feel like growing right now."]);
  1252. return;
  1253. }
  1254. macro.growthPoints -= 10 * times;
  1255. var oldLength = macro.vaginaLength;
  1256. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  1257. var lengthDelta = macro.vaginaLength - oldLength;
  1258. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  1259. }
  1260. function grow_ass(times=1)
  1261. {
  1262. if (macro.growthPoints < 10 * times) {
  1263. update(["You don't feel like growing right now."]);
  1264. return;
  1265. }
  1266. macro.growthPoints -= 10 * times;
  1267. var oldDiameter = Math.pow(macro.assArea,1/2);
  1268. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  1269. var diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  1270. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  1271. }
  1272. function grow_lots()
  1273. {
  1274. var oldHeight = macro.height;
  1275. var oldMass = macro.mass;
  1276. macro.scale *= 100;
  1277. var newHeight = macro.height;
  1278. var newMass = macro.mass;
  1279. var heightDelta = newHeight - oldHeight;
  1280. var massDelta = newMass - oldMass;
  1281. var heightStr = length(heightDelta, unit);
  1282. var massStr = mass(massDelta, unit);
  1283. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1284. }
  1285. function preset(name) {
  1286. switch(name){
  1287. case "Fen":
  1288. macro.species = "crux";
  1289. macro.baseHeight = 2.2606;
  1290. macro.baseMass = 124.738;
  1291. break;
  1292. case "Renard":
  1293. macro.species = "fox";
  1294. macro.baseHeight = 1.549;
  1295. macro.baseMass = 83.9;
  1296. case "Vulpes":
  1297. macro.species = "fox";
  1298. macro.baseHeight = 20000;
  1299. macro.baseMass = 180591661866272;
  1300. }
  1301. }
  1302. function saveSettings() {
  1303. storage = window.localStorage;
  1304. settings = {};
  1305. form = document.forms.namedItem("custom-species-form");
  1306. for (var i=0; i<form.length; i++) {
  1307. if (form[i].value != "") {
  1308. if (form[i].type == "text")
  1309. settings[form[i].name] = form[i].value;
  1310. else if (form[i].type == "number")
  1311. settings[form[i].name] = parseFloat(form[i].value);
  1312. else if (form[i].type == "checkbox") {
  1313. settings[form[i].name] = form[i].checked;
  1314. } else if (form[i].type == "radio") {
  1315. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1316. if (form[i].checked)
  1317. settings[name] = form[i].id
  1318. }
  1319. }
  1320. }
  1321. storage.setItem('settings',JSON.stringify(settings));
  1322. }
  1323. function loadSettings() {
  1324. if (window.localStorage.getItem('settings') == null)
  1325. return;
  1326. storage = window.localStorage;
  1327. settings = JSON.parse(storage.getItem('settings'));
  1328. form = document.forms.namedItem("custom-species-form");
  1329. for (var i=0; i<form.length; i++) {
  1330. if (settings[form[i].name] != undefined) {
  1331. if (form[i].type == "text")
  1332. form[i].value = settings[form[i].name];
  1333. else if (form[i].type == "number")
  1334. form[i].value = settings[form[i].name];
  1335. else if (form[i].type == "checkbox") {
  1336. form[i].checked = settings[form[i].name];
  1337. } else if (form[i].type == "radio") {
  1338. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1339. form[i].checked = (settings[name] == form[i].id);
  1340. }
  1341. }
  1342. }
  1343. }
  1344. function startGame(e) {
  1345. form = document.forms.namedItem("custom-species-form");
  1346. for (var i=0; i<form.length; i++) {
  1347. if (form[i].value != "") {
  1348. if (form[i].type == "text")
  1349. macro[form[i].name] = form[i].value;
  1350. else if (form[i].type == "number")
  1351. macro[form[i].name] = parseFloat(form[i].value);
  1352. else if (form[i].type == "checkbox") {
  1353. macro[form[i].name] = form[i].checked;
  1354. } else if (form[i].type == "radio") {
  1355. if (form[i].checked) {
  1356. switch(form[i].id) {
  1357. case "brutality-0": macro.brutality = 0; break;
  1358. case "brutality-1": macro.brutality = 1; break;
  1359. case "brutality-2": macro.brutality = 2; break;
  1360. }
  1361. }
  1362. }
  1363. }
  1364. }
  1365. if (!macro.hasTail) {
  1366. macro.tailCount = 0;
  1367. }
  1368. document.getElementById("log-area").style.display = 'inline';
  1369. document.getElementById("option-panel").style.display = 'none';
  1370. document.getElementById("action-panel").style.display = 'flex';
  1371. victimTypes = ["stomped","digested","stomach","bowels","ground"];
  1372. if (macro.tailCount > 0) {
  1373. victimTypes = victimTypes.concat(["tailslapped"]);
  1374. if (macro.tailMaw) {
  1375. victimTypes = victimTypes.concat(["tailmaw'd"]);
  1376. } else {
  1377. document.getElementById("button-tail_vore").style.display = 'none';
  1378. }
  1379. } else {
  1380. document.getElementById("button-tail_slap").style.display = 'none';
  1381. document.getElementById("button-tail_vore").style.display = 'none';
  1382. }
  1383. if (macro.maleParts) {
  1384. victimTypes = victimTypes.concat(["cock","balls"]);
  1385. } else {
  1386. document.getElementById("button-cockslap").style.display = 'none';
  1387. document.getElementById("button-cock_vore").style.display = 'none';
  1388. document.getElementById("button-ball_smother").style.display = 'none';
  1389. document.getElementById("cum").style.display = 'none';
  1390. document.querySelector("#part-balls+label").style.display = 'none';
  1391. document.querySelector("#part-dick+label").style.display = 'none';
  1392. }
  1393. if (macro.femaleParts) {
  1394. victimTypes = victimTypes.concat(["breasts"],["womb"]);
  1395. } else {
  1396. document.getElementById("button-breast_crush").style.display = 'none';
  1397. document.getElementById("button-unbirth").style.display = 'none';
  1398. document.getElementById("femcum").style.display = 'none';
  1399. document.querySelector("#part-breasts+label").style.display = 'none';
  1400. document.querySelector("#part-vagina+label").style.display = 'none';
  1401. }
  1402. if (macro.maleParts || macro.femaleParts) {
  1403. victimTypes.push("splooged");
  1404. }
  1405. var table = document.getElementById("victim-table");
  1406. var tr = document.createElement('tr');
  1407. var th = document.createElement('th');
  1408. th.innerHTML = "Method";
  1409. tr.appendChild(th);
  1410. for (var i = 0; i < victimTypes.length; i++) {
  1411. var th = document.createElement('th');
  1412. th.classList.add("victim-table-cell");
  1413. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  1414. tr.appendChild(th);
  1415. }
  1416. table.appendChild(tr);
  1417. for (var key in things) {
  1418. if (things.hasOwnProperty(key) && key != "Container") {
  1419. var tr = document.createElement('tr');
  1420. tr.id = "stat-" + key;
  1421. tr.style.display = "none";
  1422. var th = document.createElement('th');
  1423. th.innerHTML = key;
  1424. tr.appendChild(th);
  1425. for (var i = 0; i < victimTypes.length; i++) {
  1426. var th = document.createElement('th');
  1427. th.innerHTML = 0;
  1428. th.id = "stat-" + victimTypes[i] + "-" + key;
  1429. tr.appendChild(th);
  1430. }
  1431. table.appendChild(tr);
  1432. }
  1433. }
  1434. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  1435. if (!macro.arousalEnabled) {
  1436. document.getElementById("arousal").style.display = "none";
  1437. document.getElementById("edge").style.display = "none";
  1438. }
  1439. //var species = document.getElementById("option-species").value;
  1440. //var re = /^[a-zA-Z\- ]+$/;
  1441. // tricksy tricksy players
  1442. //if (re.test(species)) {
  1443. // macro.species = species;
  1444. //}
  1445. macro.init();
  1446. update();
  1447. document.getElementById("stat-container").style.display = 'flex';
  1448. }
  1449. window.addEventListener('load', function(event) {
  1450. victims["stomped"] = initVictims();
  1451. victims["tailslapped"] = initVictims();
  1452. victims["tailmaw'd"] = initVictims();
  1453. victims["bowels"] = initVictims();
  1454. victims["digested"] = initVictims();
  1455. victims["stomach"] = initVictims();
  1456. victims["breasts"] = initVictims();
  1457. victims["womb"] = initVictims();
  1458. victims["cock"] = initVictims();
  1459. victims["balls"] = initVictims();
  1460. victims["smothered"] = initVictims();
  1461. victims["splooged"] = initVictims();
  1462. victims["ground"] = initVictims();
  1463. document.getElementById("button-look").addEventListener("click",look);
  1464. document.getElementById("button-feed").addEventListener("click",feed);
  1465. document.getElementById("button-stomp").addEventListener("click",stomp);
  1466. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  1467. document.getElementById("button-tail_slap").addEventListener("click",tail_slap);
  1468. document.getElementById("button-tail_vore").addEventListener("click",tail_vore);
  1469. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  1470. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  1471. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  1472. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  1473. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  1474. document.getElementById("button-grind").addEventListener("click",grind);
  1475. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  1476. document.getElementById("button-location").addEventListener("click",change_location);
  1477. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  1478. document.getElementById("button-units").addEventListener("click",toggle_units);
  1479. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  1480. document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
  1481. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  1482. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  1483. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  1484. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  1485. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  1486. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  1487. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  1488. document.getElementById("button-load-custom").addEventListener("click",loadSettings);
  1489. document.getElementById("button-save-custom").addEventListener("click",saveSettings);
  1490. document.getElementById("button-start").addEventListener("click",startGame);
  1491. setTimeout(pick_move, 2000);
  1492. });