big steppy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

1674 lignes
45 KiB

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