munch
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

117 líneas
2.3 KiB

  1. "use strict";
  2. function GameObject(name="Potato") {
  3. this.name = name;
  4. this.actions = [];
  5. }
  6. function Burger() {
  7. GameObject.call(this, "Burger");
  8. this.actions.push({
  9. "name": "Punch Burger",
  10. "action": function() {
  11. player.health += 10;
  12. update(["You punch the hamburger."]);
  13. }
  14. });
  15. }
  16. function Nerd() {
  17. GameObject.call(this, "Nerd");
  18. this.actions.push({
  19. "name": "Eat Nerd",
  20. "action": function() {
  21. startDialog(new EatDude());
  22. }
  23. });
  24. }
  25. function Toilet() {
  26. GameObject.call(this, "Toilet");
  27. this.actions.push({
  28. "name": "Admire toilet",
  29. "action": function() {
  30. update(["You admire the toilet."]);
  31. }
  32. });
  33. this.actions.push({
  34. "name": "Use toilet",
  35. "action": function() {
  36. let lines = [];
  37. lines.push("You sit down on the toilet.");
  38. if (player.bowels.fullness == 0) {
  39. lines.push("But nothing happens.");
  40. } else {
  41. lines.push("You grunt and clench, squeezing out the remains of your former prey.");
  42. }
  43. if (player.bowels.contents.length > 0) {
  44. lines.push("The remains of " + join(player.bowels.contents) + " empty into the sewers as you flush them away.");
  45. }
  46. player.bowels.contents = [];
  47. update(lines);
  48. },
  49. "conditions": [
  50. function(prefs) {
  51. return prefs.player.scat == true;
  52. }
  53. ]
  54. });
  55. }
  56. function TV() {
  57. GameObject.call(this, "TV");
  58. this.actions.push({
  59. "name": "Watch TV",
  60. "action": function() {
  61. update(["Reruns, again."]);
  62. }
  63. });
  64. }
  65. function Phone() {
  66. GameObject.call(this, "Phone");
  67. this.actions.push({
  68. "name": "Use phone",
  69. "action": function() {
  70. startDialog(new PhoneCall());
  71. }
  72. });
  73. }
  74. function Bed() {
  75. GameObject.call(this, "Bed");
  76. this.actions.push({
  77. "name": "Sleep",
  78. "action": function() {
  79. update(["You take a nap."]);
  80. advanceTime(2700);
  81. updateDisplay();
  82. }
  83. });
  84. }
  85. function Sofa() {
  86. GameObject.call(this, "Sofa");
  87. this.actions.push({
  88. "name": "Sit on sofa",
  89. "action": function(){
  90. startDialog(SofaSit());
  91. }
  92. });
  93. }
  94. function NatureTrailExercise() {
  95. GameObject.call(this, "Exercise");
  96. this.actions.push({
  97. "name": "Exercise",
  98. "action": function() {
  99. startDialog(new NatureExercise());
  100. }
  101. });
  102. }