big steppy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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