munch
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ů.
 
 
 

68 řádky
1.2 KiB

  1. function Object(name="Potato") {
  2. this.name = name;
  3. this.actions = [];
  4. }
  5. function Burger() {
  6. Object.call(this, "Burger");
  7. this.actions.push({
  8. "name": "Punch Burger",
  9. "action": function() {
  10. player.health += 10;
  11. update(["You punch the hamburger."]);
  12. }
  13. });
  14. }
  15. function Nerd() {
  16. Object.call(this, "Nerd");
  17. this.actions.push({
  18. "name": "Eat Nerd",
  19. "action": function() {
  20. startDialog(new EatDude());
  21. }
  22. });
  23. }
  24. function Toilet() {
  25. Object.call(this, "Toilet");
  26. this.actions.push({
  27. "name": "Admire toilet",
  28. "action": function() {
  29. update(["You admire the toilet."]);
  30. }
  31. });
  32. }
  33. function TV() {
  34. Object.call(this, "TV");
  35. this.actions.push({
  36. "name": "Watch TV",
  37. "action": function() {
  38. update(["Reruns, again."]);
  39. }
  40. });
  41. }
  42. function Phone() {
  43. Object.call(this, "Phone");
  44. this.actions.push({
  45. "name": "Use phone",
  46. "action": function() {
  47. startDialog(new PhoneCall());
  48. }
  49. });
  50. }
  51. function Bed() {
  52. Object.call(this, "Bed");
  53. this.actions.push({
  54. "name": "Sleep",
  55. "action": function() {
  56. update(["You take a nap."]);
  57. advanceTime(2700);
  58. updateDisplay();
  59. }
  60. });
  61. }