big steppy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

1056 wiersze
27 KiB

  1. var things =
  2. {
  3. "Container": Container,
  4. "Person": Person,
  5. "Cow": Cow,
  6. "Empty Car": EmptyCar,
  7. "Car": Car,
  8. "Bus": Bus,
  9. "Tram": Tram,
  10. "Motorcycle": Motorcycle,
  11. "House": House,
  12. "Barn": Barn,
  13. "Small Skyscraper": SmallSkyscraper,
  14. "Train": Train,
  15. "Train Car": TrainCar,
  16. "Parking Garage": ParkingGarage,
  17. "Overpass": Overpass,
  18. "Town": Town,
  19. "City": City,
  20. "Continent": Continent,
  21. "Planet": Planet,
  22. "Star": Star,
  23. "Solar System": SolarSystem,
  24. "Galaxy": Galaxy
  25. };
  26. var areas =
  27. {
  28. "Container": 0,
  29. "Person": 1,
  30. "Cow": 2,
  31. "Car": 4,
  32. "Bus": 12,
  33. "Tram": 20,
  34. "Motorcycle": 2,
  35. "House": 1000,
  36. "Barn": 750,
  37. "Small Skyscraper": 10000,
  38. "Train": 500,
  39. "TrainCar": 500,
  40. "Parking Garage": 5000,
  41. "Overpass": 10000,
  42. "Town": 1e7,
  43. "City": 1e9,
  44. "Continent": 1.5e13,
  45. "Planet": 2.5e14,
  46. "Star": 3e18,
  47. "Solar System": 3e21,
  48. "Galaxy": 2e42,
  49. };
  50. var masses =
  51. {
  52. "Container": 0,
  53. "Person": 80,
  54. "Cow": 300,
  55. "Car": 1000,
  56. "Bus": 5000,
  57. "Tram": 10000,
  58. "Motorcycle": 200,
  59. "House": 10000,
  60. "Barn": 5000,
  61. "Small Skyscraper": 100000,
  62. "Train": 5000,
  63. "Train Car": 5000,
  64. "Parking Garage": 100000,
  65. "Overpass": 100000,
  66. "Town": 1,
  67. "City": 1,
  68. "Continent": 1e12,
  69. "Planet": 5.972e24,
  70. "Star": 1e40,
  71. "Solar System": 1,
  72. "Galaxy": 1
  73. };
  74. var clusters =
  75. {
  76. "Container": 0,
  77. "Person": 5,
  78. "Cow": 15,
  79. "Car": 3,
  80. "Bus": 1,
  81. "Tram": 1,
  82. "Motorcycle": 1,
  83. "House": 20,
  84. "Barn": 1,
  85. "Small Skyscraper": 5,
  86. "Train": 2,
  87. "Train Car": 1,
  88. "Parking Garage": 1,
  89. "Overpass": 1,
  90. "Town": 1,
  91. "City": 1,
  92. "Continent": 5,
  93. "Planet": 1,
  94. "Star": 1,
  95. "Solar System": 1,
  96. "Galaxy": 1
  97. };
  98. // general logic: each step fills in a fraction of the remaining space
  99. function fill_area2(area, weights)
  100. {
  101. result = [];
  102. candidates = [];
  103. for (var key in weights) {
  104. if (weights.hasOwnProperty(key)) {
  105. candidates.push({"name": key, "area": areas[key], "weight": weights[key]});
  106. }
  107. }
  108. candidates = candidates.sort(function (x,y) {
  109. return x.area - y.area;
  110. });
  111. while(candidates.length > 0) {
  112. var candidate = candidates.pop();
  113. if (candidate.area > area)
  114. continue;
  115. var max = Math.floor(area / candidate.area);
  116. var limit = Math.min(max, 100);
  117. var count = 0;
  118. // for small amounts, actually do the randomness
  119. // the first few ones get a much better shot
  120. while (limit > 0) {
  121. if (limit <= clusters[candidate.name])
  122. count += 1;
  123. else
  124. count += Math.random() < candidate.weight ? 1 : 0;
  125. --limit;
  126. }
  127. if (limit < max) {
  128. count += Math.round((max-limit) * candidate.weight);
  129. }
  130. area -= count * candidate.area;
  131. if (count > 0)
  132. result.push(new things[candidate.name](count));
  133. }
  134. return new Container(result);
  135. }
  136. // describes everything in the container
  137. function describe_all(contents,verbose=true) {
  138. var things = [];
  139. for (var key in contents) {
  140. if (contents.hasOwnProperty(key)) {
  141. things.push(contents[key].describe(verbose));
  142. }
  143. }
  144. return merge_things(things);
  145. }
  146. function random_desc(list, odds=1) {
  147. if (Math.random() < odds)
  148. return list[Math.floor(Math.random() * list.length)];
  149. else
  150. return "";
  151. }
  152. // combine strings into a list with proper grammar
  153. function merge_things(list,semicolons=false) {
  154. if (list.length == 0) {
  155. return "";
  156. } else if (list.length == 1) {
  157. return list[0];
  158. } else if (list.length == 2) {
  159. return list[0] + " and " + list[1];
  160. } else {
  161. result = "";
  162. list.slice(0,list.length-1).forEach(function(term) {
  163. result += term + ", ";
  164. })
  165. result += "and " + list[list.length-1]
  166. return result;
  167. }
  168. }
  169. // combine the adjectives for something into a single string
  170. function merge_desc(list) {
  171. result = ""
  172. list.forEach(function(term) {
  173. if (term != "")
  174. result += term + " ";
  175. });
  176. // knock off the last space
  177. if (result.length > 0) {
  178. result = result.substring(0, result.length - 1);
  179. }
  180. return result;
  181. }
  182. // maybe make this something that approximates a
  183. // normal distribution; doing this 15,000,000 times is bad...
  184. // solution: only a few are random lul
  185. // improvement: take up to 100 samples, then use that to scale the final result
  186. function distribution(min, max, samples) {
  187. var result = 0;
  188. var limit = Math.min(100,samples)
  189. if (limit < samples) {
  190. for (var i = 0; i < limit; i++) {
  191. result += (i/10 + 1) * Math.floor(Math.random() * (max - min + 1) + min);
  192. }
  193. result = Math.round((result / 595) * samples * (max - min) + min);
  194. } else {
  195. for (var i = 0; i < limit; i++) {
  196. result += Math.floor(Math.random() * (max - min + 1) + min);
  197. }
  198. }
  199. return result;
  200. }
  201. /* default actions */
  202. function defaultStomp(thing) {
  203. return function (verbose=true,height=10) { return "You crush " + thing.describe(verbose) + " underfoot."};
  204. }
  205. function defaultKick(thing) {
  206. return function(verbose=true,height=10) { return "You punt " + thing.describe(verbose) + ", destroying " + (thing.count > 1 ? "them" : "it") + "."; }
  207. }
  208. function defaultEat(thing) {
  209. return function(verbose=true,height=10) { return "You scoop up " + thing.describe(verbose) + " and swallow " + (thing.count > 1 ? "them" : "it") + " whole."; }
  210. }
  211. function defaultAnalVore(thing) {
  212. return function(verbose=true,height=10) { return "You sit yourself down on " + thing.describe(verbose) + ". " + (thing.count > 1 ? "They slide" : "It slides") + " inside with ease."; }
  213. }
  214. function defaultButtcrush(thing) {
  215. return function(verbose=true,height=10) { return "Your heavy ass obliterates " + thing.describe(verbose) + ". "; }
  216. }
  217. function defaultBreastCrush(thing) {
  218. return function(verbose=true,height=10) { return "Your heavy breasts obliterate " + thing.describe(verbose) + ". "; }
  219. }
  220. function defaultUnbirth(thing) {
  221. return function(verbose=true,height=10) { return "You gasp as you slide " + thing.describe(verbose) + " up your slit. "; }
  222. }
  223. function defaultCockslap(thing) {
  224. return function(verbose=true,height=10) { return "Your swaying shaft crushes " + thing.describe(verbose) + ". "; }
  225. }
  226. function defaultCockVore(thing) {
  227. return function(verbose=true,height=10) { return "You stuff " + thing.describe(verbose) + " into your throbbing shaft, forcing them down to your heavy balls."; }
  228. }
  229. function defaultBallSmother(thing) {
  230. return function(verbose=true,height=10) { return "Your weighty balls spread over " + thing.describe(verbose) + ", smothering them in musk."; }
  231. }
  232. function defaultMaleOrgasm(thing) {
  233. return function(verbose=true,height=10) { return "You're cumming! Your thick cock spurts out $VOLUME of seed, splooging " + thing.describe(verbose) + "."; }
  234. }
  235. function defaultFemaleOrgasm(thing) {
  236. return function(verbose=true,height=10) { return "You're cumming! Your moist slit sprays $VOLUME of slick femcum, splooging " + thing.describe(verbose) + "."; }
  237. }
  238. function defaultArea(thing) {
  239. return areas[thing.name];
  240. }
  241. function defaultMass(thing) {
  242. return masses[thing.name];
  243. }
  244. function defaultMerge(thing) {
  245. return function(container) {
  246. var newCount = this.count + container.count;
  247. var newThing = new things[thing.name](newCount);
  248. newThing.contents = {};
  249. for (var key in this.contents) {
  250. if (this.contents.hasOwnProperty(key)) {
  251. newThing.contents[key] = this.contents[key];
  252. }
  253. }
  254. for (var key in container.contents) {
  255. if (container.contents.hasOwnProperty(key)) {
  256. if (this.contents.hasOwnProperty(key)) {
  257. newThing.contents[key] = this.contents[key].merge(container.contents[key]);
  258. } else {
  259. newThing.contents[key] = container.contents[key];
  260. }
  261. }
  262. }
  263. return newThing;
  264. }
  265. }
  266. function defaultSum(thing) {
  267. return function() {
  268. var counts = {}
  269. if (thing.name != "Container")
  270. counts[thing.name] = thing.count;
  271. for (var key in thing.contents) {
  272. if (thing.contents.hasOwnProperty(key)) {
  273. subcount = thing.contents[key].sum();
  274. for (var subkey in subcount) {
  275. if (!counts.hasOwnProperty(subkey)) {
  276. counts[subkey] = 0;
  277. }
  278. counts[subkey] += subcount[subkey];
  279. }
  280. }
  281. }
  282. return counts;
  283. }
  284. }
  285. function defaultSumProperty(thing) {
  286. return function(prop) {
  287. var total = 0;
  288. total += thing[prop] * thing.count;
  289. for (var key in thing.contents) {
  290. if (thing.contents.hasOwnProperty(key)) {
  291. total += thing.contents[key].sum_property(prop);
  292. }
  293. }
  294. return total;
  295. }
  296. }
  297. function defaultAddContent(thing) {
  298. return function(name, min, max, count) {
  299. if (min == max) {
  300. var object = new things[name](min*count);
  301. thing.contents[object.name] = object;
  302. } else {
  303. var object = new things[name](distribution(min, max, count));
  304. thing.contents[object.name] = object;
  305. }
  306. }
  307. }
  308. function DefaultEntity() {
  309. this.sum = defaultSum;
  310. this.area = defaultArea;
  311. this.mass = defaultMass;
  312. this.sum_property = defaultSumProperty;
  313. this.merge = defaultMerge;
  314. this.addContent = defaultAddContent;
  315. return this;
  316. }
  317. // god I love reinventing the wheel
  318. function copy_defaults(self,proto) {
  319. for (var key in proto) {
  320. if (proto.hasOwnProperty(key)) {
  321. self[key] = proto[key](self)
  322. }
  323. }
  324. }
  325. function Container(contents = []) {
  326. this.name = "Container";
  327. copy_defaults(this,new DefaultEntity());
  328. this.count = 0;
  329. this.contents = {}
  330. for (var i=0; i < contents.length; i++) {
  331. this.contents[contents[i].name] = contents[i];
  332. }
  333. for (var key in this.contents) {
  334. if (this.contents.hasOwnProperty(key)) {
  335. this.count += this.contents[key].count;
  336. }
  337. }
  338. this.describe = function(verbose = true) {
  339. return describe_all(this.contents,verbose)
  340. }
  341. this.eat = function(verbose=true) {
  342. var line = containerEat(this,verbose);
  343. if (line == "")
  344. return defaultEat(this)(verbose);
  345. else
  346. return line;
  347. };
  348. this.stomp = defaultStomp(this);
  349. this.eat = defaultEat(this);
  350. this.kick = defaultKick(this);
  351. this.anal_vore = defaultAnalVore(this);
  352. this.buttcrush = defaultButtcrush(this);
  353. this.breast_crush = defaultBreastCrush(this);
  354. this.unbirth = defaultUnbirth(this);
  355. this.cockslap = defaultCockslap(this);
  356. this.cock_vore = defaultCockVore(this);
  357. this.ball_smother = defaultBallSmother(this);
  358. this.male_orgasm = defaultMaleOrgasm(this);
  359. this.female_orgasm = defaultFemaleOrgasm(this);
  360. return this;
  361. }
  362. function Person(count = 1) {
  363. this.name = "Person";
  364. copy_defaults(this,new DefaultEntity());
  365. this.count = count;
  366. this.contents = {};
  367. this.describeOne = function (verbose=true) {
  368. body = random_desc(["skinny","fat","tall","short","stocky","spindly"], (verbose ? 0.6 : 0));
  369. sex = random_desc(["male", "female"], (verbose ? 1 : 0));
  370. species = random_desc(["wolf","cat","dog","squirrel","horse","hyena","fox","jackal","crux","sergal"]);
  371. return "a " + merge_desc([body,sex,species]);
  372. }
  373. this.describe = function(verbose=true) {
  374. if (verbose) {
  375. if (count <= 3) {
  376. list = [];
  377. for (var i = 0; i < count; i++) {
  378. list.push(this.describeOne(this.count <= 2));
  379. }
  380. return merge_things(list);
  381. } else {
  382. return this.count + " people"
  383. }
  384. } else {
  385. return (this.count > 1 ? this.count + " people" : "a person");
  386. }
  387. }
  388. this.stomp = function(verbose=true) {
  389. var line = personStomp(this);
  390. if (line == "")
  391. return defaultStomp(this)(verbose);
  392. else
  393. return line;
  394. };
  395. this.eat = function(verbose=true) {
  396. var line = personEat(this);
  397. if (line == "")
  398. return defaultEat(this)(verbose);
  399. else
  400. return line;
  401. };
  402. return this;
  403. }
  404. function Cow(count = 1) {
  405. this.name = "Cow";
  406. copy_defaults(this,new DefaultEntity());
  407. this.count = count;
  408. this.contents = {};
  409. this.describeOne = function (verbose=true) {
  410. body = random_desc(["skinny","fat","tall","short","stocky","spindly"], (verbose ? 0.6 : 0));
  411. sex = random_desc(["male", "female"], (verbose ? 1 : 0));
  412. return "a " + merge_desc([body,sex,"cow"]);
  413. }
  414. this.describe = function(verbose=true) {
  415. if (verbose) {
  416. if (count <= 3) {
  417. list = [];
  418. for (var i = 0; i < count; i++) {
  419. list.push(this.describeOne(this.count <= 2));
  420. }
  421. return merge_things(list);
  422. } else {
  423. return this.count + " cattle"
  424. }
  425. } else {
  426. return (this.count > 1 ? this.count + " cattle" : "a cow");
  427. }
  428. }
  429. return this;
  430. }
  431. function EmptyCar(count = 1) {
  432. this.name = "Car";
  433. copy_defaults(this,new DefaultEntity());
  434. this.count = count;
  435. this.contents = {};
  436. this.describeOne = function(verbose=true) {
  437. color = random_desc(["black","black","gray","gray","blue","red","tan","white","white"]);
  438. adjective = random_desc(["rusty","brand-new"],0.3);
  439. type = random_desc(["SUV","coupe","sedan","truck","van","convertible"]);
  440. return "a parked " + merge_desc([adjective,color,type]);
  441. }
  442. this.describe = function(verbose = true) {
  443. if (verbose) {
  444. if (this.count <= 3) {
  445. list = [];
  446. for (var i = 0; i < this.count; i++) {
  447. list.push(this.describeOne());
  448. }
  449. return merge_things(list);
  450. } else {
  451. return this.count + " parked cars";
  452. }
  453. } else {
  454. return (this.count > 1 ? this.count + " parked cars" : "a parked car");
  455. }
  456. }
  457. }
  458. function Car(count = 1) {
  459. this.name = "Car";
  460. copy_defaults(this,new DefaultEntity());
  461. this.count = count;
  462. this.contents = {};
  463. this.addContent("Person", 2, 5, count);
  464. this.describeOne = function(verbose=true) {
  465. color = random_desc(["black","black","gray","gray","blue","red","tan","white","white"], (verbose ? 1 : 0));
  466. adjective = random_desc(["rusty","brand-new"], (verbose ? 0.3 : 0));
  467. type = random_desc(["SUV","coupe","sedan","truck","van","convertible"]);
  468. return "a " + merge_desc([adjective,color,type]);
  469. }
  470. this.describe = function(verbose = true) {
  471. if (verbose) {
  472. if (this.count <= 3) {
  473. list = [];
  474. for (var i = 0; i < this.count; i++) {
  475. list.push(this.describeOne(this.count < 2));
  476. }
  477. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  478. } else {
  479. return this.count + " cars with " + describe_all(this.contents,verbose) + " inside";
  480. }
  481. } else {
  482. return (this.count > 1 ? this.count + " cars" : "a car");
  483. }
  484. }
  485. }
  486. function Bus(count = 1) {
  487. this.name = "Bus";
  488. copy_defaults(this,new DefaultEntity());
  489. this.count = count;
  490. this.contents = {};
  491. this.addContent("Person",10,35,count);
  492. this.describeOne = function(verbose=true) {
  493. adjective = random_desc(["rusty","brand-new"], (verbose ? 0.3 : 0));
  494. color = random_desc(["black","tan","gray"], (verbose ? 1 : 0));
  495. type = random_desc(["bus","double-decker bus","articulating bus"]);
  496. return "a " + merge_desc([adjective,color,type]);
  497. }
  498. this.describe = function(verbose = true) {
  499. if (verbose) {
  500. if (this.count <= 3) {
  501. list = [];
  502. for (var i = 0; i < this.count; i++) {
  503. list.push(this.describeOne(this.count < 2));
  504. }
  505. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  506. } else {
  507. return this.count + " buses with " + describe_all(this.contents,verbose) + " inside";
  508. }
  509. } else {
  510. return (this.count > 1 ? this.count + " buses" : "a bus");
  511. }
  512. }
  513. }
  514. function Tram(count = 1) {
  515. this.name = "Tram";
  516. copy_defaults(this,new DefaultEntity());
  517. this.count = count;
  518. this.contents = {};
  519. this.addContent("Person",40,60,count);
  520. this.describeOne = function(verbose=true) {
  521. adjective = random_desc(["rusty","weathered"], (verbose ? 0.3 : 0));
  522. color = random_desc(["blue","brown","gray"], (verbose ? 1 : 0));
  523. type = random_desc(["tram"]);
  524. return "a " + merge_desc([adjective,color,type]);
  525. }
  526. this.describe = function(verbose = true) {
  527. if (verbose) {
  528. if (this.count == 1) {
  529. list = [];
  530. for (var i = 0; i < this.count; i++) {
  531. list.push(this.describeOne(verbose));
  532. }
  533. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  534. } else {
  535. return this.count + " trams with " + describe_all(this.contents,verbose) + " inside";
  536. }
  537. } else {
  538. return (this.count > 1 ? this.count + " trams" : "a tram");
  539. }
  540. }
  541. this.anal_vore = function() {
  542. return "You slide " + this.describe() + " up your tight ass";
  543. }
  544. }
  545. function Motorcycle(count = 1) {
  546. this.name = "Motorcycle";
  547. copy_defaults(this,new DefaultEntity());
  548. this.count = count;
  549. this.contents = {};
  550. this.addContent("Person",1,2,count);
  551. }
  552. function Train(count = 1) {
  553. this.name = "Train";
  554. copy_defaults(this,new DefaultEntity());
  555. this.count = count;
  556. this.contents = {};
  557. this.addContent("Person", 1, 4, count);
  558. this.addContent("Train Car", 2, 10, count);
  559. this.describeOne = function(verbose=true) {
  560. adjective = random_desc(["rusty","brand-new"], (verbose ? 0.3 : 0));
  561. color = random_desc(["black","tan","gray"], (verbose ? 1 : 0));
  562. type = random_desc(["train","passenger train","freight train"]);
  563. return "a " + merge_desc([adjective,color,type]);
  564. }
  565. this.describe = function(verbose = true) {
  566. if (verbose) {
  567. if (this.count == 1) {
  568. list = [];
  569. for (var i = 0; i < this.count; i++) {
  570. list.push(this.describeOne(verbose));
  571. }
  572. return merge_things(list) + " with " + this.contents["Person"].describe(false) + " in the engine and " + this.contents["Train Car"].describe() + " attached";
  573. } else {
  574. return this.count + " trains with " + this.contents["Person"].describe(false) + " in the engine and " + this.contents["Train Car"].describe() + " attached";
  575. }
  576. } else {
  577. return (this.count > 1 ? this.count + " trains" : "a train");
  578. }
  579. }
  580. this.anal_vore = function() {
  581. var cars = (this.contents["Train Car"].count == 1 ? this.contents["Train Car"].describe() + " follows it inside" : this.contents["Train Car"].describe() + " are pulled slowly inside");
  582. return "You snatch up " + this.describeOne() + " and stuff it into your pucker, moaning as " + cars;
  583. }
  584. }
  585. function TrainCar(count = 1) {
  586. this.name = "Train Car";
  587. copy_defaults(this,new DefaultEntity());
  588. this.count = count;
  589. this.contents = {};
  590. this.addContent("Person",10,40,count);
  591. this.describeOne = function(verbose=true) {
  592. adjective = random_desc(["rusty","brand-new"], (verbose ? 0.3 : 0));
  593. color = random_desc(["black","tan","gray"], (verbose ? 1 : 0));
  594. type = random_desc(["train car","passenger train car","freight train car"]);
  595. return "a " + merge_desc([adjective,color,type]);
  596. }
  597. this.describe = function(verbose = true) {
  598. if (verbose) {
  599. if (this.count <= 3) {
  600. list = [];
  601. for (var i = 0; i < this.count; i++) {
  602. list.push(this.describeOne(this.count < 2));
  603. }
  604. return merge_things(list) + " with " + describe_all(this.contents) + " inside";
  605. } else {
  606. return this.count + " train cars with " + describe_all(this.contents) + " inside";
  607. }
  608. } else {
  609. return (this.count > 1 ? this.count + " train cars" : "a train car");
  610. }
  611. }
  612. }
  613. function House(count = 1) {
  614. this.name = "House";
  615. copy_defaults(this,new DefaultEntity());
  616. this.count = count;
  617. this.contents = {};
  618. this.addContent("Person",0,8,count);
  619. this.addContent("Empty Car",0,2,count);
  620. this.describeOne = function(verbose=true) {
  621. size = random_desc(["little","two-story","large"], (verbose ? 0.5 : 0));
  622. color = random_desc(["blue","white","gray","tan","green"], (verbose ? 0.5 : 0));
  623. name = random_desc(["house","house","house","house","house","trailer"], 1);
  624. return "a " + merge_desc([size,color,name]);
  625. }
  626. this.describe = function(verbose = true) {
  627. if (verbose) {
  628. if (this.count <= 3) {
  629. list = [];
  630. for (var i = 0; i < this.count; i++) {
  631. list.push(this.describeOne(this.count < 2));
  632. }
  633. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  634. } else {
  635. return this.count + " homes with " + describe_all(this.contents,verbose) + " inside";
  636. }
  637. } else {
  638. return (this.count > 1 ? this.count + " houses" : "a house");
  639. }
  640. }
  641. }
  642. function Barn(count = 1) {
  643. this.name = "Barn";
  644. copy_defaults(this,new DefaultEntity());
  645. this.count = count;
  646. this.contents = {};
  647. this.addContent("Person",0,2,count);
  648. this.addContent("Cow",30,70,count);
  649. this.describeOne = function(verbose=true) {
  650. size = random_desc(["little","big","large"], (verbose ? 0.5 : 0));
  651. color = random_desc(["blue","white","gray","tan","green"], (verbose ? 0.5 : 0));
  652. name = random_desc(["barn","barn","barn","barn","barn","farmhouse"], 1);
  653. return "a " + merge_desc([size,color,name]);
  654. }
  655. this.describe = function(verbose = true) {
  656. if (verbose) {
  657. if (this.count <= 3) {
  658. list = [];
  659. for (var i = 0; i < this.count; i++) {
  660. list.push(this.describeOne(this.count < 2));
  661. }
  662. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  663. } else {
  664. return this.count + " barns with " + describe_all(this.contents,verbose) + " inside";
  665. }
  666. } else {
  667. return (this.count > 1 ? this.count + " barns" : "a barn");
  668. }
  669. }
  670. }
  671. function SmallSkyscraper(count = 1) {
  672. this.name = "Small Skyscraper";
  673. copy_defaults(this,new DefaultEntity());
  674. this.count = count;
  675. this.contents = {};
  676. this.addContent("Person",50,500,count);
  677. this.addContent("Empty Car",10,50,count);
  678. this.describeOne = function(verbose=true) {
  679. color = random_desc(["blue","white","gray","tan","green"], (verbose ? 0.5 : 0));
  680. name = random_desc(["skyscraper","office tower","office building"], 1);
  681. return "a " + merge_desc([color,name]);
  682. }
  683. this.describe = function(verbose = true) {
  684. if (verbose) {
  685. if (this.count <= 3) {
  686. list = [];
  687. for (var i = 0; i < this.count; i++) {
  688. list.push(this.describeOne(this.count < 2));
  689. }
  690. return merge_things(list) + " with " + describe_all(this.contents,verbose) + " inside";
  691. } else {
  692. return this.count + " small skyscrapers with " + describe_all(this.contents,verbose) + " inside";
  693. }
  694. } else {
  695. return (this.count > 1 ? this.count + " skyscrapers" : "a skyscraper");
  696. }
  697. }
  698. this.anal_vore = function(verbose=true,height=10) {
  699. var line = skyscraperAnalVore(this,verbose,height);
  700. if (line == "")
  701. return defaultAnalVore(this)(verbose);
  702. else
  703. return line;
  704. };
  705. }
  706. function ParkingGarage(count = 1) {
  707. this.name = "Parking Garage";
  708. copy_defaults(this,new DefaultEntity());
  709. this.count = count;
  710. this.contents = {};
  711. this.addContent("Person",10,200,count);
  712. this.addContent("Empty Car",30,100,count);
  713. this.addContent("Car",5,30,count);
  714. this.describeOne = function(verbose=true) {
  715. return "a parking garage";
  716. }
  717. this.describe = function(verbose = true) {
  718. if (verbose) {
  719. return (this.count == 1 ? "a parking garage" : this.count + " parking garages") + " with " + describe_all(this.contents, verbose) + " inside";
  720. } else {
  721. return (this.count == 1 ? "a parking garage" : this.count + " parking garages");
  722. }
  723. }
  724. }
  725. function Overpass(count = 1) {
  726. this.name = "Overpass";
  727. copy_defaults(this,new DefaultEntity());
  728. this.count = count;
  729. this.contents = {};
  730. this.addContent("Person",0,20,count);
  731. this.addContent("Car",25,100,count);
  732. }
  733. function Town(count = 1) {
  734. this.name = "Town";
  735. copy_defaults(this,new DefaultEntity());
  736. this.count = count;
  737. this.contents = {};
  738. this.addContent("Person",1000,15000,count);
  739. this.addContent("House",500,10000,count);
  740. this.addContent("Empty Car",250,3750,count);
  741. this.addContent("Car",250,3750,count);
  742. this.addContent("Train",5,10,count);
  743. this.addContent("Small Skyscraper",2,10,count);
  744. this.addContent("Parking Garage",1,5,count);
  745. this.describe = function(verbose = true) {
  746. if (verbose) {
  747. return (this.count == 1 ? "a town" : this.count + " towns") + " with " + describe_all(this.contents, verbose) + " in " + (this.count == 1 ? "it" : "them");
  748. } else {
  749. return (this.count == 1 ? "a town" : this.count + " towns");
  750. }
  751. }
  752. }
  753. function City(count = 1) {
  754. this.name = "City";
  755. copy_defaults(this,new DefaultEntity());
  756. this.count = count;
  757. this.contents = {};
  758. this.addContent("Person",10000,150000,count);
  759. this.addContent("House",5000,100000,count);
  760. this.addContent("Empty Car",2500,37500,count);
  761. this.addContent("Car",2500,37500,count);
  762. this.addContent("Train",50,100,count);
  763. this.addContent("Tram",100,300,count);
  764. this.addContent("Small Skyscraper",20,100,count);
  765. this.addContent("Parking Garage",10,50,count);
  766. this.describe = function(verbose = true) {
  767. if (verbose) {
  768. return (this.count == 1 ? "a city" : this.count + " cities") + " with " + describe_all(this.contents, verbose) + " in " + (this.count == 1 ? "it" : "them");
  769. } else {
  770. return (this.count == 1 ? "a city" : this.count + " cities");
  771. }
  772. }
  773. }
  774. function Continent(count = 1) {
  775. this.name = "Continent";
  776. copy_defaults(this,new DefaultEntity());
  777. this.count = count;
  778. this.contents = {};
  779. this.addContent("Person",100000,1500000,count);
  780. this.addContent("House",5000,100000,count);
  781. this.addContent("Car",25000,375000,count);
  782. this.addContent("Train",500,1000,count);
  783. this.addContent("Town",2000,5000,count);
  784. this.addContent("City",200,500,count);
  785. this.describe = function(verbose = true) {
  786. if (verbose) {
  787. return (this.count == 1 ? "a continent" : this.count + " continents") + " with " + describe_all(this.contents, verbose) + " on " + (this.count == 1 ? "it" : "them");
  788. } else {
  789. return (this.count == 1 ? "a continent" : this.count + " continents");
  790. }
  791. }
  792. }
  793. function Planet(count = 1) {
  794. this.name = "Planet";
  795. copy_defaults(this,new DefaultEntity());
  796. this.count = count;
  797. this.contents = {};
  798. this.addContent("Continent",4,9,count);
  799. this.describe = function(verbose = true) {
  800. if (verbose) {
  801. return (this.count == 1 ? "a planet" : this.count + " planets") + " with " + describe_all(this.contents, verbose) + " on " + (this.count == 1 ? "it" : "them");
  802. } else {
  803. return (this.count == 1 ? "a planet" : this.count + " planets");
  804. }
  805. }
  806. }
  807. function Star(count = 1) {
  808. this.name = "Star";
  809. copy_defaults(this,new DefaultEntity());
  810. this.count = count;
  811. this.contents = {};
  812. this.describe = function(verbose = true) {
  813. return (this.count == 1 ? "a star" : this.count + " stars");
  814. }
  815. }
  816. function SolarSystem(count = 1) {
  817. this.name = "Solar System";
  818. copy_defaults(this,new DefaultEntity());
  819. this.count = count;
  820. this.contents = {};
  821. this.addContent("Star",1,1,count);
  822. this.addContent("Planet",5,15,count);
  823. this.describe = function(verbose = true) {
  824. if (verbose) {
  825. return (this.count == 1 ? "a solar system" : this.count + " solar systems") + " made up of " + describe_all(this.contents, verbose);
  826. } else {
  827. return (this.count == 1 ? "a solar system" : this.count + " solar systems");
  828. }
  829. }
  830. }
  831. function Galaxy(count = 1) {
  832. this.name = "Galaxy";
  833. copy_defaults(this,new DefaultEntity());
  834. this.count = count;
  835. this.contents = {};
  836. this.addContent("Star",1e9,500e9,count);
  837. this.addContent("Solar System",1e8,500e8,count);
  838. this.describe = function(verbose = true) {
  839. if (verbose) {
  840. return (this.count == 1 ? "a galaxy" : this.count + " galaxies") + " made up of " + describe_all(this.contents, verbose);
  841. } else {
  842. return (this.count == 1 ? "a galaxy" : this.count + " galaxies");
  843. }
  844. }
  845. }