a munch adventure
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

379 行
11 KiB

  1. (() => {
  2. function checkSuspicion(state, add=0) {
  3. state.player.stats.suspicion.value += add;
  4. if (state.player.stats.suspicion.value >= 100) {
  5. print(["Geta spots you!", "You're snatched up and tossed into the fox's bowl of cereal."]);
  6. goToRoom("in-bowl", state);
  7. return false;
  8. }
  9. return true;
  10. }
  11. stories.push({
  12. "id": "unaware-geta",
  13. "name": "Geta's Breakfast",
  14. "tags": [
  15. "Player Prey",
  16. "Digestion",
  17. "Macro/Micro"
  18. ],
  19. "intro": {
  20. "start": "pepper-grinder",
  21. "setup": state => {
  22. state.player.stats.suspicion = {name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)"};
  23. },
  24. "intro": state => {
  25. print(["Game started"]);
  26. }
  27. },
  28. "sounds": [
  29. ],
  30. "preload": [
  31. ],
  32. "world": {
  33. "pepper-grinder": {
  34. "id": "pepper-grinder",
  35. "name": "Pepper Grinder",
  36. "desc": "You're hiding behind a pepper grinder",
  37. "move": (room, state) => {
  38. print(["You dart over to the pepper grinder, which looms over you like a greatwood."]);
  39. },
  40. "enter": (room, state) => {
  41. },
  42. "exit": (room, state) => {
  43. },
  44. "actions": [
  45. {
  46. name: "Tap",
  47. desc: "Bang on the pepper shaker",
  48. execute: (room, state) => {
  49. print(["You thump the pepper shaker, making a dull thud."]);
  50. checkSuspicion(state, 25);
  51. },
  52. show: [
  53. ],
  54. conditions: [
  55. ]
  56. },
  57. ],
  58. "exits": {
  59. "up": {
  60. "target": "bowl",
  61. "desc": "Walk up to the cereal bowl",
  62. "show": [
  63. ],
  64. "conditions": [
  65. ],
  66. "hooks": [
  67. (room, exit, state) => {
  68. return checkSuspicion(state, 10);
  69. }
  70. ]
  71. },
  72. },
  73. "hooks": [
  74. ],
  75. "data": {
  76. "stats": {
  77. }
  78. }
  79. },
  80. "bowl": {
  81. "id": "bowl",
  82. "name": "Behind the Bowl",
  83. "desc": "You're crouched behind Geta's bowl of cereal",
  84. "move": (room, state) => {
  85. print(["You scurry up to the looming bowl, staying low and out of Geta's sight."]);
  86. },
  87. "enter": (room, state) => {
  88. },
  89. "exit": (room, state) => {
  90. },
  91. "actions": [
  92. ],
  93. "exits": {
  94. "ascend": {
  95. "target": "in-bowl",
  96. "desc": "Climb into Geta's cereal",
  97. "show": [
  98. ],
  99. "conditions": [
  100. ],
  101. "hooks": [
  102. ]
  103. },
  104. "down": {
  105. "target": "pepper-grinder",
  106. "desc": "Run back behind the pepper grinder",
  107. "show": [
  108. ],
  109. "conditions": [
  110. ],
  111. "hooks": [
  112. ]
  113. },
  114. },
  115. "hooks": [
  116. ],
  117. "data": {
  118. "stats": {
  119. }
  120. }
  121. },
  122. "in-bowl": {
  123. "id": "in-bowl",
  124. "name": "Bowl",
  125. "desc": "You're in the cereal bowl...",
  126. "move": (room, state) => {
  127. print(["Why did you do that?"]);
  128. },
  129. "enter": (room, state) => {
  130. startTimer({
  131. id: "geta-eat",
  132. func: state => {
  133. if (Math.random() < 0.6) {
  134. print(["Geta scoops up a spoonful of cereal; you narrowly avoid being caught."]);
  135. return true;
  136. } else {
  137. print(["Geta scoops you up and slurps you into his maw."]);
  138. goToRoom("maw", state);
  139. return false;
  140. }
  141. },
  142. delay: 3000,
  143. loop: true,
  144. classes: [
  145. ]
  146. }, state);
  147. },
  148. "exit": (room, state) => {
  149. },
  150. "actions": [
  151. ],
  152. "exits": {
  153. },
  154. "hooks": [
  155. ],
  156. "data": {
  157. "stats": {
  158. }
  159. }
  160. },
  161. "maw": {
  162. "id": "maw",
  163. "name": "Geta's Maw",
  164. "desc": "You've been slurped up into the fox's jaws",
  165. "move": (room, state) => {
  166. },
  167. "enter": (room, state) => {
  168. startTimer({
  169. id: "swallow",
  170. func: state => {
  171. print(["It's too late to escape. You're swallowed down."]);
  172. goToRoom("throat", state);
  173. return true;
  174. },
  175. delay: 5000,
  176. loop: false,
  177. classes: [
  178. ]
  179. }, state);
  180. },
  181. "exit": (room, state) => {
  182. },
  183. "actions": [
  184. ],
  185. "exits": {
  186. },
  187. "hooks": [
  188. ],
  189. "data": {
  190. "stats": {
  191. }
  192. }
  193. },
  194. "throat": {
  195. "id": "throat",
  196. "name": "Geta's Gullet",
  197. "desc": "GULP!",
  198. "move": (room, state) => {
  199. },
  200. "enter": (room, state) => {
  201. startTimer({
  202. id: "gut",
  203. func: state => {
  204. print(["You slush down into Geta's stomach"]);
  205. goToRoom("stomach", state);
  206. return true;
  207. },
  208. delay: 7000,
  209. loop: false,
  210. classes: [
  211. ]
  212. }, state);
  213. },
  214. "exit": (room, state) => {
  215. },
  216. "actions": [
  217. ],
  218. "exits": {
  219. },
  220. "hooks": [
  221. ],
  222. "data": {
  223. "stats": {
  224. }
  225. }
  226. },
  227. "stomach": {
  228. "id": "stomach",
  229. "name": "Geta's Stomach",
  230. "desc": "Glorp",
  231. "move": (room, state) => {
  232. },
  233. "enter": (room, state) => {
  234. startTimer({
  235. id: "digest",
  236. func: state => {
  237. print(["You're digested before too long."]);
  238. goToRoom("digested", state);
  239. return true;
  240. },
  241. delay: 10000,
  242. loop: false,
  243. classes: [
  244. ]
  245. }, state);
  246. },
  247. "exit": (room, state) => {
  248. },
  249. "actions": [
  250. {
  251. name: "Squirm",
  252. desc: "Rub at the walls of the fox's churning stomach",
  253. execute: (room, state) => {
  254. printRandom([
  255. ["You punch and kick at the walls"],
  256. ["A powerful churn grabs hold of you, stifling any attempts at struggling"],
  257. ["Your little thumps and kicks do little to faze your captor"]
  258. ]);
  259. },
  260. show: [
  261. ],
  262. conditions: [
  263. ]
  264. },
  265. ],
  266. "exits": {
  267. },
  268. "hooks": [
  269. ],
  270. "data": {
  271. "stats": {
  272. }
  273. }
  274. },
  275. "digested": {
  276. "id": "digested",
  277. "name": "Fat",
  278. "desc": "You're just fat now",
  279. "move": (room, state) => {
  280. },
  281. "enter": (room, state) => {
  282. },
  283. "exit": (room, state) => {
  284. },
  285. "actions": [
  286. {
  287. name: "Gurgle",
  288. desc: "Glorp",
  289. execute: (room, state) => {
  290. printRandom([
  291. ["Grrrrgle"],
  292. ["Glorp"],
  293. ["Glrrrrrrnnnnnn..."],
  294. ["Gwoooooorgle"]
  295. ]);
  296. },
  297. show: [
  298. ],
  299. conditions: [
  300. ]
  301. },
  302. ],
  303. "exits": {
  304. },
  305. "hooks": [
  306. ],
  307. "data": {
  308. "stats": {
  309. }
  310. }
  311. },
  312. }
  313. });
  314. })();