big steppy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1961 lines
53 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 chew()
  753. {
  754. var area = macro.handArea;
  755. var prey = getPrey(biome, area);
  756. var line = describe("chew", prey, macro, verbose)
  757. var linesummary = summarize(prey.sum(), false);
  758. var people = get_living_prey(prey.sum());
  759. var sound = "";
  760. if (people == 0) {
  761. sound = "";
  762. } else if (people < 3) {
  763. sound = "Snap.";
  764. } else if (people < 10) {
  765. sound = "Crunch.";
  766. } else if (people < 50) {
  767. sound = "Crack!";
  768. } else if (people < 500) {
  769. sound = "CRUNCH!";
  770. } else if (people < 5000) {
  771. sound = "CRRRUNCH!";
  772. } else {
  773. sound = "Oh the humanity!";
  774. }
  775. var preyMass = prey.sum_property("mass");
  776. macro.addGrowthPoints(preyMass);
  777. macro.arouse(10);
  778. updateVictims("digested",prey);
  779. update([sound,line,linesummary,newline]);
  780. }
  781. function stomp()
  782. {
  783. var area = macro.pawArea;
  784. var prey = getPrey(biome, area);
  785. var line = describe("stomp", prey, macro, verbose)
  786. var linesummary = summarize(prey.sum(), true);
  787. var people = get_living_prey(prey.sum());
  788. var sound = "Thump";
  789. if (people < 3) {
  790. sound = "Thump!";
  791. } else if (people < 10) {
  792. sound = "Squish!";
  793. } else if (people < 50) {
  794. sound = "Crunch!";
  795. } else if (people < 500) {
  796. sound = "CRUNCH!";
  797. } else if (people < 5000) {
  798. sound = "CRRUUUNCH!!";
  799. } else {
  800. sound = "Oh the humanity!";
  801. }
  802. var preyMass = prey.sum_property("mass");
  803. macro.addGrowthPoints(preyMass);
  804. macro.arouse(5);
  805. updateVictims("stomped",prey);
  806. update([sound,line,linesummary,newline]);
  807. }
  808. function grind()
  809. {
  810. var area = macro.assArea / 2;
  811. if (macro.maleParts)
  812. area += macro.dickArea
  813. if (macro.femalePartS)
  814. area += macro.vaginaArea;
  815. var prey = getPrey(biome,area);
  816. var line = describe("grind", prey, macro, verbose);
  817. var linesummary = summarize(prey.sum(), true);
  818. var people = get_living_prey(prey.sum());
  819. var sound = "";
  820. if (people < 3) {
  821. sound = "Thump.";
  822. } else if (people < 10) {
  823. sound = "Crunch.";
  824. } else if (people < 50) {
  825. sound = "Crrrrunch.";
  826. } else if (people < 500) {
  827. sound = "SMASH!";
  828. } else if (people < 5000) {
  829. sound = "CCCRASH!!";
  830. } else {
  831. sound = "Oh the humanity!";
  832. }
  833. var preyMass = prey.sum_property("mass");
  834. macro.addGrowthPoints(preyMass);
  835. macro.arouse(20);
  836. updateVictims("ground",prey);
  837. update([sound,line,linesummary,newline]);
  838. }
  839. function anal_vore()
  840. {
  841. var area = macro.analVoreArea;
  842. var prey = getOnePrey(biome,area);
  843. area = macro.assArea;
  844. var crushed = getPrey(biome,area);
  845. var line1 = describe("anal-vore", prey, macro, verbose);
  846. var line1summary = summarize(prey.sum(), false);
  847. var line2 = describe("ass-crush", crushed, macro, verbose);
  848. var line2summary = summarize(crushed.sum(), true);
  849. var people = get_living_prey(prey.sum());
  850. var sound = "Shlp";
  851. if (people < 3) {
  852. sound = "Shlp.";
  853. } else if (people < 10) {
  854. sound = "Squelch.";
  855. } else if (people < 50) {
  856. sound = "Shlurrp.";
  857. } else if (people < 500) {
  858. sound = "SHLRP!";
  859. } else if (people < 5000) {
  860. sound = "SQLCH!!";
  861. } else {
  862. sound = "Oh the humanity!";
  863. }
  864. var people = get_living_prey(crushed.sum());
  865. var sound2 = "Thump";
  866. if (people < 3) {
  867. sound2 = "Thump!";
  868. } else if (people < 10) {
  869. sound2 = "Squish!";
  870. } else if (people < 50) {
  871. sound2 = "Crunch!";
  872. } else if (people < 500) {
  873. sound2 = "CRUNCH!";
  874. } else if (people < 5000) {
  875. sound2 = "CRRUUUNCH!!";
  876. } else {
  877. sound2 = "Oh the humanity!";
  878. }
  879. var preyMass = prey.sum_property("mass");
  880. var crushedMass = prey.sum_property("mass");
  881. macro.addGrowthPoints(preyMass);
  882. macro.addGrowthPoints(crushedMass);
  883. macro.bowels.feed(prey);
  884. macro.arouse(10);
  885. updateVictims("bowels",prey);
  886. updateVictims("stomped",crushed);
  887. update([sound,line1,line1summary,newline,sound2,line2,line2summary,newline]);
  888. }
  889. function breast_crush()
  890. {
  891. var area = macro.breastArea;
  892. var prey = getPrey(biome, area);
  893. var line = describe("breast-crush", prey, macro, verbose);
  894. var linesummary = summarize(prey.sum(), true);
  895. var people = get_living_prey(prey.sum());
  896. var sound = "Thump";
  897. if (people < 3) {
  898. sound = "Thump!";
  899. } else if (people < 10) {
  900. sound = "Squish!";
  901. } else if (people < 50) {
  902. sound = "Crunch!";
  903. } else if (people < 500) {
  904. sound = "CRUNCH!";
  905. } else if (people < 5000) {
  906. sound = "CRRUUUNCH!!";
  907. } else {
  908. sound = "Oh the humanity!";
  909. }
  910. var preyMass = prey.sum_property("mass");
  911. macro.addGrowthPoints(preyMass);
  912. macro.arouse(10);
  913. updateVictims("breasts",prey);
  914. update([sound,line,linesummary,newline]);
  915. if (macro.lactationEnabled && macro.milkStorage.amount / macro.milkStorage.limit > 0.5) {
  916. var amount = Math.min(macro.lactationVolume, (macro.milkStorage.amount / macro.milkStorage.limit - 0.5) * macro.milkStorage.limit);
  917. milk_breasts(null, amount);
  918. }
  919. }
  920. function milk_breasts(e,vol)
  921. {
  922. if (vol == undefined) {
  923. var vol = Math.min(macro.lactationVolume, macro.milkStorage.amount);
  924. }
  925. macro.milkStorage.amount -= vol;
  926. var area = Math.pow(vol, 2/3);
  927. var prey = getPrey(biome, area);
  928. var line = describe("breast-milk", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  929. var linesummary = summarize(prey.sum(), true);
  930. var people = get_living_prey(prey.sum());
  931. var sound = "Dribble.";
  932. if (people < 3) {
  933. sound = "Dribble.";
  934. } else if (people < 10) {
  935. sound = "Splash.";
  936. } else if (people < 50) {
  937. sound = "Splash!";
  938. } else if (people < 500) {
  939. sound = "SPLOOSH!";
  940. } else if (people < 5000) {
  941. sound = "SPLOOOOOOOOOOSH!!";
  942. } else {
  943. sound = "Oh the humanity!";
  944. }
  945. var preyMass = prey.sum_property("mass");
  946. macro.addGrowthPoints(preyMass);
  947. updateVictims("flooded",prey);
  948. update([sound,line,linesummary,newline]);
  949. }
  950. function unbirth()
  951. {
  952. var area = macro.vaginaArea;
  953. var prey = getPrey(biome, area);
  954. var line = describe("unbirth", prey, macro, verbose)
  955. var linesummary = summarize(prey.sum(), false);
  956. var people = get_living_prey(prey.sum());
  957. var sound = "";
  958. if (people < 3) {
  959. sound = "Shlp.";
  960. } else if (people < 10) {
  961. sound = "Squelch.";
  962. } else if (people < 50) {
  963. sound = "Shlurrp.";
  964. } else if (people < 500) {
  965. sound = "SHLRP!";
  966. } else if (people < 5000) {
  967. sound = "SQLCH!!";
  968. } else {
  969. sound = "Oh the humanity!";
  970. }
  971. var preyMass = prey.sum_property("mass");
  972. macro.addGrowthPoints(preyMass);
  973. macro.womb.feed(prey);
  974. macro.arouse(20);
  975. updateVictims("womb",prey);
  976. update([sound,line,linesummary,newline]);
  977. }
  978. function cockslap()
  979. {
  980. var area = macro.dickArea;
  981. var prey = getPrey(biome, area);
  982. var line = describe("cockslap", prey, macro, verbose)
  983. var linesummary = summarize(prey.sum(), true);
  984. var people = get_living_prey(prey.sum());
  985. var sound = "Thump";
  986. if (people < 3) {
  987. sound = "Thump!";
  988. } else if (people < 10) {
  989. sound = "Squish!";
  990. } else if (people < 50) {
  991. sound = "Crunch!";
  992. } else if (people < 500) {
  993. sound = "CRUNCH!";
  994. } else if (people < 5000) {
  995. sound = "CRRUUUNCH!!";
  996. } else {
  997. sound = "Oh the humanity!";
  998. }
  999. var preyMass = prey.sum_property("mass");
  1000. macro.addGrowthPoints(preyMass);
  1001. macro.arouse(15);
  1002. updateVictims("cock",prey);
  1003. update([sound,line,linesummary,newline]);
  1004. }
  1005. function cock_vore()
  1006. {
  1007. var area = macro.dickGirth;
  1008. var prey = getPrey(biome, area);
  1009. var line = describe("cock-vore", prey, macro, verbose)
  1010. var linesummary = summarize(prey.sum(), false);
  1011. var people = get_living_prey(prey.sum());
  1012. var sound = "lp";
  1013. if (people < 3) {
  1014. sound = "Shlp.";
  1015. } else if (people < 10) {
  1016. sound = "Squelch.";
  1017. } else if (people < 50) {
  1018. sound = "Shlurrp.";
  1019. } else if (people < 500) {
  1020. sound = "SHLRP!";
  1021. } else if (people < 5000) {
  1022. sound = "SQLCH!!";
  1023. } else {
  1024. sound = "Oh the humanity!";
  1025. }
  1026. var preyMass = prey.sum_property("mass");
  1027. macro.addGrowthPoints(preyMass);
  1028. macro.balls.feed(prey);
  1029. macro.arouse(20);
  1030. updateVictims("balls",prey);
  1031. update([sound,line,linesummary,newline]);
  1032. }
  1033. function ball_smother()
  1034. {
  1035. var area = macro.ballArea * 2;
  1036. var prey = getPrey(biome, area);
  1037. var line = describe("ball-smother", prey, macro, verbose)
  1038. var linesummary = summarize(prey.sum(), true);
  1039. var people = get_living_prey(prey.sum());
  1040. var sound = "Thump";
  1041. if (people < 3) {
  1042. sound = "Thump!";
  1043. } else if (people < 10) {
  1044. sound = "Squish!";
  1045. } else if (people < 50) {
  1046. sound = "Smoosh!";
  1047. } else if (people < 500) {
  1048. sound = "SMOOSH!";
  1049. } else if (people < 5000) {
  1050. sound = "SMOOOOOSH!!";
  1051. } else {
  1052. sound = "Oh the humanity!";
  1053. }
  1054. var preyMass = prey.sum_property("mass");
  1055. macro.addGrowthPoints(preyMass);
  1056. macro.arouse(10);
  1057. updateVictims("balls",prey);
  1058. update([sound,line,linesummary,newline]);
  1059. }
  1060. function male_spurt(vol)
  1061. {
  1062. var area = Math.pow(vol, 2/3);
  1063. var prey = getPrey(biome, area);
  1064. var line = describe("male-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1065. var linesummary = summarize(prey.sum(), true);
  1066. var people = get_living_prey(prey.sum());
  1067. var sound = "Spurt!";
  1068. if (people < 3) {
  1069. sound = "Spurt!";
  1070. } else if (people < 10) {
  1071. sound = "Sploosh!";
  1072. } else if (people < 50) {
  1073. sound = "Sploooooosh!";
  1074. } else if (people < 500) {
  1075. sound = "SPLOOSH!";
  1076. } else if (people < 5000) {
  1077. sound = "SPLOOOOOOOOOOSH!!";
  1078. } else {
  1079. sound = "Oh the humanity!";
  1080. }
  1081. var preyMass = prey.sum_property("mass");
  1082. macro.addGrowthPoints(preyMass);
  1083. updateVictims("splooged",prey);
  1084. update([sound,line,linesummary,newline]);
  1085. }
  1086. function male_orgasm(vol)
  1087. {
  1088. var area = Math.pow(vol, 2/3);
  1089. var prey = getPrey(biome, area);
  1090. var line = describe("male-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1091. var linesummary = summarize(prey.sum(), true);
  1092. var people = get_living_prey(prey.sum());
  1093. var sound = "Spurt!";
  1094. if (people < 3) {
  1095. sound = "Spurt!";
  1096. } else if (people < 10) {
  1097. sound = "Sploosh!";
  1098. } else if (people < 50) {
  1099. sound = "Sploooooosh!";
  1100. } else if (people < 500) {
  1101. sound = "SPLOOSH!";
  1102. } else if (people < 5000) {
  1103. sound = "SPLOOOOOOOOOOSH!!";
  1104. } else {
  1105. sound = "Oh the humanity!";
  1106. }
  1107. var preyMass = prey.sum_property("mass");
  1108. macro.addGrowthPoints(preyMass);
  1109. updateVictims("splooged",prey);
  1110. update([sound,line,linesummary,newline]);
  1111. }
  1112. function female_spurt(vol)
  1113. {
  1114. var area = Math.pow(vol, 2/3);
  1115. var prey = getPrey(biome, area);
  1116. var line = describe("female-spurt", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false))
  1117. var linesummary = summarize(prey.sum(), true);
  1118. var people = get_living_prey(prey.sum());
  1119. var sound = "Spurt!";
  1120. if (people < 3) {
  1121. sound = "Spurt!";
  1122. } else if (people < 10) {
  1123. sound = "Sploosh!";
  1124. } else if (people < 50) {
  1125. sound = "Sploooooosh!";
  1126. } else if (people < 500) {
  1127. sound = "SPLOOSH!";
  1128. } else if (people < 5000) {
  1129. sound = "SPLOOOOOOOOOOSH!!";
  1130. } else {
  1131. sound = "Oh the humanity!";
  1132. }
  1133. var preyMass = prey.sum_property("mass");
  1134. macro.addGrowthPoints(preyMass);
  1135. updateVictims("splooged",prey);
  1136. update([sound,line,linesummary,newline]);
  1137. }
  1138. function female_orgasm(vol)
  1139. {
  1140. var area = Math.pow(vol, 2/3);
  1141. var prey = getPrey(biome, area);
  1142. var line = describe("female-orgasm", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
  1143. var linesummary = summarize(prey.sum(), true);
  1144. var people = get_living_prey(prey.sum());
  1145. var sound = "Spurt!";
  1146. if (people < 3) {
  1147. sound = "Spurt!";
  1148. } else if (people < 10) {
  1149. sound = "Sploosh!";
  1150. } else if (people < 50) {
  1151. sound = "Sploooooosh!";
  1152. } else if (people < 500) {
  1153. sound = "SPLOOSH!";
  1154. } else if (people < 5000) {
  1155. sound = "SPLOOOOOOOOOOSH!!";
  1156. } else {
  1157. sound = "Oh the humanity!";
  1158. }
  1159. var preyMass = prey.sum_property("mass");
  1160. macro.addGrowthPoints(preyMass);
  1161. updateVictims("splooged",prey);
  1162. update([sound,line,linesummary,newline]);
  1163. }
  1164. function tail_slap()
  1165. {
  1166. var area = macro.tailArea * macro.tailCount;
  1167. var prey = getPrey(biome, area);
  1168. var line = describe("tail-slap", prey, macro, verbose)
  1169. var linesummary = summarize(prey.sum(), true);
  1170. var people = get_living_prey(prey.sum());
  1171. var sound = "Thump";
  1172. if (people < 3) {
  1173. sound = "Thump!";
  1174. } else if (people < 10) {
  1175. sound = "Squish!";
  1176. } else if (people < 50) {
  1177. sound = "Crunch!";
  1178. } else if (people < 500) {
  1179. sound = "CRUNCH!";
  1180. } else if (people < 5000) {
  1181. sound = "CRRUUUNCH!!";
  1182. } else {
  1183. sound = "Oh the humanity!";
  1184. }
  1185. var preyMass = prey.sum_property("mass");
  1186. macro.addGrowthPoints(preyMass);
  1187. macro.arouse(5);
  1188. updateVictims("tailslapped",prey);
  1189. update([sound,line,linesummary,newline]);
  1190. }
  1191. function tail_vore()
  1192. {
  1193. var area = macro.tailGirth * macro.tailCount;
  1194. var prey = getPrey(biome, area);
  1195. var line = describe("tail-vore", prey, macro, verbose)
  1196. var linesummary = summarize(prey.sum(), false);
  1197. var people = get_living_prey(prey.sum());
  1198. var sound = "";
  1199. if (people == 0) {
  1200. sound = "";
  1201. } else if (people < 3) {
  1202. sound = "Ulp.";
  1203. } else if (people < 10) {
  1204. sound = "Gulp.";
  1205. } else if (people < 50) {
  1206. sound = "Glrrp.";
  1207. } else if (people < 500) {
  1208. sound = "Glrrrpkh!";
  1209. } else if (people < 5000) {
  1210. sound = "GLRRKPKH!";
  1211. } else {
  1212. sound = "Oh the humanity!";
  1213. }
  1214. var preyMass = prey.sum_property("mass");
  1215. macro.addGrowthPoints(preyMass);
  1216. macro.arouse(5);
  1217. macro.stomach.feed(prey);
  1218. updateVictims("tailmaw'd",prey);
  1219. update([sound,line,linesummary,newline]);
  1220. }
  1221. function transformNumbers(line)
  1222. {
  1223. return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
  1224. }
  1225. function update(lines = [])
  1226. {
  1227. var log = document.getElementById("log");
  1228. lines.forEach(function (x) {
  1229. var line = document.createElement('div');
  1230. line.innerHTML = transformNumbers(x);
  1231. log.appendChild(line);
  1232. });
  1233. if (lines.length > 0)
  1234. log.scrollTop = log.scrollHeight;
  1235. document.getElementById("height").innerHTML = "Height: " + transformNumbers(length(macro.height, unit));
  1236. document.getElementById("mass").innerHTML = "Mass: " + transformNumbers(mass(macro.mass, unit));
  1237. document.getElementById("growth-points").innerHTML = "Growth Points:" + macro.growthPoints;
  1238. document.getElementById("arousal").innerHTML = "Arousal: " + round(macro.arousal,0) + "%";
  1239. document.getElementById("edge").innerHTML = "Edge: " + round(macro.edge * 100,0) + "%";
  1240. document.getElementById("cum").innerHTML = "Cum: " + transformNumbers(volume(macro.cumStorage.amount,unit,false))
  1241. document.getElementById("cumPercent").innerHTML = Math.round(macro.cumStorage.amount / macro.cumStorage.limit * 100) + "%";
  1242. document.getElementById("femcum").innerHTML = "Femcum: " + transformNumbers(volume(macro.femcumStorage.amount,unit,false));
  1243. document.getElementById("femcumPercent").innerHTML = Math.round(macro.femcumStorage.amount / macro.femcumStorage.limit * 100) + "%";
  1244. document.getElementById("milk").innerHTML = "Milk: " + transformNumbers(volume(macro.milkStorage.amount,unit,false));
  1245. document.getElementById("milkPercent").innerHTML = Math.round(macro.milkStorage.amount / macro.milkStorage.limit * 100) + "%";
  1246. for (var type in victims) {
  1247. if (victims.hasOwnProperty(type)) {
  1248. for (var key in victims[type]){
  1249. if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
  1250. document.getElementById("stat-" + key).style.display = "table-row";
  1251. document.getElementById("stat-" + type + "-" + key).innerHTML = number(victims[type][key],numbers);
  1252. }
  1253. }
  1254. }
  1255. }
  1256. }
  1257. function pick_move()
  1258. {
  1259. if (!strolling) {
  1260. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1261. return;
  1262. }
  1263. var choice = Math.random();
  1264. if (choice < 0.2) {
  1265. anal_vore();
  1266. } else if (choice < 0.6) {
  1267. stomp();
  1268. } else {
  1269. feed();
  1270. }
  1271. setTimeout(pick_move, 1500 * Math.sqrt(macro.scale));
  1272. }
  1273. function grow_pick(times) {
  1274. if (document.getElementById("part-body").checked == true) {
  1275. grow(times);
  1276. }
  1277. else if (document.getElementById("part-ass").checked == true) {
  1278. grow_ass(times);
  1279. }
  1280. else if (document.getElementById("part-dick").checked == true) {
  1281. grow_dick(times);
  1282. }
  1283. else if (document.getElementById("part-balls").checked == true) {
  1284. grow_balls(times);
  1285. }
  1286. else if (document.getElementById("part-breasts").checked == true) {
  1287. grow_breasts(times);
  1288. }
  1289. else if (document.getElementById("part-vagina").checked == true) {
  1290. grow_vagina(times);
  1291. }
  1292. }
  1293. function grow(times=1)
  1294. {
  1295. if (macro.growthPoints < 100 * times) {
  1296. update(["You don't feel like growing right now."]);
  1297. return;
  1298. }
  1299. macro.growthPoints -= 100 * times;
  1300. var oldHeight = macro.height;
  1301. var oldMass = macro.mass;
  1302. macro.scale *= Math.pow(1.02,times);
  1303. var newHeight = macro.height;
  1304. var newMass = macro.mass;
  1305. var heightDelta = newHeight - oldHeight;
  1306. var massDelta = newMass - oldMass;
  1307. var heightStr = length(heightDelta, unit);
  1308. var massStr = mass(massDelta, unit);
  1309. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1310. }
  1311. function grow_dick(times=1)
  1312. {
  1313. if (macro.growthPoints < 10 * times) {
  1314. update(["You don't feel like growing right now."]);
  1315. return;
  1316. }
  1317. macro.growthPoints -= 10 * times;
  1318. var oldLength = macro.dickLength;
  1319. var oldMass = macro.dickMass;
  1320. macro.dickScale = Math.pow(macro.dickScale * macro.dickScale + 1.02*times, 1/2) ;
  1321. var lengthDelta = macro.dickLength - oldLength;
  1322. var massDelta = macro.dickMass - oldMass;
  1323. 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]);
  1324. }
  1325. function grow_balls(times=1)
  1326. {
  1327. if (macro.growthPoints < 10 * times) {
  1328. update(["You don't feel like growing right now."]);
  1329. return;
  1330. }
  1331. macro.growthPoints -= 10 * times;
  1332. var oldDiameter = macro.ballDiameter;
  1333. var oldMass = macro.ballMass;
  1334. macro.ballScale = Math.pow(macro.ballScale * macro.ballScale + 1.02*times, 1/2) ;
  1335. var diameterDelta = macro.ballDiameter - oldDiameter;
  1336. var massDelta = macro.ballMass - oldMass;
  1337. update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1338. }
  1339. function grow_breasts(times=1)
  1340. {
  1341. if (macro.growthPoints < 10 * times) {
  1342. update(["You don't feel like growing right now."]);
  1343. return;
  1344. }
  1345. macro.growthPoints -= 10 * times;
  1346. var oldDiameter = macro.breastDiameter;
  1347. var oldMass = macro.breastMass;
  1348. macro.breastScale = Math.pow(macro.breastScale * macro.breastScale + 1.02*times, 1/2) ;
  1349. var diameterDelta = macro.breastDiameter - oldDiameter;
  1350. var massDelta = macro.breastMass - oldMass;
  1351. update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]);
  1352. }
  1353. function grow_vagina(times=1)
  1354. {
  1355. if (macro.growthPoints < 10 * times) {
  1356. update(["You don't feel like growing right now."]);
  1357. return;
  1358. }
  1359. macro.growthPoints -= 10 * times;
  1360. var oldLength = macro.vaginaLength;
  1361. macro.vaginaScale = Math.pow(macro.vaginaScale * macro.vaginaScale + 1.02*times, 1/2) ;
  1362. var lengthDelta = macro.vaginaLength - oldLength;
  1363. update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]);
  1364. }
  1365. function grow_ass(times=1)
  1366. {
  1367. if (macro.growthPoints < 10 * times) {
  1368. update(["You don't feel like growing right now."]);
  1369. return;
  1370. }
  1371. macro.growthPoints -= 10 * times;
  1372. var oldDiameter = Math.pow(macro.assArea,1/2);
  1373. macro.assScale = Math.pow(macro.assScale * macro.assScale + 1.02*times, 1/2) ;
  1374. var diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter;
  1375. update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
  1376. }
  1377. function grow_lots()
  1378. {
  1379. var oldHeight = macro.height;
  1380. var oldMass = macro.mass;
  1381. macro.scale *= 100;
  1382. var newHeight = macro.height;
  1383. var newMass = macro.mass;
  1384. var heightDelta = newHeight - oldHeight;
  1385. var massDelta = newMass - oldMass;
  1386. var heightStr = length(heightDelta, unit);
  1387. var massStr = mass(massDelta, unit);
  1388. update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
  1389. }
  1390. function preset(name) {
  1391. switch(name){
  1392. case "Fen":
  1393. macro.species = "crux";
  1394. macro.baseHeight = 2.2606;
  1395. macro.baseMass = 124.738;
  1396. break;
  1397. case "Renard":
  1398. macro.species = "fox";
  1399. macro.baseHeight = 1.549;
  1400. macro.baseMass = 83.9;
  1401. case "Vulpes":
  1402. macro.species = "fox";
  1403. macro.baseHeight = 20000;
  1404. macro.baseMass = 180591661866272;
  1405. }
  1406. }
  1407. function saveSettings() {
  1408. storage = window.localStorage;
  1409. settings = {};
  1410. form = document.forms.namedItem("custom-species-form");
  1411. for (var i=0; i<form.length; i++) {
  1412. if (form[i].value != "") {
  1413. if (form[i].type == "text")
  1414. settings[form[i].name] = form[i].value;
  1415. else if (form[i].type == "number")
  1416. settings[form[i].name] = parseFloat(form[i].value);
  1417. else if (form[i].type == "checkbox") {
  1418. settings[form[i].name] = form[i].checked;
  1419. } else if (form[i].type == "radio") {
  1420. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1421. if (form[i].checked)
  1422. settings[name] = form[i].id
  1423. }
  1424. }
  1425. }
  1426. storage.setItem('settings',JSON.stringify(settings));
  1427. }
  1428. function loadSettings() {
  1429. if (window.localStorage.getItem('settings') == null)
  1430. return;
  1431. storage = window.localStorage;
  1432. settings = JSON.parse(storage.getItem('settings'));
  1433. form = document.forms.namedItem("custom-species-form");
  1434. for (var i=0; i<form.length; i++) {
  1435. if (settings[form[i].name] != undefined) {
  1436. if (form[i].type == "text")
  1437. form[i].value = settings[form[i].name];
  1438. else if (form[i].type == "number")
  1439. form[i].value = settings[form[i].name];
  1440. else if (form[i].type == "checkbox") {
  1441. form[i].checked = settings[form[i].name];
  1442. } else if (form[i].type == "radio") {
  1443. let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
  1444. form[i].checked = (settings[name] == form[i].id);
  1445. }
  1446. }
  1447. }
  1448. }
  1449. function startGame(e) {
  1450. form = document.forms.namedItem("custom-species-form");
  1451. for (var i=0; i<form.length; i++) {
  1452. if (form[i].value != "") {
  1453. if (form[i].type == "text")
  1454. macro[form[i].name] = form[i].value;
  1455. else if (form[i].type == "number")
  1456. macro[form[i].name] = parseFloat(form[i].value);
  1457. else if (form[i].type == "checkbox") {
  1458. if (form[i].name == "humanMode")
  1459. humanMode = form[i].checked;
  1460. else
  1461. macro[form[i].name] = form[i].checked;
  1462. } else if (form[i].type == "radio") {
  1463. if (form[i].checked) {
  1464. switch(form[i].id) {
  1465. case "brutality-0": macro.brutality = 0; break;
  1466. case "brutality-1": macro.brutality = 1; break;
  1467. case "brutality-2": macro.brutality = 2; break;
  1468. }
  1469. }
  1470. }
  1471. }
  1472. }
  1473. if (!macro.hasTail) {
  1474. macro.tailCount = 0;
  1475. }
  1476. document.getElementById("log-area").style.display = 'inline';
  1477. document.getElementById("option-panel").style.display = 'none';
  1478. document.getElementById("action-panel").style.display = 'flex';
  1479. victimTypes = ["stomped","digested","stomach","bowels","ground"];
  1480. if (macro.tailCount > 0) {
  1481. victimTypes = victimTypes.concat(["tailslapped"]);
  1482. if (macro.tailMaw) {
  1483. victimTypes = victimTypes.concat(["tailmaw'd"]);
  1484. } else {
  1485. document.getElementById("button-tail_vore").style.display = 'none';
  1486. }
  1487. } else {
  1488. document.getElementById("button-tail_slap").style.display = 'none';
  1489. document.getElementById("button-tail_vore").style.display = 'none';
  1490. }
  1491. if (macro.maleParts) {
  1492. victimTypes = victimTypes.concat(["cock","balls"]);
  1493. } else {
  1494. document.getElementById("button-cockslap").style.display = 'none';
  1495. document.getElementById("button-cock_vore").style.display = 'none';
  1496. document.getElementById("button-ball_smother").style.display = 'none';
  1497. document.getElementById("cum").style.display = 'none';
  1498. document.getElementById("cumPercent").style.display = 'none';
  1499. document.querySelector("#part-balls+label").style.display = 'none';
  1500. document.querySelector("#part-dick+label").style.display = 'none';
  1501. }
  1502. if (macro.femaleParts) {
  1503. victimTypes = victimTypes.concat(["womb"]);
  1504. } else {
  1505. document.getElementById("button-unbirth").style.display = 'none';
  1506. document.getElementById("femcum").style.display = 'none';
  1507. document.getElementById("femcumPercent").style.display = 'none';
  1508. document.querySelector("#part-vagina+label").style.display = 'none';
  1509. }
  1510. if (macro.hasBreasts) {
  1511. victimTypes = victimTypes.concat(["breasts"]);
  1512. if (macro.lactationEnabled) {
  1513. victimTypes = victimTypes.concat(["flooded"]);
  1514. } else {
  1515. document.getElementById("button-breast_milk").style.display = 'none';
  1516. document.getElementById("milk").style.display = 'none';
  1517. document.getElementById("milkPercent").style.display = 'none';
  1518. }
  1519. } else {
  1520. document.getElementById("button-breast_milk").style.display = 'none';
  1521. document.getElementById("milk").style.display = 'none';
  1522. document.getElementById("milkPercent").style.display = 'none';
  1523. document.getElementById("button-breast_crush").style.display = 'none';
  1524. document.querySelector("#part-breasts+label").style.display = 'none';
  1525. }
  1526. if (macro.maleParts || macro.femaleParts) {
  1527. victimTypes.push("splooged");
  1528. }
  1529. if (macro.brutality < 1) {
  1530. document.getElementById("button-chew").style.display = 'none';
  1531. }
  1532. var table = document.getElementById("victim-table");
  1533. var tr = document.createElement('tr');
  1534. var th = document.createElement('th');
  1535. th.innerHTML = "Method";
  1536. tr.appendChild(th);
  1537. for (var i = 0; i < victimTypes.length; i++) {
  1538. var th = document.createElement('th');
  1539. th.classList.add("victim-table-cell");
  1540. th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
  1541. tr.appendChild(th);
  1542. }
  1543. table.appendChild(tr);
  1544. for (var key in things) {
  1545. if (things.hasOwnProperty(key) && key != "Container") {
  1546. var tr = document.createElement('tr');
  1547. tr.id = "stat-" + key;
  1548. tr.style.display = "none";
  1549. var th = document.createElement('th');
  1550. th.innerHTML = key;
  1551. tr.appendChild(th);
  1552. for (var i = 0; i < victimTypes.length; i++) {
  1553. var th = document.createElement('th');
  1554. th.innerHTML = 0;
  1555. th.id = "stat-" + victimTypes[i] + "-" + key;
  1556. tr.appendChild(th);
  1557. }
  1558. table.appendChild(tr);
  1559. }
  1560. }
  1561. document.getElementById("button-arousal").innerHTML = (macro.arousalEnabled ? "Arousal On" : "Arousal Off");
  1562. if (!macro.arousalEnabled) {
  1563. document.getElementById("arousal").style.display = "none";
  1564. document.getElementById("edge").style.display = "none";
  1565. }
  1566. //var species = document.getElementById("option-species").value;
  1567. //var re = /^[a-zA-Z\- ]+$/;
  1568. // tricksy tricksy players
  1569. //if (re.test(species)) {
  1570. // macro.species = species;
  1571. //}
  1572. macro.init();
  1573. update();
  1574. document.getElementById("stat-container").style.display = 'flex';
  1575. }
  1576. window.addEventListener('load', function(event) {
  1577. victims["stomped"] = initVictims();
  1578. victims["tailslapped"] = initVictims();
  1579. victims["tailmaw'd"] = initVictims();
  1580. victims["bowels"] = initVictims();
  1581. victims["digested"] = initVictims();
  1582. victims["stomach"] = initVictims();
  1583. victims["breasts"] = initVictims();
  1584. victims["flooded"] = initVictims();
  1585. victims["womb"] = initVictims();
  1586. victims["cock"] = initVictims();
  1587. victims["balls"] = initVictims();
  1588. victims["smothered"] = initVictims();
  1589. victims["splooged"] = initVictims();
  1590. victims["ground"] = initVictims();
  1591. document.getElementById("button-look").addEventListener("click",look);
  1592. document.getElementById("button-feed").addEventListener("click",feed);
  1593. document.getElementById("button-chew").addEventListener("click",chew);
  1594. document.getElementById("button-stomp").addEventListener("click",stomp);
  1595. document.getElementById("button-anal_vore").addEventListener("click",anal_vore);
  1596. document.getElementById("button-tail_slap").addEventListener("click",tail_slap);
  1597. document.getElementById("button-tail_vore").addEventListener("click",tail_vore);
  1598. document.getElementById("button-breast_crush").addEventListener("click",breast_crush);
  1599. document.getElementById("button-breast_milk").addEventListener("click",milk_breasts);
  1600. document.getElementById("button-unbirth").addEventListener("click",unbirth);
  1601. document.getElementById("button-cockslap").addEventListener("click",cockslap);
  1602. document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
  1603. document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
  1604. document.getElementById("button-grind").addEventListener("click",grind);
  1605. document.getElementById("button-stroll").addEventListener("click",toggle_auto);
  1606. document.getElementById("button-location").addEventListener("click",change_location);
  1607. document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
  1608. document.getElementById("button-units").addEventListener("click",toggle_units);
  1609. document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
  1610. document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
  1611. document.getElementById("button-grow-lots").addEventListener("click",grow_lots);
  1612. document.getElementById("button-amount-1").addEventListener("click",function() { grow_pick(1); });
  1613. document.getElementById("button-amount-5").addEventListener("click",function() { grow_pick(5); });
  1614. document.getElementById("button-amount-10").addEventListener("click",function() { grow_pick(10); });
  1615. document.getElementById("button-amount-20").addEventListener("click",function() { grow_pick(20); });
  1616. document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
  1617. document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });
  1618. document.getElementById("button-load-custom").addEventListener("click",loadSettings);
  1619. document.getElementById("button-save-custom").addEventListener("click",saveSettings);
  1620. document.getElementById("button-start").addEventListener("click",startGame);
  1621. setTimeout(pick_move, 2000);
  1622. });