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

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