crunch
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

78 строки
1.3 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. }
  62. function Sofa() {
  63. Object.call(this, "Sofa");
  64. this.actions.push({
  65. "name": "Sit on sofa",
  66. "action": function(){
  67. startDialog(SofaSit());
  68. }
  69. })
  70. }