big steppy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

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