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

1901 satır
51 KiB

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