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ů.
 
 
 

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