big steppy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

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