big steppy
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

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