koishi-plugin-rusty-lake-lizard 0.0.6 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
8
  var __export = (target, all) => {
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
@@ -27,84 +37,32 @@ __export(src_exports, {
27
37
  usage: () => usage
28
38
  });
29
39
  module.exports = __toCommonJS(src_exports);
30
- var import_koishi = require("koishi");
31
- var import_url = require("url");
32
- var import_path = require("path");
33
- var inject = ["database"];
34
- var name = "rusty-lake-lizard";
35
- var usage = `
36
- # 🦎rusty-lake-lizard
37
- ### 这是一个交互式解谜游戏插件。在游戏中,玩家将置身于一个神秘的房间中,通过探索、收集物品、解锁谜题和机关,逐步揭开真相。
38
- ---
39
- ## ✨ 游戏简介
40
- ### 玩家以第一人称视角探索一个复杂而神秘的房间系统。
41
- - ### 每个房间都有独特的描述、物品和谜题。
42
- - ### 需要通过逻辑推理和物品交互解锁通往其他房间的通路。
43
- - ### 游戏记录会自动保存,方便随时中断和继续游戏。
44
- ---
45
- ## 🕹️ 使用指令
46
-
47
- <details>
48
- <summary>📜 游戏数据记录</summary>
49
-
50
- - ### 锈湖 新建
51
- - 新建游戏房间
52
- - ### 锈湖 加入
53
- - 加入现有游戏房间
54
- - ### 锈湖 删除
55
- - 清除游戏房间
56
- </details>
57
-
58
- <details>
59
- <summary>📍 位置查看、移动</summary>
60
-
61
- - ### 锈湖 房间
62
- - 查看已访问的房间环境
63
- - ### 锈湖 移动
64
- - 移动到另一个场景
65
- </details>
66
-
67
- <details>
68
- <summary>🔍 探索场景或物品</summary>
69
-
70
- - ### 锈湖 查看 <point>
71
- - 探索当前场景或拥有的物品
72
- - ### 锈湖 物品
73
- - 查看你拥有的物品
74
- </details>
75
-
76
-
77
-
78
- ---
79
- ## 📘 开发信息
80
- <details>
81
- <summary>如果要反馈建议或报告问题</summary>
82
-
83
- 可以[点这里](https://github.com/lizard0126/rusty-lake-lizard/issues)创建议题~
84
- </details>
85
- <details>
86
- <summary>如果喜欢我的插件</summary>
87
-
88
- 可以[请我喝可乐](https://ifdian.net/a/lizard0126),没准就有动力更新新功能了~
89
- </details>
40
+ var import_koishi8 = require("koishi");
90
41
 
91
- `;
92
- var Config = import_koishi.Schema.object({});
42
+ // src/data.ts
43
+ var import_fs = __toESM(require("fs"));
44
+ var import_path = require("path");
45
+ function loadImage(file) {
46
+ const buffer = import_fs.default.readFileSync(file);
47
+ return `data:image/png;base64,${buffer.toString("base64")}`;
48
+ }
49
+ __name(loadImage, "loadImage");
50
+ var dir = (0, import_path.join)(__dirname, "../assets/");
93
51
  var images = {
94
- bedroom: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/1-卧室.png")).href,
95
- notea: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/2a-纸条.png")).href,
96
- noteb: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/2b-纸条.png")).href,
97
- code: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/3-隐藏密码线索.png")).href,
98
- corridor: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/4-走廊.png")).href,
99
- kitchen: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/5-厨房.png")).href,
100
- laboratory: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/6-化学实验室.png")).href,
101
- description: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/7-实验说明.png")).href,
102
- electrical: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/8-电气室.png")).href,
103
- fuse: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/9-保险丝盒.png")).href,
104
- office: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/10-办公室.png")).href,
105
- document: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/11-文本文档.png")).href,
106
- diagram: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/12-指示图.png")).href,
107
- hide: (0, import_url.pathToFileURL)((0, import_path.resolve)(__dirname, "../assets/13-隐藏房间.png")).href
52
+ bedroom: loadImage(`${dir}1-卧室.png`),
53
+ notea: loadImage(`${dir}2a-纸条.png`),
54
+ noteb: loadImage(`${dir}2b-纸条.png`),
55
+ code: loadImage(`${dir}3-隐藏密码线索.png`),
56
+ corridor: loadImage(`${dir}4-走廊.png`),
57
+ kitchen: loadImage(`${dir}5-厨房.png`),
58
+ laboratory: loadImage(`${dir}6-化学实验室.png`),
59
+ description: loadImage(`${dir}7-实验说明.png`),
60
+ electrical: loadImage(`${dir}8-电气室.png`),
61
+ fuse: loadImage(`${dir}9-保险丝盒.png`),
62
+ office: loadImage(`${dir}10-办公室.png`),
63
+ document: loadImage(`${dir}11-文本文档.png`),
64
+ diagram: loadImage(`${dir}12-指示图.png`),
65
+ hide: loadImage(`${dir}13-隐藏房间.png`)
108
66
  };
109
67
  var rooms = [
110
68
  {
@@ -264,1244 +222,1304 @@ var itemsDetails = {
264
222
  description: "老式电脑用品,封装了某种程序。\n(提示:使用查看指令查看该物品)"
265
223
  }
266
224
  };
267
- function apply(ctx) {
268
- const logger = ctx.logger("rusty-lake");
269
- ctx.model.extend("rusty_lake_games", {
270
- id: "string",
271
- gameId: "string",
272
- gameName: "string",
273
- currentRoom: "string",
274
- inventory: "json",
275
- visitedRooms: "json",
276
- doneTasks: "json"
277
- }, {
278
- primary: "id"
279
- });
280
- ctx.model.extend("rusty_lake_players", {
281
- id: "string",
282
- gameId: "string",
283
- userId: "string"
284
- }, {
285
- primary: "id"
286
- });
287
- const command = ctx.command("锈湖", "锈湖桌游").alias("rl");
288
- async function getPlayerState(session) {
289
- const player = await ctx.database.get("rusty_lake_players", { userId: session.userId });
290
- if (!player.length) throw new Error("你还未加入任何游戏。");
291
- const game = await ctx.database.get("rusty_lake_games", { gameId: player[0].gameId });
292
- if (!game.length) throw new Error("对局数据不存在。");
293
- return {
294
- ...game[0],
295
- visitedRooms: game[0].visitedRooms || []
296
- };
225
+
226
+ // src/gamestate.ts
227
+ var import_koishi = require("koishi");
228
+ async function getState(ctx, session) {
229
+ const player = await ctx.database.get("rusty_lake_players", { userId: session.userId });
230
+ if (!player.length) throw new Error("你还未加入任何游戏。");
231
+ const game = await ctx.database.get("rusty_lake_games", { gameId: player[0].gameId });
232
+ if (!game.length) throw new Error("对局数据不存在。");
233
+ return {
234
+ ...game[0],
235
+ visitedRooms: game[0].visitedRooms || []
236
+ };
237
+ }
238
+ __name(getState, "getState");
239
+ async function visitedRooms(ctx, session, Config2) {
240
+ const { visitedRooms: visitedRooms2 = [], currentRoom } = await getState(ctx, session);
241
+ const roomMap = new Map(rooms.map((r) => [r.id, r]));
242
+ const current = roomMap.get(currentRoom);
243
+ const list = visitedRooms2.map((id, i) => {
244
+ const room2 = roomMap.get(id);
245
+ return room2 ? `${i + 1}. ${room2.name}` : null;
246
+ }).filter(Boolean).join("\n");
247
+ await session.send(
248
+ `当前所在房间:${current.name}
249
+ ` + import_koishi.h.image(current.image) + `你已经访问过以下房间,选择一个查看详细信息:
250
+ ` + list + `
251
+ 请输入房间编号查看详细信息:`
252
+ );
253
+ const input = await session.prompt(Config2.timeout);
254
+ if (!input) return "选择超时。";
255
+ const index = Number(input.trim()) - 1;
256
+ if (!Number.isInteger(index) || index < 0 || index >= visitedRooms2.length) {
257
+ return "选择无效。";
297
258
  }
298
- __name(getPlayerState, "getPlayerState");
299
- let currentId = 1;
300
- command.subcommand(".新建", "新建游戏房间").action(async ({ session }) => {
301
- const existingPlayer = await ctx.database.get("rusty_lake_players", { userId: session.userId });
302
- if (existingPlayer.length > 0) {
303
- return "你已经加入了一个房间,无法重复创建。";
304
- }
305
- await session.send("请输入新房间的名称:");
306
- const gameName = await session.prompt(1e4);
307
- if (!gameName) {
308
- return "输入超时。";
259
+ const room = roomMap.get(visitedRooms2[index]);
260
+ if (!room) return "无法找到该房间的详细信息。";
261
+ await session.send(
262
+ `你想起了 ${room.name} 的样子
263
+ ` + room.description + "\n" + import_koishi.h.image(room.image)
264
+ );
265
+ }
266
+ __name(visitedRooms, "visitedRooms");
267
+ async function move(ctx, session, Config2) {
268
+ const state = await getState(ctx, session);
269
+ const availableRooms = rooms.filter(
270
+ (room) => state.visitedRooms.includes(room.id) && room.id !== state.currentRoom
271
+ );
272
+ if (availableRooms.length === 0) {
273
+ return "你无处可去,只能在这里活动。";
274
+ }
275
+ const options = availableRooms.map((room, i) => `${i + 1}: ${room.name}`).join("\n");
276
+ await session.send(`你可以前往以下房间,请输入序号选择:
277
+ ${options}`);
278
+ const input = await session.prompt(Config2.timeout);
279
+ if (!input) return "输入超时。";
280
+ const index = parseInt(input.trim(), 10) - 1;
281
+ if (isNaN(index) || index < 0 || index >= availableRooms.length) {
282
+ return "选择无效。";
283
+ }
284
+ const targetRoom = availableRooms[index];
285
+ await ctx.database.upsert("rusty_lake_games", [{
286
+ id: state.id,
287
+ gameId: state.gameId,
288
+ gameName: state.gameName,
289
+ currentRoom: targetRoom.id,
290
+ inventory: state.inventory,
291
+ visitedRooms: state.visitedRooms,
292
+ doneTasks: state.doneTasks
293
+ }]);
294
+ return `你进入了${targetRoom.name}。
295
+ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targetRoom.image) : ""}`;
296
+ }
297
+ __name(move, "move");
298
+ async function ownedItems(ctx, session, Config2) {
299
+ const { inventory } = await getState(ctx, session);
300
+ if (!inventory.length) return "你没有物品。";
301
+ await session.send(
302
+ `你拥有的物品有:
303
+ ` + inventory.map((item2, i) => `${i + 1}: ${item2}`).join("\n") + `
304
+ 请输入物品编号查看详情,输入 0 取消。`
305
+ );
306
+ const input = await session.prompt(Config2.timeout);
307
+ if (!input) return "输入超时,操作失败。";
308
+ const index = Number(input.trim()) - 1;
309
+ if (index === -1) return "操作取消。";
310
+ if (!Number.isInteger(index) || index < 0 || index >= inventory.length) {
311
+ return "无效的选择,请重新输入。";
312
+ }
313
+ const item = inventory[index];
314
+ const detail = itemsDetails[item];
315
+ if (!detail) return `${item} 没有更多详情。`;
316
+ const { description, image } = detail;
317
+ return `${item}:
318
+ ${description}${image ? `
319
+ ${import_koishi.h.image(image)}` : ""}`;
320
+ }
321
+ __name(ownedItems, "ownedItems");
322
+ async function addItemToInventory(ctx, session, item) {
323
+ const state = await getState(ctx, session);
324
+ const newInventory = [...state.inventory, item];
325
+ await ctx.database.upsert("rusty_lake_games", [
326
+ {
327
+ id: state.id,
328
+ gameId: state.gameId,
329
+ gameName: state.gameName,
330
+ currentRoom: state.currentRoom,
331
+ inventory: newInventory,
332
+ visitedRooms: state.visitedRooms,
333
+ doneTasks: state.doneTasks
309
334
  }
310
- if (!gameName.trim()) {
311
- return "房间名称不能为空。";
335
+ ]);
336
+ }
337
+ __name(addItemToInventory, "addItemToInventory");
338
+ async function removeItemFromInventory(ctx, session, item) {
339
+ const state = await getState(ctx, session);
340
+ const newInventory = state.inventory.filter((i) => i !== item);
341
+ await ctx.database.upsert("rusty_lake_games", [
342
+ {
343
+ id: state.id,
344
+ gameId: state.gameId,
345
+ gameName: state.gameName,
346
+ currentRoom: state.currentRoom,
347
+ inventory: newInventory,
348
+ visitedRooms: state.visitedRooms,
349
+ doneTasks: state.doneTasks
312
350
  }
313
- const existingGame = await ctx.database.get("rusty_lake_games", { gameName });
314
- if (existingGame.length > 0) {
315
- return "已经存在同名的房间。";
351
+ ]);
352
+ }
353
+ __name(removeItemFromInventory, "removeItemFromInventory");
354
+ async function addTaskToDoneTasks(ctx, session, task) {
355
+ const state = await getState(ctx, session);
356
+ const newTasks = [...state.doneTasks, task];
357
+ await ctx.database.upsert("rusty_lake_games", [
358
+ {
359
+ id: state.id,
360
+ gameId: state.gameId,
361
+ gameName: state.gameName,
362
+ currentRoom: state.currentRoom,
363
+ inventory: state.inventory,
364
+ visitedRooms: state.visitedRooms,
365
+ doneTasks: newTasks
316
366
  }
317
- const gameId = `game-${Date.now()}`;
318
- const players = await ctx.database.get("rusty_lake_players", {});
319
- const maxId = players.reduce((max, player) => Math.max(max, parseInt(player.id, 10)), 0);
320
- const id = maxId + 1;
321
- await ctx.database.create("rusty_lake_games", {
322
- id: id.toString(),
323
- gameId,
324
- gameName,
325
- currentRoom: "bedroom",
326
- inventory: [],
327
- visitedRooms: ["bedroom"],
328
- doneTasks: []
329
- });
330
- await ctx.database.upsert("rusty_lake_players", [
331
- {
332
- id: id.toString(),
333
- gameId,
334
- userId: session.userId
367
+ ]);
368
+ }
369
+ __name(addTaskToDoneTasks, "addTaskToDoneTasks");
370
+
371
+ // src/rooms/lockedBox.ts
372
+ async function handleLockedBox(ctx, session, state, Config2) {
373
+ let response = "";
374
+ if (state.inventory.includes("上锁的盒子")) {
375
+ await session.send("上面挂着五位数字密码的锁,里面似乎有金属的声音。");
376
+ if (state.inventory.includes("半张纸条a") && state.inventory.includes("半张纸条b") && state.inventory.includes("隐藏密码线索")) {
377
+ if (!state.inventory.includes("钥匙")) {
378
+ await session.send("你似乎收集到了足够的线索,要试试打开盒子吗?(是/否)");
379
+ const choice = await session.prompt(Config2.timeout);
380
+ if (choice === "") {
381
+ await session.send("输入五位数字密码:");
382
+ const input = await session.prompt(Config2.timeout);
383
+ if (input === "26773" || input === "26779" || input === "26771") {
384
+ response = "你打开了盒子,里面只有一把钥匙。\n(可在物品指令中查看)\n\n你丢掉了没用的空盒子。";
385
+ await addItemToInventory(ctx, session, "钥匙");
386
+ await removeItemFromInventory(ctx, session, "上锁的盒子");
387
+ } else {
388
+ return "锁并未解开。是输错了吗?";
389
+ }
390
+ } else {
391
+ return "你迟疑着,没有动作。";
392
+ }
393
+ } else {
394
+ response = "你观察了一会,并没有什么特别的发现。";
335
395
  }
336
- ]);
337
- logger.info(`用户 ${session.userId} 已加入房间 ${gameName}`);
338
- await session.send(`成功创建房间:${gameName}。
339
- 已自动为您加入`);
340
- const state = await getPlayerState(session);
341
- const currentRoom = state.currentRoom;
342
- const current = rooms.find((r) => r.id === currentRoom);
343
- await session.send(`当前所在场景:${current.name}
344
- 使用“锈湖 查看”指令查看当前场景。例如:“锈湖 查看 监控”`);
345
- await session.send(import_koishi.h.image(current.image));
346
- });
347
- command.subcommand(".删除", "清除游戏房间").action(async ({ session }) => {
348
- const games = await ctx.database.get("rusty_lake_games", {});
349
- if (games.length === 0) {
350
- return "当前没有任何房间记录可以删除。";
396
+ } else {
397
+ return "你还没有收集到足够的线索。";
351
398
  }
352
- const gameList = games.map((game, index2) => `${index2 + 1}: ${game.gameName}`).join("\n");
353
- await session.send(`输入序号选择要删除的房间:
354
- ${gameList}
399
+ } else {
400
+ response = "你身上没有这个物品。";
401
+ }
402
+ return response;
403
+ }
404
+ __name(handleLockedBox, "handleLockedBox");
355
405
 
356
- 输入 0 删除所有房间`);
357
- const selected = await session.prompt(1e4);
358
- if (!selected) return "输入超时。";
359
- const index = parseInt(selected.trim(), 10);
360
- if (index === 0) {
361
- for (const game of games) {
362
- await ctx.database.remove("rusty_lake_games", { gameId: game.gameId });
363
- await ctx.database.remove("rusty_lake_players", { gameId: game.gameId });
364
- logger.info(`删除了游戏 ${game.gameName} 的记录。`);
406
+ // src/rooms/experimentNote.ts
407
+ var import_koishi2 = require("koishi");
408
+ async function handleExperimentNote(ctx, session, state, Config2) {
409
+ let response = "";
410
+ if (state.inventory.includes("实验说明")) {
411
+ await session.send("你打开笔记本,上面似乎是某个实验的说明。");
412
+ await session.send(import_koishi2.h.image(images.description));
413
+ if (!state.inventory.includes("黑色混合物") && !state.inventory.includes("手")) {
414
+ if (state.doneTasks.includes("水") && state.doneTasks.includes("酸") && state.inventory.includes("咖啡") && state.inventory.includes("肉") && state.inventory.includes("烧杯")) {
415
+ await session.send("你似乎收集到了足够的材料,要试试这个实验吗?(是/否)");
416
+ const choice = await session.prompt(Config2.timeout);
417
+ if (choice === "是") {
418
+ response = "你拿出烧杯,对照着实验说明开始加入材料。\n\n首先来到厨房,往烧杯里加了四分之一的水。\n\n又前往电气室,往烧杯里加了四分之一的酸。\n\n拿出之前泡好的咖啡倒了进去,又加入了冷藏箱里获得的肉。\n\n回到化学实验室,将这一杯不可名状的物质搅拌了一会,变成了一杯奇怪的黑色混合物。\n(可在物品指令中查看)";
419
+ await removeItemFromInventory(ctx, session, "烧杯");
420
+ await removeItemFromInventory(ctx, session, "咖啡");
421
+ await addItemToInventory(ctx, session, "咖啡杯");
422
+ await removeItemFromInventory(ctx, session, "肉");
423
+ await addItemToInventory(ctx, session, "黑色混合物");
424
+ } else {
425
+ return "你迟疑着,没有动作。";
426
+ }
427
+ } else {
428
+ return "你还没有收集到足够的材料。";
365
429
  }
366
- await session.send("所有房间记录已成功删除。");
367
- currentId = 1;
368
- return;
430
+ } else {
431
+ response = "你已经做过这个实验了。";
369
432
  }
370
- if (isNaN(index) || index < 1 || index > games.length) {
371
- return "选择无效。";
433
+ } else {
434
+ response = "你身上没有这个物品。";
435
+ }
436
+ return response;
437
+ }
438
+ __name(handleExperimentNote, "handleExperimentNote");
439
+
440
+ // src/rooms/floppyDisk.ts
441
+ async function handleFloppyDisk(ctx, session, state) {
442
+ let response = "";
443
+ if (state.inventory.includes("软盘")) {
444
+ response = "你将软盘插入电脑里时,一个程序开始启动。\n\n一个黑色控制台出现,上面标有‘记忆-提取程序’的字样,程序加载的进度条缓慢推进。\n\n同时,一个播放器在屏幕上弹了出来,开始播放视频。\n\n你看到自己站在机器里,直视摄像头,不断重复着同样的话:\n\n思维、灵魂、记忆、视力、大门。\n\n视频重复播放了几次后,背景中的进度条加载到了100%,所有屏幕随之关闭。";
445
+ await addTaskToDoneTasks(ctx, session, "进入机器");
446
+ } else {
447
+ response = "你身上没有这个物品。";
448
+ }
449
+ return response;
450
+ }
451
+ __name(handleFloppyDisk, "handleFloppyDisk");
452
+
453
+ // src/rooms/bedroom.ts
454
+ var import_koishi3 = require("koishi");
455
+ var NO_DISCOVERY = "你观察了一会,并没有什么特别的发现。";
456
+ var HESITATE = "你迟疑着,没有动作。";
457
+ async function handleBedroom(ctx, session, state, Config2, point) {
458
+ if (/床/.test(point)) {
459
+ let response = "很简单的上下床,有多少人都能睡下。";
460
+ if (!state.inventory.includes("半张纸条a")) {
461
+ response += "\n\n你在床铺的垫子下发现了半张纸条。\n(可在物品指令中查看)" + import_koishi3.h.image(images.notea);
462
+ await addItemToInventory(ctx, session, "半张纸条a");
463
+ } else {
464
+ response += "\n\n" + NO_DISCOVERY;
372
465
  }
373
- const gameId = games[index - 1].gameId;
374
- const gameName = games[index - 1].gameName;
375
- await ctx.database.remove("rusty_lake_games", { gameId });
376
- await ctx.database.remove("rusty_lake_players", { gameId });
377
- await session.send(`游戏 ${gameName} 的记录已成功删除。`);
378
- });
379
- command.subcommand(".加入", "加入现有游戏房间").action(async ({ session }) => {
380
- const games = await ctx.database.get("rusty_lake_games", {});
381
- if (games.length === 0) return "当前没有任何房间可以加入。";
382
- const existingPlayer = await ctx.database.get("rusty_lake_players", { userId: session.userId });
383
- if (existingPlayer.length > 0) {
384
- return "你已经加入了一个房间,无法重复加入。";
466
+ return response;
467
+ }
468
+ if (/柜/.test(point) || /抽屉/.test(point)) {
469
+ await session.send("一张小巧而简单的柜子靠墙而立,有三个抽屉。");
470
+ if (state.inventory.includes("手电筒")) return NO_DISCOVERY;
471
+ await session.send("要拉开看看吗?(是/否)");
472
+ if (await session.prompt(Config2.timeout) !== "是") return HESITATE;
473
+ const items = [
474
+ { name: "上锁的盒子", desc: "顶部的抽屉内有一个上锁的盒子。\n(可在物品指令中查看)" },
475
+ { name: "半张纸条b", desc: "\n\n中间的抽屉内有纸条的另一半。\n(可在物品指令中查看)" + import_koishi3.h.image(images.noteb) },
476
+ { name: "手电筒", desc: "\n\n底部的抽屉内有一个手电筒。\n(可在物品指令中查看)" }
477
+ ];
478
+ let response = "";
479
+ for (const item of items) {
480
+ response += item.desc;
481
+ await addItemToInventory(ctx, session, item.name);
385
482
  }
386
- const gameList = games.map((game, index2) => `${index2 + 1}: ${game.gameName}`).join("\n");
387
- await session.send(`以下是可加入的房间,请输入序号选择:
388
- ${gameList}`);
389
- const selected = await session.prompt(1e4);
390
- if (!selected) return "输入超时。";
391
- const index = parseInt(selected.trim(), 10) - 1;
392
- if (isNaN(index) || index < 0 || index >= games.length) {
393
- return "选择无效。";
483
+ return response;
484
+ }
485
+ if (/地毯/.test(point)) {
486
+ await session.send("整洁的地毯,下面的地面上似乎写了什么。环境太过昏暗,你看不清。");
487
+ if (!state.inventory.includes("手电筒")) return NO_DISCOVERY;
488
+ await session.send("你拥有手电筒。要打开照明吗?(是/否)");
489
+ if (await session.prompt(Config2.timeout) !== "是") return HESITATE;
490
+ if (state.inventory.includes("隐藏密码线索")) return NO_DISCOVERY;
491
+ const response = "地上刻画着一些字符,似乎是什么密码的线索。\n(可在物品指令中查看)" + import_koishi3.h.image(images.code);
492
+ await addItemToInventory(ctx, session, "隐藏密码线索");
493
+ return response;
494
+ }
495
+ if (/门/.test(point)) {
496
+ if (state.doneTasks.includes("走廊锁")) return "这扇门通往走廊,你随时可以离开。";
497
+ await session.send("这扇装有坚固的金属门把手的白门被锁上了,需要钥匙才能开。");
498
+ if (!state.inventory.includes("钥匙")) return NO_DISCOVERY;
499
+ await session.send("你拥有钥匙。要试着开门吗?(是/否)");
500
+ if (await session.prompt(Config2.timeout) !== "是") return HESITATE;
501
+ await addTaskToDoneTasks(ctx, session, "走廊锁");
502
+ const newState = await getState(ctx, session);
503
+ await ctx.database.upsert("rusty_lake_games", [{
504
+ id: newState.id,
505
+ gameId: newState.gameId,
506
+ gameName: newState.gameName,
507
+ currentRoom: "corridor",
508
+ inventory: newState.inventory,
509
+ visitedRooms: [...newState.visitedRooms, "corridor"],
510
+ doneTasks: newState.doneTasks
511
+ }]);
512
+ return "你小心翼翼地打开门,迈步走了出去。\n\n你走进一条长长的、昏暗的走廊,尽头分成两条岔路。\n\n你发现墙上钉着一张地图,旁边是你进入的地方。地图描绘了包括你刚刚走出来的房间在内的所有房间。" + import_koishi3.h.image(images.corridor) + "\n\n在走廊的尽头,你看到墙上写着些什么。那是用黑色马克笔写着一条信息:\n\n“是时候醒来了。";
513
+ }
514
+ if (/开关/.test(point)) {
515
+ let response = "老式的电灯开关。";
516
+ response += state.doneTasks.includes("房间电") ? "\n\n你打开开关,电灯发出惨白的光亮。" : "\n\n你反复拨弄开关,但没有任何反应。这里似乎停电了。";
517
+ return response;
518
+ }
519
+ if (/监控/.test(point) || /摄像/.test(point)) {
520
+ return "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
521
+ }
522
+ if (/通风/.test(point)) {
523
+ if (state.doneTasks.includes("隐藏房间锁")) return "通风口通向隐藏房间,并没有什么特别的发现。";
524
+ await session.send("通风口被一块挡板覆盖,挡板被螺丝固定在墙上。");
525
+ if (!state.inventory.includes("螺丝刀")) return NO_DISCOVERY;
526
+ await session.send("你拥有螺丝刀。要试着拆开挡板吗?(是/否)");
527
+ if (await session.prompt(Config2.timeout) !== "是") return HESITATE;
528
+ await session.send("你拆开了挡板,通风口内幽暗昏聩,像是个迷宫。");
529
+ if (!state.inventory.includes("指示图")) return "摸索了一阵,你毫无头绪。保险起见,你退了出来,装回了挡板。";
530
+ const msg = "你细细思忖,好像有什么东西可以用在这里。猛然间,你想起了在办公室拿到的指示图:" + import_koishi3.h.image(images.diagram) + "\n\n你在迷宫里仔细探索摸路,终于明白自己进来的地方对应着方块1。\n(图里的方块从上到下从左到右分别为123456)\n\n你想了想,觉得哪里不对。(输入你觉得有问题的编号)";
531
+ await session.send(msg);
532
+ if (await session.prompt(Config2.timeout) !== "6") {
533
+ return "你想了想,好像没什么奇怪的。保险起见,你退了出来,装回了挡板。";
394
534
  }
395
- const gameId = games[index].gameId;
396
- const players = await ctx.database.get("rusty_lake_players", {});
397
- const maxId = players.reduce((max, player) => Math.max(max, parseInt(player.id, 10)), 0);
398
- const id = maxId + 1;
399
- await ctx.database.create("rusty_lake_players", {
400
- id: id.toString(),
401
- gameId,
402
- userId: session.userId
403
- });
404
- await session.send(`你成功加入了房间:${games[index].gameName}!`);
405
- const state = await getPlayerState(session);
406
- const currentRoom = state.currentRoom;
407
- const current = rooms.find((r) => r.id === currentRoom);
408
- await session.send(`当前所在场景:${current.name}
409
- 使用“锈湖 查看”指令查看当前场景。例如:“锈湖 查看 监控”`);
410
- await session.send(import_koishi.h.image(current.image));
411
- });
412
- command.subcommand(".移动 <room>", "移动到另一个场景").action(async ({ session }) => {
413
- const state = await getPlayerState(session);
414
- const availableRooms = rooms.filter(
415
- (room) => state.visitedRooms.includes(room.id) && room.id !== state.currentRoom
416
- );
417
- if (availableRooms.length === 0) {
418
- return "你无处可去,只能在这里活动。";
535
+ await addTaskToDoneTasks(ctx, session, "隐藏房间锁");
536
+ const newState = await getState(ctx, session);
537
+ await ctx.database.upsert("rusty_lake_games", [{
538
+ id: newState.id,
539
+ gameId: newState.gameId,
540
+ gameName: newState.gameName,
541
+ currentRoom: "hide",
542
+ inventory: newState.inventory,
543
+ visitedRooms: [...newState.visitedRooms, "hide"],
544
+ doneTasks: newState.doneTasks
545
+ }]);
546
+ return "你摸索着来到6号方块的位置,透过通风口,看到的竟然是一个从未发现过的房间。\n\n你设法打开通风口,从布满灰尘的通风口爬出来,到了一个黑暗房间的冰冷地板上,脑袋差点撞到上方的桌子。\n\n你艰难地从桌子下面爬出来,然后就看到了嵌入进墙体里的巨型机器矗立在你眼前,一个小屏幕发出红光,显示着闪烁的消息。“" + import_koishi3.h.image(images.hide);
547
+ }
548
+ return NO_DISCOVERY;
549
+ }
550
+ __name(handleBedroom, "handleBedroom");
551
+
552
+ // src/rooms/corridor.ts
553
+ var import_koishi4 = require("koishi");
554
+ async function handleCorridor(ctx, session, state, Config2, point) {
555
+ let response = "";
556
+ if (/厨房/.test(point)) {
557
+ if (!state.doneTasks.includes("厨房锁")) {
558
+ response += "厨房的门没锁,你开门走了进去。";
559
+ response += "\n\n你走进厨房,面前是一张小桌子和一把椅子。";
560
+ response += "\n\n远端的墙上有一个厨台,上面放着一个咖啡机。";
561
+ response += "\n\n你听到角落的垃圾桶周围萦绕着嗡嗡作响的苍蝇声。";
562
+ response += import_koishi4.h.image(images.kitchen);
563
+ await addTaskToDoneTasks(ctx, session, "厨房锁");
564
+ const newState = await getState(ctx, session);
565
+ await ctx.database.upsert("rusty_lake_games", [
566
+ {
567
+ id: newState.id,
568
+ gameId: newState.gameId,
569
+ gameName: newState.gameName,
570
+ currentRoom: "kitchen",
571
+ inventory: newState.inventory,
572
+ visitedRooms: [...newState.visitedRooms, "kitchen"],
573
+ doneTasks: newState.doneTasks
574
+ }
575
+ ]);
576
+ } else {
577
+ response += "你观察了一会,并没有什么特别的发现。";
419
578
  }
420
- const availableRoomNames = availableRooms.map((room, index2) => `${index2 + 1}: ${room.name}`).join("\n");
421
- await session.send(`你可以前往以下房间,请输入序号选择:
422
- ${availableRoomNames}`);
423
- const selected = await session.prompt(1e4);
424
- if (!selected) return "输入超时。";
425
- const index = parseInt(selected.trim(), 10) - 1;
426
- if (isNaN(index) || index < 0 || index >= availableRooms.length) {
427
- return "选择无效。";
579
+ } else if (/实验室/.test(point)) {
580
+ if (!state.doneTasks.includes("实验室锁")) {
581
+ response += "你来到化学实验室门口。";
582
+ response += "\n\n当你靠近门边时,嗅到了从另外一侧传来的浓烈化学气味,直冲鼻腔。";
583
+ response += "\n\n门没锁,你开门走了进去。";
584
+ response += "\n\n化学实验室出奇地空旷——里面只有一个小型实验台立在房间中央,上面摆着少量化学设备。";
585
+ response += "\n\n然而一股令人不安的寒意掠过你的脊背,你总感觉有什么东西在注视着你。";
586
+ response += import_koishi4.h.image(images.laboratory);
587
+ await addTaskToDoneTasks(ctx, session, "实验室锁");
588
+ const newState = await getState(ctx, session);
589
+ await ctx.database.upsert("rusty_lake_games", [
590
+ {
591
+ id: newState.id,
592
+ gameId: newState.gameId,
593
+ gameName: newState.gameName,
594
+ currentRoom: "laboratory",
595
+ inventory: newState.inventory,
596
+ visitedRooms: [...newState.visitedRooms, "laboratory"],
597
+ doneTasks: newState.doneTasks
598
+ }
599
+ ]);
600
+ } else {
601
+ response += "你观察了一会,并没有什么特别的发现。";
428
602
  }
429
- const targetRoom = availableRooms[index];
430
- await ctx.database.upsert("rusty_lake_games", [
431
- {
432
- id: state.id,
433
- gameId: state.gameId,
434
- gameName: state.gameName,
435
- currentRoom: targetRoom.id,
436
- inventory: state.inventory,
437
- visitedRooms: state.visitedRooms,
438
- doneTasks: state.doneTasks
603
+ } else if (/电/.test(point)) {
604
+ if (!state.doneTasks.includes("电锁")) {
605
+ await session.send("通往电气室的门是锁着的。门把手是简单的旋转式,看起来不是很牢固,中间有一个钥匙孔。");
606
+ await session.send("你准备想办法把门弄开。(输入准备使用的道具或方式)");
607
+ const choice = await session.prompt(15e3);
608
+ if (choice === "回形针" && state.inventory.includes("回形针")) {
609
+ response += "你使用回形针作为撬锁工具强行开门。";
610
+ response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
611
+ response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
612
+ response += import_koishi4.h.image(images.electrical);
613
+ await addTaskToDoneTasks(ctx, session, "电锁");
614
+ const newState = await getState(ctx, session);
615
+ await ctx.database.upsert("rusty_lake_games", [
616
+ {
617
+ id: newState.id,
618
+ gameId: newState.gameId,
619
+ gameName: newState.gameName,
620
+ currentRoom: "electrical",
621
+ inventory: newState.inventory,
622
+ visitedRooms: [...newState.visitedRooms, "electrical"],
623
+ doneTasks: newState.doneTasks
624
+ }
625
+ ]);
626
+ } else if (choice === "身份证" && state.inventory.includes("身份证")) {
627
+ response += "你使用身份证,将其插入门缝中,来回晃动将锁打开。";
628
+ response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
629
+ response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
630
+ response += import_koishi4.h.image(images.electrical);
631
+ await addTaskToDoneTasks(ctx, session, "电锁");
632
+ const newState = await getState(ctx, session);
633
+ await ctx.database.upsert("rusty_lake_games", [
634
+ {
635
+ id: newState.id,
636
+ gameId: newState.gameId,
637
+ gameName: newState.gameName,
638
+ currentRoom: "electrical",
639
+ inventory: newState.inventory,
640
+ visitedRooms: [...newState.visitedRooms, "electrical"],
641
+ doneTasks: newState.doneTasks
642
+ }
643
+ ]);
644
+ } else if (/力/.test(choice)) {
645
+ response += "你用蛮力将门弄开。";
646
+ response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
647
+ response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
648
+ response += import_koishi4.h.image(images.electrical);
649
+ await addTaskToDoneTasks(ctx, session, "电锁");
650
+ const newState = await getState(ctx, session);
651
+ await ctx.database.upsert("rusty_lake_games", [
652
+ {
653
+ id: newState.id,
654
+ gameId: newState.gameId,
655
+ gameName: newState.gameName,
656
+ currentRoom: "electrical",
657
+ inventory: newState.inventory,
658
+ visitedRooms: [...newState.visitedRooms, "electrical"],
659
+ doneTasks: newState.doneTasks
660
+ }
661
+ ]);
662
+ } else {
663
+ return "你想了又想,没找到好方法。";
439
664
  }
440
- ]);
441
- return `你进入了${targetRoom.name}。
442
- ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targetRoom.image) : ""}`;
443
- });
444
- command.subcommand(".房间", "查看已访问的房间环境").action(async ({ session }) => {
445
- const state = await getPlayerState(session);
446
- const visitedRooms = state.visitedRooms || [];
447
- const currentRoom = state.currentRoom;
448
- let roomList = "";
449
- const current = rooms.find((r) => r.id === currentRoom);
450
- roomList += `当前所在房间:${current.name}`;
451
- roomList += import_koishi.h.image(current.image);
452
- roomList += "你已经访问过以下房间,选择一个查看详细信息:\n";
453
- visitedRooms.forEach((roomId, index) => {
454
- const room = rooms.find((r) => r.id === roomId);
455
- if (room) {
456
- roomList += `${index + 1}. ${room.name}
457
- `;
665
+ } else {
666
+ response += "你观察了一会,并没有什么特别的发现。";
667
+ }
668
+ } else if (/办公室/.test(point)) {
669
+ if (!state.doneTasks.includes("办公室锁")) {
670
+ await session.send("办公室的门被一个牢固的电子锁锁住,旁边有一个指纹读取器。");
671
+ if (state.doneTasks.includes("房间电")) {
672
+ await session.send("你试了试自己的指纹,读取器闪烁红灯,门并未打开。");
673
+ if (state.inventory.includes("")) {
674
+ await session.send("你想起之前在化学实验室造出的那只手,要试试吗?(是/否)");
675
+ const choice = await session.prompt(5e3);
676
+ if (choice === "是") {
677
+ response += "你将不断抽搐着的断手按在指纹读取器上,绿灯亮起,门打开了。";
678
+ response += "\n\n进入房间时,你发现这里的风格如此不同,";
679
+ response += "\n\n简朴干净的白色墙纸与遍布整座设施的冰冷单调的白色瓷砖形成了鲜明的对比。";
680
+ response += "\n\n房间中央有一张桌子,上面放着一台电脑,发出轻微的电流声。";
681
+ response += import_koishi4.h.image(images.office);
682
+ await addTaskToDoneTasks(ctx, session, "办公室锁");
683
+ const newState = await getState(ctx, session);
684
+ await ctx.database.upsert("rusty_lake_games", [
685
+ {
686
+ id: newState.id,
687
+ gameId: newState.gameId,
688
+ gameName: newState.gameName,
689
+ currentRoom: "office",
690
+ inventory: newState.inventory,
691
+ visitedRooms: [...newState.visitedRooms, "office"],
692
+ doneTasks: newState.doneTasks
693
+ }
694
+ ]);
695
+ } else {
696
+ return "你迟疑着,没有动作。";
697
+ }
698
+ } else {
699
+ response += "你观察了一会,并没有什么特别的发现。";
700
+ }
701
+ } else {
702
+ response += "指纹读取器此时并没有打开,似乎是没电导致的。";
458
703
  }
459
- });
460
- roomList += "\n请输入房间编号查看详细信息:";
461
- await session.send(roomList);
462
- const choice = await session.prompt(5e3);
463
- const selectedRoomIndex = parseInt(choice) - 1;
464
- if (isNaN(selectedRoomIndex) || selectedRoomIndex < 0 || selectedRoomIndex >= visitedRooms.length) {
465
- return "选择无效或超时。";
704
+ } else {
705
+ response += "你观察了一会,并没有什么特别的发现。";
466
706
  }
467
- const selectedRoomId = visitedRooms[selectedRoomIndex];
468
- const selectedRoom = rooms.find((r) => r.id === selectedRoomId);
469
- if (selectedRoom) {
470
- let response = `你想起了${selectedRoom.name}的样子
471
- `;
472
- response += selectedRoom.description + "\n";
473
- response += import_koishi.h.image(selectedRoom.image);
474
- await session.send(response);
707
+ } else if (/墙/.test(point)) {
708
+ if (state.doneTasks.includes("隐藏门")) {
709
+ response += "原本的墙壁已经变成一个门洞,通往隐藏房间。";
710
+ response += "\n\n现在,你终于不用钻通风口来进出隐藏房间了。";
475
711
  } else {
476
- return "无法找到该房间的详细信息。";
712
+ response += "走廊尽头的墙上用黑色马克笔写着一条信息:";
713
+ response += "\n\n“是时候醒来了。”";
477
714
  }
478
- });
479
- async function addItemToInventory(session, item) {
480
- const state = await getPlayerState(session);
481
- const newInventory = [...state.inventory, item];
482
- await ctx.database.upsert("rusty_lake_games", [
483
- {
484
- id: state.id,
485
- gameId: state.gameId,
486
- gameName: state.gameName,
487
- currentRoom: state.currentRoom,
488
- inventory: newInventory,
489
- visitedRooms: state.visitedRooms,
490
- doneTasks: state.doneTasks
491
- }
492
- ]);
715
+ } else {
716
+ return "你观察了一会,并没有什么特别的发现。";
493
717
  }
494
- __name(addItemToInventory, "addItemToInventory");
495
- async function removeItemFromInventory(session, item) {
496
- const state = await getPlayerState(session);
497
- const newInventory = state.inventory.filter((i) => i !== item);
498
- await ctx.database.upsert("rusty_lake_games", [
499
- {
500
- id: state.id,
501
- gameId: state.gameId,
502
- gameName: state.gameName,
503
- currentRoom: state.currentRoom,
504
- inventory: newInventory,
505
- visitedRooms: state.visitedRooms,
506
- doneTasks: state.doneTasks
718
+ return response;
719
+ }
720
+ __name(handleCorridor, "handleCorridor");
721
+
722
+ // src/rooms/electrical.ts
723
+ var import_koishi5 = require("koishi");
724
+ async function handleElectrical(ctx, session, state, Config2, point) {
725
+ let response = "";
726
+ if (/保险丝/.test(point) || /柜/.test(point) || /门/.test(point) || /盒/.test(point)) {
727
+ await session.send("你打开保险丝盒,8个插槽旁边各自画着符号。\n(可在物品指令中查看)");
728
+ session.send(import_koishi5.h.image(images.fuse));
729
+ if (state.inventory.includes("保险丝")) {
730
+ await session.send("插槽C和H已经插入了保险丝。你决定调整保险丝的位置,并把之前找到的那个也放进去。");
731
+ await session.send("输入你想插入保险丝的三个插槽。(三个大写英文字母)");
732
+ const choice = await session.prompt(Config2.timeout);
733
+ if (/A/.test(choice) && /B/.test(choice) && /G/.test(choice) && !state.doneTasks.includes("房间电")) {
734
+ response += "你将保险丝插入插槽A、B、G。";
735
+ response += "\n\n放好了最后一个保险丝,你听到电流噼啪作响,伴着火花从保险丝盒中飞溅而出。";
736
+ response += "\n\n你头顶的灯开始一明一灭地闪烁,然后彻底点亮,照亮了整个房间。";
737
+ await addTaskToDoneTasks(ctx, session, "房间电");
738
+ } else if (/A/.test(choice) && /C/.test(choice) && /F/.test(choice) && !state.doneTasks.includes("机器电")) {
739
+ response += "你将保险丝插入插槽A、C、F。";
740
+ response += "\n\n当你插入最后一个保险丝的时候,保险丝盒内火花四溅,强烈的光亮蒙蔽了你的双眼。";
741
+ response += "\n\n房间里的灯光闪烁了一下后便熄灭,将你彻底淹没在黑暗中。";
742
+ response += "\n\n远处,你听到了一个大型机械启动时发出的渐强的嗡鸣声。";
743
+ await addTaskToDoneTasks(ctx, session, "机器电");
744
+ } else {
745
+ return "你将保险丝插入插槽,但没有任何变化。会不会是插错了?";
507
746
  }
508
- ]);
747
+ } else {
748
+ response += "安全起见,你没有动它,关上了门。";
749
+ }
750
+ } else if (/架/.test(point)) {
751
+ response += "这是个铁质的空荡荡的货架。";
752
+ if (!state.inventory.includes("扳手")) {
753
+ response += "\n\n货架上只有一个扳手,你拿走了。\n(可在物品指令中查看)";
754
+ await addItemToInventory(ctx, session, "扳手");
755
+ } else {
756
+ response += "\n\n你观察了一会,并没有什么特别的发现。";
757
+ }
758
+ } else if (/管/.test(point)) {
759
+ await session.send("管道似乎在泄漏某种散发着强烈化学气味的物质。");
760
+ if (!state.doneTasks.includes("酸")) {
761
+ if (state.inventory.includes("扳手")) {
762
+ await session.send("你看着刚拿到的扳手,要试着敲开管道的裂缝吗?(是/否)");
763
+ const choice = await session.prompt(Config2.timeout);
764
+ if (choice === "是") {
765
+ response += "你用扳手敲击管道使其松动,酸液开始滴落到地面上。";
766
+ response += "\n\n你随时都能取到酸。";
767
+ await addTaskToDoneTasks(ctx, session, "酸");
768
+ } else {
769
+ return "你迟疑着,没有动作。";
770
+ }
771
+ } else {
772
+ return "管道上有一些裂缝,你想找个工具把它打开。";
773
+ }
774
+ } else {
775
+ return "裂缝已经被你打开,你随时都能取到酸。";
776
+ }
777
+ } else if (/通风/.test(point)) {
778
+ await session.send("天花板上有一个小通风口,位置很高。");
779
+ if (!state.inventory.includes("保险丝")) {
780
+ await session.send("你看向通风口内部,有一个保险丝,但由于挡板格栅的缝隙太窄,手无法伸进去。");
781
+ if (state.inventory.includes("回形针")) {
782
+ await session.send("你掏出之前得到的回形针,把它拉长。要用它试试吗?(是/否)");
783
+ const choice = await session.prompt(Config2.timeout);
784
+ if (choice === "是") {
785
+ response += "你掏出了保险丝,一个短小的玻璃制品,里面有一节金属丝。\n(可在物品指令中查看)";
786
+ await addItemToInventory(ctx, session, "保险丝");
787
+ } else {
788
+ return "你迟疑着,没有动作。";
789
+ }
790
+ } else {
791
+ response += "你需要一个细长的东西。";
792
+ }
793
+ } else {
794
+ response += "你观察了一会,并没有什么特别的发现。";
795
+ }
796
+ } else if (/污渍/.test(point) || /黑/.test(point) || /水/.test(point)) {
797
+ response += "地面上有一块小污渍,似乎是某种腐蚀性物质损坏了地板。";
798
+ response += "\n\n你抬头望去,污渍刚好位于天花板的管道下方。";
799
+ } else {
800
+ return "你观察了一会,并没有什么特别的发现。";
509
801
  }
510
- __name(removeItemFromInventory, "removeItemFromInventory");
511
- async function addTaskToDoneTasks(session, task) {
512
- const state = await getPlayerState(session);
513
- const newTasks = [...state.doneTasks, task];
514
- await ctx.database.upsert("rusty_lake_games", [
515
- {
516
- id: state.id,
517
- gameId: state.gameId,
518
- gameName: state.gameName,
519
- currentRoom: state.currentRoom,
520
- inventory: state.inventory,
521
- visitedRooms: state.visitedRooms,
522
- doneTasks: newTasks
802
+ return response;
803
+ }
804
+ __name(handleElectrical, "handleElectrical");
805
+
806
+ // src/rooms/hide.ts
807
+ async function handleHide(ctx, session, state, Config2, point) {
808
+ let response = "";
809
+ if (/机器/.test(point) || /门/.test(point)) {
810
+ if (!state.doneTasks.includes("进入机器")) {
811
+ response += "这台机器嵌入墙体里,一直延伸到天花板,有一个开放的门通入机器舱内。";
812
+ response += "\n\n舱内有足够的空间来容纳所有玩家。";
813
+ if (state.doneTasks.includes("机器电")) {
814
+ response += "\n\n现在机器已通电,舱内的灯亮了起来。旁边的屏幕上出现一行消息:\n\n“运行 记忆-提取.exe”";
815
+ } else {
816
+ response += "\n\n机器外面有一个带屏幕的面板,旁边的屏幕上显示着信息:\n\n电力不足。";
523
817
  }
524
- ]);
818
+ } else {
819
+ await session.send("机器运继续转着,旁边的屏幕上写着:“进入舱内”。");
820
+ await session.send("走进机器舱内,机器开始轻微嗡鸣。你想起自己的记忆:(输入你应该说的东西)");
821
+ const choice = await session.prompt(Config2.timeout);
822
+ if (/思维/.test(choice) && /灵魂/.test(choice) && /记忆/.test(choice) && /视力/.test(choice) && /大门/.test(choice)) {
823
+ let msg = "";
824
+ msg += "你反复念着这些词语,房间内的光线变得更明亮了。";
825
+ msg += "\n\n机器的舱门猛地关上,将你彻底困在里面。";
826
+ msg += "\n\n舱室开始摇晃,你感到一股巨大的能量在你体内涌动,此时一道白光在你眼前闪过,突然万籁俱寂。";
827
+ msg += "\n\n机器停止运转,灯光熄灭,但舱门依旧紧闭。";
828
+ msg += "\n\n。你注意到脚边有什么东西,于是望向地面——是个黑方块。";
829
+ await session.send(msg);
830
+ await new Promise((resolve) => setTimeout(resolve, 1e4));
831
+ let msg1 = "";
832
+ msg1 += "你用双手拾起方块,它比你想象得要轻。方块表面光滑、触感冰凉。";
833
+ msg1 += "\n\n你仔细检查了一下,发现它的材质就像玻璃一样通透。\n\n你看向方块内部,发现里面有一个小房间,墙壁上铺着白色的瓷砖。";
834
+ msg1 += "\n\n定睛一看,你发现自己正在那房间里面 。";
835
+ await session.send(msg1);
836
+ await new Promise((resolve) => setTimeout(resolve, 1e4));
837
+ let msg2 = "";
838
+ msg2 += "你呢喃着\n\n“是时候醒来了。”";
839
+ msg2 += "\n\n你说出这些词语后,感觉身体被拽进了方块里。周遭的一切都变得黑暗起来,你坠入到自己熟睡中的深层意识里。";
840
+ msg2 += "\n\n你的记忆开始衰退,就如逐渐消弭的梦境,你所见到的一切也开始消失。";
841
+ msg2 += "\n\n最后萦绕在你脑海中的,只有那句话:";
842
+ await session.send(msg2);
843
+ await new Promise((resolve) => setTimeout(resolve, 1e4));
844
+ await session.send("“是时候醒来了。”");
845
+ } else {
846
+ return "你迟疑着,没有动作。";
847
+ }
848
+ }
849
+ } else if (/海报/.test(point) || /画/.test(point) || /墙/.test(point)) {
850
+ response += "墙上钉着一张海报,上面有的图案看起来很眼熟。";
851
+ response += "\n\n用来钉住海报的图钉在海报中间,海报略微有些晃动。";
852
+ } else if (/按钮/.test(point)) {
853
+ await session.send("墙上有一个小面板,上面有一个巨大的红色按钮。要按下去吗?(是/否)");
854
+ const choice = await session.prompt(Config2.timeout);
855
+ if (choice === "是") {
856
+ response += "你选择按下按钮。";
857
+ response += "\n\n按下按钮的一瞬间,你听到了墙内传来沉重的机械运转声。";
858
+ response += "\n\n按钮旁边的墙面变成了一扇方形的大门,朝着你的方向缓缓开启。";
859
+ response += "\n\n门的另一侧上写着你熟悉的那句话:";
860
+ response += "\n\n“是时候醒来了。”";
861
+ response += "\n\n你看向门外,认出这是走廊。";
862
+ await addTaskToDoneTasks(ctx, session, "隐藏门");
863
+ } else {
864
+ return "你迟疑着,没有动作。";
865
+ }
866
+ } else if (/纸/.test(point) || /地/.test(point)) {
867
+ response += "地上散落着一堆纸张。所有的纸张都是空白的。";
868
+ if (!state.inventory.includes("金属小钥匙")) {
869
+ response += "\n\n你在纸张下面找到了一把金属小钥匙。\n(可在物品指令中查看)";
870
+ await addItemToInventory(ctx, session, "金属小钥匙");
871
+ } else {
872
+ response += "\n\n你观察了一会,并没有什么特别的发现。";
873
+ }
874
+ } else if (/监控/.test(point) || /摄像/.test(point)) {
875
+ response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
876
+ response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
877
+ } else {
878
+ return "你观察了一会,并没有什么特别的发现。";
525
879
  }
526
- __name(addTaskToDoneTasks, "addTaskToDoneTasks");
527
- command.subcommand(".查看 <point>", "探索当前场景或拥有的物品").action(async ({ session }, point) => {
528
- const state = await getPlayerState(session);
529
- const currentRoom = rooms.find((room) => room.id === state.currentRoom);
530
- let response = "";
531
- if (point === "上锁的盒子") {
532
- await session.send("上面挂着五位数字密码的锁,里面似乎有金属的声音。");
533
- if (state.inventory.includes("半张纸条a") && state.inventory.includes("半张纸条b") && state.inventory.includes("隐藏密码线索")) {
534
- if (!state.inventory.includes("钥匙")) {
535
- await session.send("你似乎收集到了足够的线索,要试试打开盒子吗?(是/否)");
536
- const choice = await session.prompt(5e3);
880
+ return response;
881
+ }
882
+ __name(handleHide, "handleHide");
883
+
884
+ // src/rooms/kitchen.ts
885
+ async function handleKitchen(ctx, session, state, Config2, point) {
886
+ let response = "";
887
+ if (/衣/.test(point) || /外套/.test(point) || /椅/.test(point)) {
888
+ response += "椅背上挂着一件白大褂。";
889
+ if (!state.inventory.includes("身份证")) {
890
+ response += "\n\n里面有一张身份证。上面的照片已经褪色,但名字写着“R. Vanderboom”\n(可在物品指令中查看)";
891
+ await addItemToInventory(ctx, session, "身份证");
892
+ } else {
893
+ response += "\n\n你观察了一会,并没有什么特别的发现。";
894
+ }
895
+ } else if (/水槽/.test(point) || /水池/.test(point) || /龙头/.test(point)) {
896
+ if (!state.doneTasks.includes("水")) {
897
+ response += "你打开水龙头,并没有水流出。";
898
+ } else {
899
+ response += "你打开水龙头,清水汩汩流淌。你随时都能取到水。";
900
+ }
901
+ } else if (/咖啡/.test(point)) {
902
+ if (state.doneTasks.includes("房间电")) {
903
+ if (!state.inventory.includes("咖啡")) {
904
+ if (state.inventory.includes("咖啡杯") && state.inventory.includes("咖啡壶") && state.inventory.includes("滤纸") && state.doneTasks.includes("水")) {
905
+ await session.send("你发现手里的东西似乎足够做一杯咖啡,要做吗?(是/否)");
906
+ const choice = await session.prompt(Config2.timeout);
537
907
  if (choice === "是") {
538
- await session.send("输入五位数字密码:");
539
- const choice2 = await session.prompt(15e3);
540
- if (choice2 === "26773" || choice2 === "26779" || choice2 === "26771") {
541
- response += "你打开了盒子,里面只有一把钥匙。\n(可在物品指令中查看)";
542
- response += "\n\n你丢掉了没用的空盒子。";
543
- await addItemToInventory(session, "钥匙");
544
- await removeItemFromInventory(session, "上锁的盒子");
545
- } else {
546
- return "锁并未解开。是输错了吗?";
547
- }
908
+ response += "你做了一杯咖啡。\n(可在物品指令中查看)";
909
+ await addItemToInventory(ctx, session, "咖啡");
910
+ await removeItemFromInventory(ctx, session, "咖啡杯");
548
911
  } else {
549
912
  return "你迟疑着,没有动作。";
550
913
  }
551
914
  } else {
552
- response += "你观察了一会,并没有什么特别的发现。";
915
+ response += "你拥有的东西还不足以做一杯咖啡。";
553
916
  }
554
917
  } else {
555
- return "你还没有收集到足够的线索。";
918
+ return "你已经有一杯咖啡了。";
556
919
  }
557
- } else if (point === "实验说明") {
558
- await session.send("你打开笔记本,上面似乎是某个实验的说明。");
559
- await session.send(import_koishi.h.image(images.description));
560
- if (!state.inventory.includes("黑色混合物") && !state.inventory.includes("手")) {
561
- if (state.doneTasks.includes("水") && state.doneTasks.includes("酸") && state.inventory.includes("咖啡") && state.inventory.includes("肉") && state.inventory.includes("烧杯")) {
562
- await session.send("你似乎收集到了足够的材料,要试试这个实验吗?(是/否)");
563
- const choice = await session.prompt(5e3);
564
- if (choice === "") {
565
- response += "你拿出烧杯,对照着实验说明开始加入材料。";
566
- response += "\n\n首先来到厨房,往烧杯里加了四分之一的水。";
567
- response += "\n\n又前往电气室,往烧杯里加了四分之一的酸。";
568
- response += "\n\n拿出之前泡好的咖啡倒了进去,又加入了冷藏箱里获得的肉。";
569
- response += "\n\n回到化学实验室,将这一杯不可名状的物质搅拌了一会,变成了一杯奇怪的黑色混合物。\n(可在物品指令中查看)";
570
- await removeItemFromInventory(session, "烧杯");
571
- await removeItemFromInventory(session, "咖啡");
572
- await addItemToInventory(session, "咖啡杯");
573
- await removeItemFromInventory(session, "肉");
574
- await addItemToInventory(session, "黑色混合物");
575
- } else {
576
- return "你迟疑着,没有动作。";
577
- }
920
+ } else {
921
+ response += "咖啡机似乎没有通电,没有任何反应。";
922
+ }
923
+ } else if (/柜/.test(point)) {
924
+ if (!state.doneTasks.includes("水")) {
925
+ await session.send("你打开水槽下的柜子,发现水阀紧紧关闭着。");
926
+ if (state.inventory.includes("扳手")) {
927
+ await session.send("你想起之前拿到的扳手。要试着拧开水阀吗?(是/否)");
928
+ const choice = await session.prompt(Config2.timeout);
929
+ if (choice === "") {
930
+ await addTaskToDoneTasks(ctx, session, "");
931
+ return "现在你随时都能取到水。";
578
932
  } else {
579
- return "你还没有收集到足够的材料。";
933
+ return "你迟疑着,没有动作。";
580
934
  }
581
935
  } else {
582
- response += "你已经做过这个实验了。";
936
+ response += "你观察了一会,并没有什么特别的发现。";
583
937
  }
584
- } else if (point === "软盘") {
585
- response += "你将软盘插入电脑里时,一个程序开始启动。";
586
- response += "\n\n一个黑色控制台出现,上面标有‘记忆-提取程序’的字样,程序加载的进度条缓慢推进。";
587
- response += "\n\n同时,一个播放器在屏幕上弹了出来,开始播放视频。";
588
- response += "\n\n你看到自己站在机器里,直视摄像头,不断重复着同样的话:\n\n思维、灵魂、记忆、视力、大门。";
589
- response += "\n\n视频重复播放了几次后,背景中的进度条加载到了100%,所有屏幕随之关闭。";
590
- await addTaskToDoneTasks(session, "进入机器");
591
938
  } else {
592
- if (currentRoom.id === "bedroom") {
593
- if (/床/.test(point)) {
594
- response += "很简单的上下床,有多少人都能睡下。";
595
- if (!state.inventory.includes("半张纸条a")) {
596
- response += "\n\n你在床铺的垫子下发现了半张纸条。\n(可在物品指令中查看)";
597
- response += import_koishi.h.image(images.notea);
598
- await addItemToInventory(session, "半张纸条a");
599
- } else {
600
- response += "\n\n你观察了一会,并没有什么特别的发现。";
601
- }
602
- } else if (/柜/.test(point) || /抽屉/.test(point)) {
603
- await session.send("一张小巧而简单的柜子靠墙而立,有三个抽屉。");
604
- if (!state.inventory.includes("手电筒")) {
605
- await session.send("要拉开看看吗?(是/否)");
606
- const choice = await session.prompt(5e3);
607
- if (choice === "") {
608
- response += "顶部的抽屉内有一个上锁的盒子。\n(可在物品指令中查看)";
609
- await addItemToInventory(session, "上锁的盒子");
610
- response += "\n\n中间的抽屉内有纸条的另一半。\n(可在物品指令中查看)";
611
- response += import_koishi.h.image(images.noteb);
612
- await addItemToInventory(session, "半张纸条b");
613
- response += "\n\n底部的抽屉内有一个手电筒。\n(可在物品指令中查看)";
614
- await addItemToInventory(session, "手电筒");
615
- } else {
616
- return "你迟疑着,没有动作。";
617
- }
618
- } else {
619
- return "你观察了一会,并没有什么特别的发现。";
620
- }
621
- } else if (/地毯/.test(point)) {
622
- await session.send("整洁的地毯,下面的地面上似乎写了什么。环境太过昏暗,你看不清。");
623
- if (state.inventory.includes("手电筒")) {
624
- await session.send("你拥有手电筒。要打开照明吗?(是/否)");
625
- const choice = await session.prompt(5e3);
626
- if (choice === "是") {
627
- if (!state.inventory.includes("隐藏密码线索")) {
628
- response += "地上刻画着一些字符,似乎是什么密码的线索。\n(可在物品指令中查看)";
629
- response += import_koishi.h.image(images.code);
630
- await addItemToInventory(session, "隐藏密码线索");
631
- } else {
632
- response += "\n\n你观察了一会,并没有什么特别的发现。";
633
- }
634
- } else {
635
- return "你迟疑着,没有动作。";
636
- }
939
+ response += "水阀已经打开,你随时都能取到水。";
940
+ }
941
+ } else if (/垃圾/.test(point)) {
942
+ response += "垃圾桶周围萦绕着嗡嗡作响的苍蝇。";
943
+ if (!state.inventory.includes("滤纸")) {
944
+ response += "\n\n里装满了用过的咖啡滤纸,有些滤纸里有咖啡渣。";
945
+ response += "\n\n你拿了一张,似乎可以用它来制作咖啡。\n(可在物品指令中查看)";
946
+ await addItemToInventory(ctx, session, "滤纸");
947
+ } else {
948
+ response += "\n\n你观察了一会,并没有什么特别的发现。";
949
+ }
950
+ } else if (/箱/.test(point) && point !== "垃圾箱" || /桌/.test(point) || /篮/.test(point) || /盒/.test(point)) {
951
+ await session.send("桌上冷藏箱锁着,需用四个大写字母组成的密码才能打开。");
952
+ if (!state.inventory.includes("")) {
953
+ if (state.inventory.includes("实验说明")) {
954
+ await session.send("你似乎收集到了足够的线索,要试试打开盒子吗?(是/否)");
955
+ const choice = await session.prompt(Config2.timeout);
956
+ if (choice === "") {
957
+ await session.send("输入四个大写字母密码:");
958
+ const choice2 = await session.prompt(Config2.timeout);
959
+ if (choice2 === "COLD") {
960
+ response += "你打开了冷藏箱,里面放着一块肉,下面铺着冰块。";
961
+ response += "\n\n你拿起了那块不知道是什么生物的肉。\n(可在物品指令中查看)";
962
+ await addItemToInventory(ctx, session, "肉");
637
963
  } else {
638
- return "你观察了一会,并没有什么特别的发现。";
964
+ return "锁并未解开。是输错了吗?";
639
965
  }
640
- } else if (/门/.test(point)) {
641
- if (!state.doneTasks.includes("走廊锁")) {
642
- await session.send("这扇装有坚固的金属门把手的白门被锁上了,需要钥匙才能开。");
643
- if (state.inventory.includes("钥匙")) {
644
- await session.send("你拥有钥匙。要试着开门吗?(是/否)");
645
- const choice = await session.prompt(5e3);
646
- if (choice === "是") {
647
- await addTaskToDoneTasks(session, "走廊锁");
648
- const newState = await getPlayerState(session);
649
- await ctx.database.upsert("rusty_lake_games", [
650
- {
651
- id: newState.id,
652
- gameId: newState.gameId,
653
- gameName: newState.gameName,
654
- currentRoom: "corridor",
655
- inventory: newState.inventory,
656
- visitedRooms: [...newState.visitedRooms, "corridor"],
657
- doneTasks: newState.doneTasks
658
- }
659
- ]);
660
- response += "你小心翼翼地打开门,迈步走了出去。";
661
- response += "\n\n你走进一条长长的、昏暗的走廊,尽头分成两条岔路。";
662
- response += "\n\n你发现墙上钉着一张地图,旁边是你进入的地方。地图描绘了包括你刚刚走出来的房间在内的所有房间。";
663
- response += import_koishi.h.image(images.corridor);
664
- response += "\n\n在走廊的尽头,你看到墙上写着些什么。那是用黑色马克笔写着一条信息:\n\n“是时候醒来了。";
665
- } else {
666
- return "你迟疑着,没有动作。";
667
- }
966
+ } else {
967
+ return "你迟疑着,没有动作。";
968
+ }
969
+ } else {
970
+ response += "你观察了一会,并没有什么特别的发现。";
971
+ }
972
+ } else {
973
+ return "已经拿到肉了,就别再看冷藏箱了。";
974
+ }
975
+ } else if (/电话/.test(point)) {
976
+ if (!state.doneTasks.includes("机器电")) {
977
+ if (state.doneTasks.includes("房间电")) {
978
+ await session.send("你拿起听筒,里面的电流声似乎催促着你输入号码。");
979
+ if (state.doneTasks.includes("电话号码")) {
980
+ await session.send("你猛然想起似乎在什么地方看到过一些数字。\n(输入你觉得正确的号码)");
981
+ const choice = await session.prompt(Config2.timeout);
982
+ if (choice === "099174190") {
983
+ await session.send("听筒里电流声消失,却传来刺耳的声音。你仔细分辨,才明白对方说的是:\n\n“你是谁?”");
984
+ await session.send("你思考着怎么回答。(输入你觉得正确的文字)");
985
+ const choice2 = await session.prompt(Config2.timeout);
986
+ if (/vanderboom/.test(choice2) || /Vanderboom/.test(choice2)) {
987
+ response += "沉默了一会,你听到听筒里发出声音:\n\n“3141”";
988
+ await addTaskToDoneTasks(ctx, session, "电脑密码");
668
989
  } else {
669
- return "你观察了一会,并没有什么特别的发现。";
990
+ return "听筒里安静了一会,变成了滋滋的电流声。";
670
991
  }
992
+ } else if (choice === "110") {
993
+ return "你输入报警电话,没有任何反应。这似乎是个与世隔绝的地方。";
994
+ } else if (choice === "119") {
995
+ return "你输入火警电话,没有任何反应。这似乎是个与世隔绝的地方。";
996
+ } else if (choice === "120") {
997
+ return "你输入急救电话,没有任何反应。这似乎是个与世隔绝的地方。";
671
998
  } else {
672
- response += "这扇门通往走廊,你随时可以离开。";
673
- }
674
- } else if (/开关/.test(point)) {
675
- response += "老式的电灯开关。";
676
- if (state.doneTasks.includes("房间电")) {
677
- response += "\n\n你打开开关,电灯发出惨白的光亮。";
678
- } else {
679
- response += "\n\n你反复拨弄开关,但没有任何反应。这里似乎停电了。";
680
- }
681
- } else if (/监控/.test(point) || /摄像/.test(point)) {
682
- response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
683
- response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
684
- } else if (/通风/.test(point)) {
685
- if (!state.doneTasks.includes("隐藏房间锁")) {
686
- await session.send("通风口被一块挡板覆盖,挡板被螺丝固定在墙上。");
687
- if (state.inventory.includes("螺丝刀")) {
688
- await session.send("你拥有螺丝刀。要试着拆开挡板吗?(是/否)");
689
- const choice = await session.prompt(5e3);
690
- if (choice === "是") {
691
- await session.send("你拆开了挡板,通风口内幽暗昏聩,像是个迷宫。");
692
- if (state.inventory.includes("指示图")) {
693
- let msg = "";
694
- msg += "你细细思忖,好像有什么东西可以用在这里。猛然间,你想起了在办公室拿到的指示图:";
695
- msg += import_koishi.h.image(images.diagram);
696
- msg += "\n\n你在迷宫里仔细探索摸路,终于明白自己进来的地方对应着方块1。";
697
- msg += "\n(图里的方块从上到下从左到右分别为123456)";
698
- msg += "\n\n你想了想,觉得哪里不对。(输入你觉得有问题的编号)";
699
- await session.send(msg);
700
- const choice2 = await session.prompt(15e3);
701
- if (choice2 === "6") {
702
- response += "你摸索着来到6号方块的位置,透过通风口,看到的竟然是一个从未发现过的房间。";
703
- response += "\n\n你设法打开通风口,从布满灰尘的通风口爬出来,到了一个黑暗房间的冰冷地板上,脑袋差点撞到上方的桌子。";
704
- response += "\n\n你艰难地从桌子下面爬出来,然后就看到了嵌入进墙体里的巨型机器矗立在你眼前,一个小屏幕发出红光,显示着闪烁的消息。“";
705
- response += import_koishi.h.image(images.hide);
706
- await addTaskToDoneTasks(session, "隐藏房间锁");
707
- const newState = await getPlayerState(session);
708
- await ctx.database.upsert("rusty_lake_games", [
709
- {
710
- id: newState.id,
711
- gameId: newState.gameId,
712
- gameName: newState.gameName,
713
- currentRoom: "hide",
714
- inventory: newState.inventory,
715
- visitedRooms: [...newState.visitedRooms, "hide"],
716
- doneTasks: newState.doneTasks
717
- }
718
- ]);
719
- } else {
720
- return "你想了想,好像没什么奇怪的。保险起见,你退了出来,装回了挡板。";
721
- }
722
- } else {
723
- return "摸索了一阵,你毫无头绪。保险起见,你退了出来,装回了挡板。";
724
- }
725
- } else {
726
- return "你迟疑着,没有动作。";
727
- }
728
- } else {
729
- return "你观察了一会,并没有什么特别的发现。";
730
- }
731
- } else {
732
- return "通风口通向隐藏房间,并没有什么特别的发现。";
999
+ return "你输入号码,没有任何反应。";
733
1000
  }
734
1001
  } else {
735
- return "你观察了一会,并没有什么特别的发现。";
1002
+ return "你想不到可以拨打的号码,索性把听筒放了回去。";
736
1003
  }
737
- } else if (currentRoom.id === "corridor") {
738
- if (/厨房/.test(point)) {
739
- if (!state.doneTasks.includes("厨房锁")) {
740
- response += "厨房的门没锁,你开门走了进去。";
741
- response += "\n\n你走进厨房,面前是一张小桌子和一把椅子。";
742
- response += "\n\n远端的墙上有一个厨台,上面放着一个咖啡机。";
743
- response += "\n\n你听到角落的垃圾桶周围萦绕着嗡嗡作响的苍蝇声。";
744
- response += import_koishi.h.image(images.kitchen);
745
- await addTaskToDoneTasks(session, "厨房锁");
746
- const newState = await getPlayerState(session);
747
- await ctx.database.upsert("rusty_lake_games", [
748
- {
749
- id: newState.id,
750
- gameId: newState.gameId,
751
- gameName: newState.gameName,
752
- currentRoom: "kitchen",
753
- inventory: newState.inventory,
754
- visitedRooms: [...newState.visitedRooms, "kitchen"],
755
- doneTasks: newState.doneTasks
756
- }
757
- ]);
758
- } else {
759
- response += "你观察了一会,并没有什么特别的发现。";
760
- }
761
- } else if (/实验室/.test(point)) {
762
- if (!state.doneTasks.includes("实验室锁")) {
763
- response += "你来到化学实验室门口。";
764
- response += "\n\n当你靠近门边时,嗅到了从另外一侧传来的浓烈化学气味,直冲鼻腔。";
765
- response += "\n\n门没锁,你开门走了进去。";
766
- response += "\n\n化学实验室出奇地空旷——里面只有一个小型实验台立在房间中央,上面摆着少量化学设备。";
767
- response += "\n\n然而一股令人不安的寒意掠过你的脊背,你总感觉有什么东西在注视着你。";
768
- response += import_koishi.h.image(images.laboratory);
769
- await addTaskToDoneTasks(session, "实验室锁");
770
- const newState = await getPlayerState(session);
771
- await ctx.database.upsert("rusty_lake_games", [
772
- {
773
- id: newState.id,
774
- gameId: newState.gameId,
775
- gameName: newState.gameName,
776
- currentRoom: "laboratory",
777
- inventory: newState.inventory,
778
- visitedRooms: [...newState.visitedRooms, "laboratory"],
779
- doneTasks: newState.doneTasks
780
- }
781
- ]);
782
- } else {
783
- response += "你观察了一会,并没有什么特别的发现。";
784
- }
785
- } else if (/电/.test(point)) {
786
- if (!state.doneTasks.includes("电锁")) {
787
- await session.send("通往电气室的门是锁着的。门把手是简单的旋转式,看起来不是很牢固,中间有一个钥匙孔。");
788
- await session.send("你准备想办法把门弄开。(输入准备使用的道具或方式)");
789
- const choice = await session.prompt(15e3);
790
- if (choice === "回形针" && state.inventory.includes("回形针")) {
791
- response += "你使用回形针作为撬锁工具强行开门。";
792
- response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
793
- response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
794
- response += import_koishi.h.image(images.electrical);
795
- await addTaskToDoneTasks(session, "电锁");
796
- const newState = await getPlayerState(session);
797
- await ctx.database.upsert("rusty_lake_games", [
798
- {
799
- id: newState.id,
800
- gameId: newState.gameId,
801
- gameName: newState.gameName,
802
- currentRoom: "electrical",
803
- inventory: newState.inventory,
804
- visitedRooms: [...newState.visitedRooms, "electrical"],
805
- doneTasks: newState.doneTasks
806
- }
807
- ]);
808
- } else if (choice === "身份证" && state.inventory.includes("身份证")) {
809
- response += "你使用身份证,将其插入门缝中,来回晃动将锁打开。";
810
- response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
811
- response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
812
- response += import_koishi.h.image(images.electrical);
813
- await addTaskToDoneTasks(session, "电锁");
814
- const newState = await getPlayerState(session);
815
- await ctx.database.upsert("rusty_lake_games", [
816
- {
817
- id: newState.id,
818
- gameId: newState.gameId,
819
- gameName: newState.gameName,
820
- currentRoom: "electrical",
821
- inventory: newState.inventory,
822
- visitedRooms: [...newState.visitedRooms, "electrical"],
823
- doneTasks: newState.doneTasks
824
- }
825
- ]);
826
- } else if (/力/.test(choice)) {
827
- response += "你用蛮力将门弄开。";
828
- response += "\n\n门嘎吱作响地打开了,映入眼帘的是一个狭小的房间,空气中弥漫着一股霉味。";
829
- response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
830
- response += import_koishi.h.image(images.electrical);
831
- await addTaskToDoneTasks(session, "电锁");
832
- const newState = await getPlayerState(session);
833
- await ctx.database.upsert("rusty_lake_games", [
834
- {
835
- id: newState.id,
836
- gameId: newState.gameId,
837
- gameName: newState.gameName,
838
- currentRoom: "electrical",
839
- inventory: newState.inventory,
840
- visitedRooms: [...newState.visitedRooms, "electrical"],
841
- doneTasks: newState.doneTasks
842
- }
843
- ]);
844
- } else {
845
- return "你想了又想,没找到好方法。";
846
- }
847
- } else {
848
- response += "你观察了一会,并没有什么特别的发现。";
849
- }
850
- } else if (/办公室/.test(point)) {
851
- if (!state.doneTasks.includes("办公室锁")) {
852
- await session.send("办公室的门被一个牢固的电子锁锁住,旁边有一个指纹读取器。");
853
- if (state.doneTasks.includes("房间电")) {
854
- await session.send("你试了试自己的指纹,读取器闪烁红灯,门并未打开。");
855
- if (state.inventory.includes("手")) {
856
- await session.send("你想起之前在化学实验室造出的那只手,要试试吗?(是/否)");
857
- const choice = await session.prompt(5e3);
858
- if (choice === "是") {
859
- response += "你将不断抽搐着的断手按在指纹读取器上,绿灯亮起,门打开了。";
860
- response += "\n\n进入房间时,你发现这里的风格如此不同,";
861
- response += "\n\n简朴干净的白色墙纸与遍布整座设施的冰冷单调的白色瓷砖形成了鲜明的对比。";
862
- response += "\n\n房间中央有一张桌子,上面放着一台电脑,发出轻微的电流声。";
863
- response += import_koishi.h.image(images.office);
864
- await addTaskToDoneTasks(session, "办公室锁");
865
- const newState = await getPlayerState(session);
866
- await ctx.database.upsert("rusty_lake_games", [
867
- {
868
- id: newState.id,
869
- gameId: newState.gameId,
870
- gameName: newState.gameName,
871
- currentRoom: "office",
872
- inventory: newState.inventory,
873
- visitedRooms: [...newState.visitedRooms, "office"],
874
- doneTasks: newState.doneTasks
875
- }
876
- ]);
877
- } else {
878
- return "你迟疑着,没有动作。";
879
- }
880
- } else {
881
- response += "你观察了一会,并没有什么特别的发现。";
882
- }
883
- } else {
884
- response += "指纹读取器此时并没有打开,似乎是没电导致的。";
885
- }
886
- } else {
887
- response += "你观察了一会,并没有什么特别的发现。";
888
- }
889
- } else if (/墙/.test(point)) {
890
- if (state.doneTasks.includes("隐藏门")) {
891
- response += "原本的墙壁已经变成一个门洞,通往隐藏房间。";
892
- response += "\n\n现在,你终于不用钻通风口来进出隐藏房间了。";
893
- } else {
894
- response += "走廊尽头的墙上用黑色马克笔写着一条信息:";
895
- response += "\n\n“是时候醒来了。”";
896
- }
1004
+ } else {
1005
+ response += "电话似乎没有通电,没有任何反应。";
1006
+ }
1007
+ } else {
1008
+ response += "你拿起听筒,电话的另一端传来沙哑的声音。\n\n“咚咚咚,真相隐于湖后。”";
1009
+ response += "\n\n随后电话便被挂断。";
1010
+ }
1011
+ } else if (/通风/.test(point)) {
1012
+ response += "天花板上有一个小通风口,位置很高。";
1013
+ response += "\n\n你站在高处往里看,但没有任何发现。";
1014
+ } else if (/监控/.test(point) || /摄像/.test(point)) {
1015
+ response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
1016
+ response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
1017
+ } else {
1018
+ return "你观察了一会,并没有什么特别的发现。";
1019
+ }
1020
+ return response;
1021
+ }
1022
+ __name(handleKitchen, "handleKitchen");
1023
+
1024
+ // src/rooms/laboratory.ts
1025
+ var import_koishi6 = require("koishi");
1026
+ async function handleLaboratory(ctx, session, state, Config2, point) {
1027
+ let response = "";
1028
+ if (/实验台/.test(point) || /桌/.test(point)) {
1029
+ await session.send("一张简单的桌子当做实验台,上面固定着一个本生灯,需要火柴才能点燃。");
1030
+ if (!state.inventory.includes("咖啡壶")) {
1031
+ await session.send("你看了看桌面,拿走了咖啡杯和咖啡壶。\n(可在物品指令中查看)");
1032
+ await addItemToInventory(ctx, session, "咖啡杯");
1033
+ await addItemToInventory(ctx, session, "咖啡壶");
1034
+ if (!state.inventory.includes("回形针")) {
1035
+ await session.send("实验台右侧有两个抽屉,要拉开看看吗?(是/否)");
1036
+ const choice = await session.prompt(Config2.timeout);
1037
+ if (choice === "是") {
1038
+ response += "上面的抽屉里有一本写有实验说明的笔记本和一个装满火柴的火柴盒。";
1039
+ response += import_koishi6.h.image(images.description);
1040
+ await addItemToInventory(ctx, session, "实验说明");
1041
+ await addItemToInventory(ctx, session, "火柴盒");
1042
+ response += "\n\n下面的抽屉里面有几张松散的、空白的纸张和一个装有几枚回形针的小盒子。";
1043
+ await addItemToInventory(ctx, session, "回形针");
1044
+ response += "\n\n你拿走了实验说明、火柴盒和回形针。\n(可在物品指令中查看)";
897
1045
  } else {
898
- return "你观察了一会,并没有什么特别的发现。";
1046
+ return "你迟疑着,没有动作。";
899
1047
  }
900
- } else if (currentRoom.id === "kitchen") {
901
- if (/衣/.test(point) || /外套/.test(point) || /椅/.test(point)) {
902
- response += "椅背上挂着一件白大褂。";
903
- if (!state.inventory.includes("身份证")) {
904
- response += "\n\n里面有一张身份证。上面的照片已经褪色,但名字写着“R. Vanderboom”\n(可在物品指令中查看)";
905
- await addItemToInventory(session, "身份证");
906
- } else {
907
- response += "\n\n你观察了一会,并没有什么特别的发现。";
908
- }
909
- } else if (/水槽/.test(point) || /水池/.test(point) || /龙头/.test(point)) {
910
- if (!state.doneTasks.includes("")) {
911
- response += "你打开水龙头,并没有水流出。";
912
- } else {
913
- response += "你打开水龙头,清水汩汩流淌。你随时都能取到水。";
914
- }
915
- } else if (/咖啡/.test(point)) {
916
- if (state.doneTasks.includes("房间电")) {
917
- if (!state.inventory.includes("咖啡")) {
918
- if (state.inventory.includes("咖啡杯") && state.inventory.includes("咖啡壶") && state.inventory.includes("滤纸") && state.doneTasks.includes("水")) {
919
- await session.send("你发现手里的东西似乎足够做一杯咖啡,要做吗?(是/否)");
920
- const choice = await session.prompt(5e3);
921
- if (choice === "是") {
922
- response += "你做了一杯咖啡。\n(可在物品指令中查看)";
923
- await addItemToInventory(session, "咖啡");
924
- await removeItemFromInventory(session, "咖啡杯");
925
- } else {
926
- return "你迟疑着,没有动作。";
927
- }
928
- } else {
929
- response += "你拥有的东西还不足以做一杯咖啡。";
930
- }
931
- } else {
932
- return "你已经有一杯咖啡了。";
933
- }
934
- } else {
935
- response += "咖啡机似乎没有通电,没有任何反应。";
936
- }
937
- } else if (/柜/.test(point)) {
938
- if (!state.doneTasks.includes("水")) {
939
- await session.send("你打开水槽下的柜子,发现水阀紧紧关闭着。");
940
- if (state.inventory.includes("扳手")) {
941
- await session.send("你想起之前拿到的扳手。要试着拧开水阀吗?(是/否)");
942
- const choice = await session.prompt(5e3);
943
- if (choice === "是") {
944
- await addTaskToDoneTasks(session, "水");
945
- return "现在你随时都能取到水。";
946
- } else {
947
- return "你迟疑着,没有动作。";
948
- }
949
- } else {
950
- response += "你观察了一会,并没有什么特别的发现。";
951
- }
952
- } else {
953
- response += "水阀已经打开,你随时都能取到水。";
954
- }
955
- } else if (/垃圾/.test(point)) {
956
- response += "垃圾桶周围萦绕着嗡嗡作响的苍蝇。";
957
- if (!state.inventory.includes("滤纸")) {
958
- response += "\n\n里装满了用过的咖啡滤纸,有些滤纸里有咖啡渣。";
959
- response += "\n\n你拿了一张,似乎可以用它来制作咖啡。\n(可在物品指令中查看)";
960
- await addItemToInventory(session, "滤纸");
961
- } else {
962
- response += "\n\n你观察了一会,并没有什么特别的发现。";
963
- }
964
- } else if (/箱/.test(point) && point !== "垃圾箱" || /桌/.test(point) || /篮/.test(point) || /盒/.test(point)) {
965
- await session.send("桌上冷藏箱锁着,需用四个大写字母组成的密码才能打开。");
966
- if (!state.inventory.includes("肉")) {
967
- if (state.inventory.includes("实验说明")) {
968
- await session.send("你似乎收集到了足够的线索,要试试打开盒子吗?(是/否)");
969
- const choice = await session.prompt(5e3);
970
- if (choice === "是") {
971
- await session.send("输入四个大写字母密码:");
972
- const choice2 = await session.prompt(15e3);
973
- if (choice2 === "COLD") {
974
- response += "你打开了冷藏箱,里面放着一块肉,下面铺着冰块。";
975
- response += "\n\n你拿起了那块不知道是什么生物的肉。\n(可在物品指令中查看)";
976
- await addItemToInventory(session, "肉");
977
- } else {
978
- return "锁并未解开。是输错了吗?";
979
- }
980
- } else {
981
- return "你迟疑着,没有动作。";
982
- }
983
- } else {
984
- response += "你观察了一会,并没有什么特别的发现。";
985
- }
986
- } else {
987
- return "已经拿到肉了,就别再看冷藏箱了。";
988
- }
989
- } else if (/电话/.test(point)) {
990
- if (!state.doneTasks.includes("机器电")) {
991
- if (state.doneTasks.includes("房间电")) {
992
- await session.send("你拿起听筒,里面的电流声似乎催促着你输入号码。");
993
- if (state.doneTasks.includes("电话号码")) {
994
- await session.send("你猛然想起似乎在什么地方看到过一些数字。\n(输入你觉得正确的号码)");
995
- const choice = await session.prompt(15e3);
996
- if (choice === "099174190") {
997
- await session.send("听筒里电流声消失,却传来刺耳的声音。你仔细分辨,才明白对方说的是:\n\n“你是谁?”");
998
- await session.send("你思考着怎么回答。(输入你觉得正确的文字)");
999
- const choice2 = await session.prompt(15e3);
1000
- if (/vanderboom/.test(choice2) || /Vanderboom/.test(choice2)) {
1001
- response += "沉默了一会,你听到听筒里发出声音:\n\n“3141”";
1002
- await addTaskToDoneTasks(session, "电脑密码");
1003
- } else {
1004
- return "听筒里安静了一会,变成了滋滋的电流声。";
1005
- }
1006
- } else if (choice === "110") {
1007
- return "你输入报警电话,没有任何反应。这似乎是个与世隔绝的地方。";
1008
- } else if (choice === "119") {
1009
- return "你输入火警电话,没有任何反应。这似乎是个与世隔绝的地方。";
1010
- } else if (choice === "120") {
1011
- return "你输入急救电话,没有任何反应。这似乎是个与世隔绝的地方。";
1012
- } else {
1013
- return "你输入号码,没有任何反应。";
1014
- }
1015
- } else {
1016
- return "你想不到可以拨打的号码,索性把听筒放了回去。";
1017
- }
1018
- } else {
1019
- response += "电话似乎没有通电,没有任何反应。";
1020
- }
1021
- } else {
1022
- response += "你拿起听筒,电话的另一端传来沙哑的声音。\n\n“咚咚咚,真相隐于湖后。”";
1023
- response += "\n\n随后电话便被挂断。";
1024
- }
1025
- } else if (/通风/.test(point)) {
1026
- response += "天花板上有一个小通风口,位置很高。";
1027
- response += "\n\n你站在高处往里看,但没有任何发现。";
1028
- } else if (/监控/.test(point) || /摄像/.test(point)) {
1029
- response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
1030
- response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
1048
+ } else {
1049
+ return "你观察了一会,并没有什么特别的发现。";
1050
+ }
1051
+ } else {
1052
+ return "你观察了一会,并没有什么特别的发现。";
1053
+ }
1054
+ } else if (/灯/.test(point)) {
1055
+ await session.send("需要火柴才能点燃的本生灯,里面有充足的酒精。");
1056
+ if (state.inventory.includes("火柴盒")) {
1057
+ if (state.inventory.includes("黑色混合物")) {
1058
+ await session.send("你点燃了本生灯,似乎可以用来加热什么东西。你猛然想到刚做出来的那一杯黑色混合物。要试试吗?(是/否)");
1059
+ const choice = await session.prompt(Config2.timeout);
1060
+ if (choice === "是") {
1061
+ response += "你将混合物加热,完成了这个实验。";
1062
+ response += "\n\n混合物开始剧烈地膨胀、起泡,你不自觉地往后退了一步。";
1063
+ response += "\n\n烧杯突然破裂,有什么湿漉漉的东西掉在了地上。";
1064
+ response += "\n\n你定睛一看,混合物消失了,取而代之的是躺在地上的,一只抽搐着的人手。";
1065
+ response += "\n\n你强忍不适把它捡了起来。它似乎轻抚过你的手背。\n(可在物品指令中查看)";
1066
+ await removeItemFromInventory(ctx, session, "黑色混合物");
1067
+ await addItemToInventory(ctx, session, "");
1031
1068
  } else {
1032
- return "你观察了一会,并没有什么特别的发现。";
1069
+ return "你迟疑着,没有动作。";
1033
1070
  }
1034
- } else if (currentRoom.id === "laboratory") {
1035
- if (/实验台/.test(point) || /桌/.test(point)) {
1036
- await session.send("一张简单的桌子当做实验台,上面固定着一个本生灯,需要火柴才能点燃。");
1037
- if (!state.inventory.includes("咖啡壶")) {
1038
- await session.send("你看了看桌面,拿走了咖啡杯和咖啡壶。\n(可在物品指令中查看)");
1039
- await addItemToInventory(session, "咖啡杯");
1040
- await addItemToInventory(session, "咖啡壶");
1041
- if (!state.inventory.includes("回形针")) {
1042
- await session.send("实验台右侧有两个抽屉,要拉开看看吗?(是/否)");
1043
- const choice = await session.prompt(5e3);
1044
- if (choice === "是") {
1045
- response += "上面的抽屉里有一本写有实验说明的笔记本和一个装满火柴的火柴盒。";
1046
- response += import_koishi.h.image(images.description);
1047
- await addItemToInventory(session, "实验说明");
1048
- await addItemToInventory(session, "火柴盒");
1049
- response += "\n\n下面的抽屉里面有几张松散的、空白的纸张和一个装有几枚回形针的小盒子。";
1050
- await addItemToInventory(session, "回形针");
1051
- response += "\n\n你拿走了实验说明、火柴盒和回形针。\n(可在物品指令中查看)";
1052
- } else {
1053
- return "你迟疑着,没有动作。";
1054
- }
1055
- } else {
1056
- return "你观察了一会,并没有什么特别的发现。";
1071
+ } else {
1072
+ response += "你试着点燃了本生灯,又百无聊赖地熄灭了它。";
1073
+ }
1074
+ } else {
1075
+ response += "你没有火柴,安全起见,就不对酒精做什么了。";
1076
+ }
1077
+ } else if (/抽屉/.test(point)) {
1078
+ if (!state.inventory.includes("回形针")) {
1079
+ response += "你拉开实验台右侧的两个抽屉。";
1080
+ response += "\n\n上面的抽屉里有一本写有实验说明的笔记本和一个装满火柴的火柴盒。";
1081
+ response += import_koishi6.h.image(images.description);
1082
+ await addItemToInventory(ctx, session, "实验说明");
1083
+ await addItemToInventory(ctx, session, "火柴盒");
1084
+ response += "\n\n下面的抽屉里面有几张松散的、空白的纸张和一个装有几枚回形针的小盒子。";
1085
+ await addItemToInventory(ctx, session, "回形针");
1086
+ response += "\n\n你拿走了实验说明、火柴盒和回形针。\n(可在物品指令中查看)";
1087
+ } else {
1088
+ response += "你观察了一会,并没有什么特别的发现。";
1089
+ }
1090
+ } else if (/架/.test(point) || /烧/.test(point)) {
1091
+ response += "架子上有一些玻璃制品,你拿了一个烧杯。\n(可在物品指令中查看)";
1092
+ await addItemToInventory(ctx, session, "烧杯");
1093
+ } else if (/通风/.test(point)) {
1094
+ response += "天花板上有一个小通风口,位置很高。";
1095
+ response += "\n\n你往通风口里看了一眼,差点跌落,因为你看到两只发光的眼睛正从另一侧盯着你。";
1096
+ response += "\n\n。随后,那双眼睛消失在通风口深处,你听到墙内有什么东西在跌跌撞撞地移动,直到那声音消失在远处。";
1097
+ } else if (/监控/.test(point) || /摄像/.test(point)) {
1098
+ response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
1099
+ response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
1100
+ } else {
1101
+ return "你观察了一会,并没有什么特别的发现。";
1102
+ }
1103
+ return response;
1104
+ }
1105
+ __name(handleLaboratory, "handleLaboratory");
1106
+
1107
+ // src/rooms/office.ts
1108
+ var import_koishi7 = require("koishi");
1109
+ async function handleOffice(ctx, session, state, Config2, point) {
1110
+ let response = "";
1111
+ if (/桌/.test(point)) {
1112
+ await session.send("桌上有一台电脑,右侧有两个抽屉。要试着打开吗?(是/否)");
1113
+ const choice = await session.prompt(Config2.timeout);
1114
+ if (choice === "是") {
1115
+ if (!state.inventory.includes("白色文件夹")) {
1116
+ response += "你试着拉开桌子右侧的两个抽屉。";
1117
+ response += "\n\n上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1118
+ response += "\n\n你拉开下面的抽屉,里面有一个白色文件夹,背面用黑色记号笔写着汉字“生”。";
1119
+ await addItemToInventory(ctx, session, "白色文件夹");
1120
+ response += "\n\n你拿走了白色文件夹。\n(可在物品指令中查看)";
1121
+ } else if (state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1122
+ response += "上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1123
+ response += "\n\n下面的抽屉空空如也。";
1124
+ } else if (!state.inventory.includes("螺丝刀") && state.doneTasks.includes("书架")) {
1125
+ response += "上面抽屉已经解锁,你拉开抽屉,里面有一把螺丝刀,底部似乎还刻着什么。";
1126
+ await addItemToInventory(ctx, session, "螺丝刀");
1127
+ await addItemToInventory(ctx, session, "指示图");
1128
+ response += "\n\n你拿走了螺丝刀,看向抽屉底部,是一张指示图。\n(可在物品指令中查看)";
1129
+ response += import_koishi7.h.image(images.diagram);
1130
+ } else {
1131
+ response += "两个抽屉都没有特别的发现。";
1132
+ }
1133
+ } else {
1134
+ return "你迟疑着,没有动作。";
1135
+ }
1136
+ } else if (/抽屉/.test(point)) {
1137
+ if (!state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1138
+ response += "你试着拉开桌子右侧的两个抽屉。";
1139
+ response += "\n\n上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1140
+ response += "\n\n你拉开下面的抽屉,里面有一个白色文件夹,背面用黑色记号笔写着汉字“生”。";
1141
+ await addItemToInventory(ctx, session, "白色文件夹");
1142
+ response += "\n\n你拿走了白色文件夹。\n(可在物品指令中查看)";
1143
+ } else if (state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1144
+ response += "上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1145
+ response += "\n\n下面的抽屉空空如也。";
1146
+ } else if (!state.inventory.includes("螺丝刀") && state.doneTasks.includes("书架")) {
1147
+ response += "上面抽屉已经解锁,你拉开抽屉,里面有一把螺丝刀,底部似乎还刻着什么。";
1148
+ await addItemToInventory(ctx, session, "螺丝刀");
1149
+ await addItemToInventory(ctx, session, "指示图");
1150
+ response += "\n\n你拿走了螺丝刀,看向抽屉底部,是一张指示图。\n(可在物品指令中查看)";
1151
+ response += import_koishi7.h.image(images.diagram);
1152
+ } else {
1153
+ response += "两个抽屉都没有特别的发现。";
1154
+ }
1155
+ } else if (/电脑/.test(point) || /主机/.test(point)) {
1156
+ await session.send("你按下开机按钮,电脑进入了登录界面,需要四位数密码。");
1157
+ if (!state.doneTasks.includes("开机")) {
1158
+ if (state.doneTasks.includes("电脑密码")) {
1159
+ await session.send("你好像知道密码是什么了,想试着输入。(四位数字)");
1160
+ const choice = await session.prompt(Config2.timeout);
1161
+ if (choice === "3141") {
1162
+ await session.send("密码似乎正确。加载过后,屏幕上出现了两个选项:\n\n1.一个文本文档图标\n2.一个摄像头图标");
1163
+ await session.send("你想打开哪个?(1/2)");
1164
+ await addTaskToDoneTasks(ctx, session, "开机");
1165
+ const choice2 = await session.prompt(Config2.timeout);
1166
+ if (choice2 === "1") {
1167
+ response += "你双击打开文本文档图标,屏幕上弹出一个文本框。\n(可在物品指令中查看)";
1168
+ response += import_koishi7.h.image(images.document);
1169
+ if (!state.inventory.includes("文本文档")) {
1170
+ await addItemToInventory(ctx, session, "文本文档");
1057
1171
  }
1058
- } else {
1059
- return "你观察了一会,并没有什么特别的发现。";
1060
- }
1061
- } else if (/灯/.test(point)) {
1062
- await session.send("需要火柴才能点燃的本生灯,里面有充足的酒精。");
1063
- if (state.inventory.includes("火柴盒")) {
1064
- if (state.inventory.includes("黑色混合物")) {
1065
- await session.send("你点燃了本生灯,似乎可以用来加热什么东西。你猛然想到刚做出来的那一杯黑色混合物。要试试吗?(是/否)");
1066
- const choice = await session.prompt(5e3);
1067
- if (choice === "是") {
1068
- response += "你将混合物加热,完成了这个实验。";
1069
- response += "\n\n混合物开始剧烈地膨胀、起泡,你不自觉地往后退了一步。";
1070
- response += "\n\n烧杯突然破裂,有什么湿漉漉的东西掉在了地上。";
1071
- response += "\n\n你定睛一看,混合物消失了,取而代之的是躺在地上的,一只抽搐着的人手。";
1072
- response += "\n\n你强忍不适把它捡了起来。它似乎轻抚过你的手背。\n(可在物品指令中查看)";
1073
- await removeItemFromInventory(session, "黑色混合物");
1074
- await addItemToInventory(session, "手");
1075
- } else {
1076
- return "你迟疑着,没有动作。";
1077
- }
1172
+ } else if (choice2 === "2") {
1173
+ if (!state.doneTasks.includes("摄像画面")) {
1174
+ response += "你启动摄像程序,首先看到的是一个2 x 2的分屏画面。";
1175
+ response += "每个窗口对应一个你之前访问过的房间,你认出了卧室、厨房和化学实验室,但还有一个房间你没见过。";
1176
+ response += "那个房间几乎完全漆黑,只有一对白色的、发着光的眼睛透过屏幕注视着你。";
1177
+ response += "它慢慢靠近,摄像头的画面开始闪烁,所有的摄像头一个接一个的关闭,只剩下屏幕上发出的静电噪音。";
1178
+ await addTaskToDoneTasks(ctx, session, "摄像画面");
1078
1179
  } else {
1079
- response += "你试着点燃了本生灯,又百无聊赖地熄灭了它。";
1180
+ response += "画面一片漆黑,只剩下屏幕上发出的静电噪音。";
1080
1181
  }
1081
1182
  } else {
1082
- response += "你没有火柴,安全起见,就不对酒精做什么了。";
1083
- }
1084
- } else if (/抽屉/.test(point)) {
1085
- if (!state.inventory.includes("回形针")) {
1086
- response += "你拉开实验台右侧的两个抽屉。";
1087
- response += "\n\n上面的抽屉里有一本写有实验说明的笔记本和一个装满火柴的火柴盒。";
1088
- response += import_koishi.h.image(images.description);
1089
- await addItemToInventory(session, "实验说明");
1090
- await addItemToInventory(session, "火柴盒");
1091
- response += "\n\n下面的抽屉里面有几张松散的、空白的纸张和一个装有几枚回形针的小盒子。";
1092
- await addItemToInventory(session, "回形针");
1093
- response += "\n\n你拿走了实验说明、火柴盒和回形针。\n(可在物品指令中查看)";
1094
- } else {
1095
- response += "你观察了一会,并没有什么特别的发现。";
1183
+ return "你迟疑着,没有动作。";
1096
1184
  }
1097
- } else if (/架/.test(point) || /烧/.test(point)) {
1098
- response += "架子上有一些玻璃制品,你拿了一个烧杯。\n(可在物品指令中查看)";
1099
- await addItemToInventory(session, "烧杯");
1100
- } else if (/通风/.test(point)) {
1101
- response += "天花板上有一个小通风口,位置很高。";
1102
- response += "\n\n你往通风口里看了一眼,差点跌落,因为你看到两只发光的眼睛正从另一侧盯着你。";
1103
- response += "\n\n。随后,那双眼睛消失在通风口深处,你听到墙内有什么东西在跌跌撞撞地移动,直到那声音消失在远处。";
1104
- } else if (/监控/.test(point) || /摄像/.test(point)) {
1105
- response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
1106
- response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
1107
1185
  } else {
1108
- return "你观察了一会,并没有什么特别的发现。";
1186
+ return "你似乎输入了错误的密码,电脑没有任何反应。";
1109
1187
  }
1110
- } else if (currentRoom.id === "electrical") {
1111
- if (/保险丝/.test(point) || /柜/.test(point) || /门/.test(point) || /盒/.test(point)) {
1112
- await session.send("你打开保险丝盒,8个插槽旁边各自画着符号。\n(可在物品指令中查看)");
1113
- session.send(import_koishi.h.image(images.fuse));
1114
- if (state.inventory.includes("保险丝")) {
1115
- await session.send("插槽C和H已经插入了保险丝。你决定调整保险丝的位置,并把之前找到的那个也放进去。");
1116
- await session.send("输入你想插入保险丝的三个插槽。(三个大写英文字母)");
1117
- const choice = await session.prompt(15e3);
1118
- if (/A/.test(choice) && /B/.test(choice) && /G/.test(choice) && !state.doneTasks.includes("房间电")) {
1119
- response += "你将保险丝插入插槽A、B、G。";
1120
- response += "\n\n放好了最后一个保险丝,你听到电流噼啪作响,伴着火花从保险丝盒中飞溅而出。";
1121
- response += "\n\n你头顶的灯开始一明一灭地闪烁,然后彻底点亮,照亮了整个房间。";
1122
- await addTaskToDoneTasks(session, "房间电");
1123
- } else if (/A/.test(choice) && /C/.test(choice) && /F/.test(choice) && !state.doneTasks.includes("机器电")) {
1124
- response += "你将保险丝插入插槽A、C、F。";
1125
- response += "\n\n当你插入最后一个保险丝的时候,保险丝盒内火花四溅,强烈的光亮蒙蔽了你的双眼。";
1126
- response += "\n\n房间里的灯光闪烁了一下后便熄灭,将你彻底淹没在黑暗中。";
1127
- response += "\n\n远处,你听到了一个大型机械启动时发出的渐强的嗡鸣声。";
1128
- await addTaskToDoneTasks(session, "机器电");
1129
- } else {
1130
- return "你将保险丝插入插槽,但没有任何变化。会不会是插错了?";
1131
- }
1132
- } else {
1133
- response += "安全起见,你没有动它,关上了门。";
1134
- }
1135
- } else if (/架/.test(point)) {
1136
- response += "这是个铁质的空荡荡的货架。";
1137
- if (!state.inventory.includes("扳手")) {
1138
- response += "\n\n货架上只有一个扳手,你拿走了。\n(可在物品指令中查看)";
1139
- await addItemToInventory(session, "扳手");
1140
- } else {
1141
- response += "\n\n你观察了一会,并没有什么特别的发现。";
1142
- }
1143
- } else if (/管/.test(point)) {
1144
- await session.send("管道似乎在泄漏某种散发着强烈化学气味的物质。");
1145
- if (!state.doneTasks.includes("酸")) {
1146
- if (state.inventory.includes("扳手")) {
1147
- await session.send("你看着刚拿到的扳手,要试着敲开管道的裂缝吗?(是/否)");
1148
- const choice = await session.prompt(5e3);
1149
- if (choice === "是") {
1150
- response += "你用扳手敲击管道使其松动,酸液开始滴落到地面上。";
1151
- response += "\n\n你随时都能取到酸。";
1152
- await addTaskToDoneTasks(session, "酸");
1153
- } else {
1154
- return "你迟疑着,没有动作。";
1155
- }
1156
- } else {
1157
- return "管道上有一些裂缝,你想找个工具把它打开。";
1158
- }
1159
- } else {
1160
- return "裂缝已经被你打开,你随时都能取到酸。";
1161
- }
1162
- } else if (/通风/.test(point)) {
1163
- await session.send("天花板上有一个小通风口,位置很高。");
1164
- if (!state.inventory.includes("保险丝")) {
1165
- await session.send("你看向通风口内部,有一个保险丝,但由于挡板格栅的缝隙太窄,手无法伸进去。");
1166
- if (state.inventory.includes("回形针")) {
1167
- await session.send("你掏出之前得到的回形针,把它拉长。要用它试试吗?(是/否)");
1168
- const choice = await session.prompt(5e3);
1169
- if (choice === "是") {
1170
- response += "你掏出了保险丝,一个短小的玻璃制品,里面有一节金属丝。\n(可在物品指令中查看)";
1171
- await addItemToInventory(session, "保险丝");
1172
- } else {
1173
- return "你迟疑着,没有动作。";
1174
- }
1175
- } else {
1176
- response += "你需要一个细长的东西。";
1177
- }
1178
- } else {
1179
- response += "你观察了一会,并没有什么特别的发现。";
1180
- }
1181
- } else if (/污渍/.test(point) || /黑/.test(point) || /水/.test(point)) {
1182
- response += "地面上有一块小污渍,似乎是某种腐蚀性物质损坏了地板。";
1183
- response += "\n\n你抬头望去,污渍刚好位于天花板的管道下方。";
1188
+ } else {
1189
+ response += "你不敢胡乱输入,选择关闭电脑。";
1190
+ }
1191
+ } else {
1192
+ await session.send("输入密码后屏幕上出现了两个选项:\n\n1.一个文本文档图标\n2.一个摄像头图标");
1193
+ await session.send("你想打开哪个?(1/2)");
1194
+ await addTaskToDoneTasks(ctx, session, "开机");
1195
+ const choice = await session.prompt(Config2.timeout);
1196
+ if (choice === "1") {
1197
+ response += "你双击打开文本文档图标,屏幕上弹出一个文本框。\n(可在物品指令中查看)";
1198
+ response += import_koishi7.h.image(images.document);
1199
+ if (!state.inventory.includes("文本文档")) {
1200
+ await addItemToInventory(ctx, session, "文本文档");
1201
+ }
1202
+ } else if (choice === "2") {
1203
+ if (!state.doneTasks.includes("摄像画面")) {
1204
+ response += "你启动摄像程序,首先看到的是一个2 x 2的分屏画面。";
1205
+ response += "\n\n每个窗口对应一个你之前访问过的房间,你认出了卧室、厨房和化学实验室,但还有一个房间你没见过。";
1206
+ response += "\n\n那个房间几乎完全漆黑,只有一对白色的、发着光的眼睛透过屏幕注视着你。";
1207
+ response += "\n\n它慢慢靠近,摄像头的画面开始闪烁,所有的摄像头一个接一个的关闭,只剩下屏幕上发出的静电噪音。";
1208
+ await addTaskToDoneTasks(ctx, session, "摄像画面");
1209
+ } else if (state.doneTasks.includes("摄像画面") && !state.doneTasks.includes("机器电")) {
1210
+ response += "画面一片漆黑,只剩下屏幕上发出的静电噪音。";
1184
1211
  } else {
1185
- return "你观察了一会,并没有什么特别的发现。";
1212
+ response += "在充满噪点的屏幕上,你看到一个漆黑的身影站在厨房里,拿着电话贴在耳边。";
1213
+ response += "\n\n这个身影在那里伫立了一秒钟,然后放下听筒,离开了房间。";
1186
1214
  }
1187
- } else if (currentRoom.id === "office") {
1188
- if (/桌/.test(point)) {
1189
- await session.send("桌上有一台电脑,右侧有两个抽屉。要试着打开吗?(是/否)");
1190
- const choice = await session.prompt(5e3);
1191
- if (choice === "是") {
1192
- if (!state.inventory.includes("白色文件夹")) {
1193
- response += "你试着拉开桌子右侧的两个抽屉。";
1194
- response += "\n\n上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1195
- response += "\n\n你拉开下面的抽屉,里面有一个白色文件夹,背面用黑色记号笔写着汉字“生”。";
1196
- await addItemToInventory(session, "白色文件夹");
1197
- response += "\n\n你拿走了白色文件夹。\n(可在物品指令中查看)";
1198
- } else if (state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1199
- response += "上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1200
- response += "\n\n下面的抽屉空空如也。";
1201
- } else if (!state.inventory.includes("螺丝刀") && state.doneTasks.includes("书架")) {
1202
- response += "上面抽屉已经解锁,你拉开抽屉,里面有一把螺丝刀,底部似乎还刻着什么。";
1203
- await addItemToInventory(session, "螺丝刀");
1204
- await addItemToInventory(session, "指示图");
1205
- response += "\n\n你拿走了螺丝刀,看向抽屉底部,是一张指示图。\n(可在物品指令中查看)";
1206
- response += import_koishi.h.image(images.diagram);
1207
- } else {
1208
- response += "两个抽屉都没有特别的发现。";
1209
- }
1210
- } else {
1215
+ } else {
1216
+ return "你迟疑着,没有动作。";
1217
+ }
1218
+ }
1219
+ } else if (/架/.test(point)) {
1220
+ await session.send("书架大部分是空的,只有一层放满了白色的文件夹。每个文件夹的背面都写着一个字。");
1221
+ if (!state.doneTasks.includes("书架")) {
1222
+ if (state.inventory.includes("文本文档")) {
1223
+ await session.send("你意识到这可能是个谜题。");
1224
+ if (state.inventory.includes("白色文件夹")) {
1225
+ await session.send("看着手中刚得道的白色文件夹,你想起了一道线索。(输入你觉得正确的线索文字)");
1226
+ const choice = await session.prompt(Config2.timeout);
1227
+ if (choice === "我记得在此处发生的一切") {
1228
+ response += "你按照线索的文字排列了书架上的文件夹。";
1229
+ response += "\n\n房间里轰隆作响,发出一阵机械运作的声音。似乎某处的机关打开了。";
1230
+ await addTaskToDoneTasks(ctx, session, "书架");
1231
+ } else if (!choice) {
1211
1232
  return "你迟疑着,没有动作。";
1212
- }
1213
- } else if (/抽屉/.test(point)) {
1214
- if (!state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1215
- response += "你试着拉开桌子右侧的两个抽屉。";
1216
- response += "\n\n上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1217
- response += "\n\n你拉开下面的抽屉,里面有一个白色文件夹,背面用黑色记号笔写着汉字“生”。";
1218
- await addItemToInventory(session, "白色文件夹");
1219
- response += "\n\n你拿走了白色文件夹。\n(可在物品指令中查看)";
1220
- } else if (state.inventory.includes("白色文件夹") && !state.doneTasks.includes("书架")) {
1221
- response += "上面的抽屉锁住了,却看不到任何将它锁住的机关。";
1222
- response += "\n\n下面的抽屉空空如也。";
1223
- } else if (!state.inventory.includes("螺丝刀") && state.doneTasks.includes("书架")) {
1224
- response += "上面抽屉已经解锁,你拉开抽屉,里面有一把螺丝刀,底部似乎还刻着什么。";
1225
- await addItemToInventory(session, "螺丝刀");
1226
- await addItemToInventory(session, "指示图");
1227
- response += "\n\n你拿走了螺丝刀,看向抽屉底部,是一张指示图。\n(可在物品指令中查看)";
1228
- response += import_koishi.h.image(images.diagram);
1229
- } else {
1230
- response += "两个抽屉都没有特别的发现。";
1231
- }
1232
- } else if (/电脑/.test(point) || /主机/.test(point)) {
1233
- await session.send("你按下开机按钮,电脑进入了登录界面,需要四位数密码。");
1234
- if (!state.doneTasks.includes("开机")) {
1235
- if (state.doneTasks.includes("电脑密码")) {
1236
- await session.send("你好像知道密码是什么了,想试着输入。(四位数字)");
1237
- const choice = await session.prompt(15e3);
1238
- if (choice === "3141") {
1239
- await session.send("密码似乎正确。加载过后,屏幕上出现了两个选项:\n\n1.一个文本文档图标\n2.一个摄像头图标");
1240
- await session.send("你想打开哪个?(1/2)");
1241
- await addTaskToDoneTasks(session, "开机");
1242
- const choice2 = await session.prompt(5e3);
1243
- if (choice2 === "1") {
1244
- response += "你双击打开文本文档图标,屏幕上弹出一个文本框。\n(可在物品指令中查看)";
1245
- response += import_koishi.h.image(images.document);
1246
- if (!state.inventory.includes("文本文档")) {
1247
- await addItemToInventory(session, "文本文档");
1248
- }
1249
- } else if (choice2 === "2") {
1250
- if (!state.doneTasks.includes("摄像画面")) {
1251
- response += "你启动摄像程序,首先看到的是一个2 x 2的分屏画面。";
1252
- response += "每个窗口对应一个你之前访问过的房间,你认出了卧室、厨房和化学实验室,但还有一个房间你没见过。";
1253
- response += "那个房间几乎完全漆黑,只有一对白色的、发着光的眼睛透过屏幕注视着你。";
1254
- response += "它慢慢靠近,摄像头的画面开始闪烁,所有的摄像头一个接一个的关闭,只剩下屏幕上发出的静电噪音。";
1255
- await addTaskToDoneTasks(session, "摄像画面");
1256
- } else {
1257
- response += "画面一片漆黑,只剩下屏幕上发出的静电噪音。";
1258
- }
1259
- } else {
1260
- return "你迟疑着,没有动作。";
1261
- }
1262
- } else {
1263
- return "你似乎输入了错误的密码,电脑没有任何反应。";
1264
- }
1265
- } else {
1266
- response += "你不敢胡乱输入,选择关闭电脑。";
1267
- }
1268
- } else {
1269
- await session.send("输入密码后屏幕上出现了两个选项:\n\n1.一个文本文档图标\n2.一个摄像头图标");
1270
- await session.send("你想打开哪个?(1/2)");
1271
- await addTaskToDoneTasks(session, "开机");
1272
- const choice = await session.prompt(5e3);
1273
- if (choice === "1") {
1274
- response += "你双击打开文本文档图标,屏幕上弹出一个文本框。\n(可在物品指令中查看)";
1275
- response += import_koishi.h.image(images.document);
1276
- if (!state.inventory.includes("文本文档")) {
1277
- await addItemToInventory(session, "文本文档");
1278
- }
1279
- } else if (choice === "2") {
1280
- if (!state.doneTasks.includes("摄像画面")) {
1281
- response += "你启动摄像程序,首先看到的是一个2 x 2的分屏画面。";
1282
- response += "\n\n每个窗口对应一个你之前访问过的房间,你认出了卧室、厨房和化学实验室,但还有一个房间你没见过。";
1283
- response += "\n\n那个房间几乎完全漆黑,只有一对白色的、发着光的眼睛透过屏幕注视着你。";
1284
- response += "\n\n它慢慢靠近,摄像头的画面开始闪烁,所有的摄像头一个接一个的关闭,只剩下屏幕上发出的静电噪音。";
1285
- await addTaskToDoneTasks(session, "摄像画面");
1286
- } else if (state.doneTasks.includes("摄像画面") && !state.doneTasks.includes("机器电")) {
1287
- response += "画面一片漆黑,只剩下屏幕上发出的静电噪音。";
1288
- } else {
1289
- response += "在充满噪点的屏幕上,你看到一个漆黑的身影站在厨房里,拿着电话贴在耳边。";
1290
- response += "\n\n这个身影在那里伫立了一秒钟,然后放下听筒,离开了房间。";
1291
- }
1292
- } else {
1293
- return "你迟疑着,没有动作。";
1294
- }
1295
- }
1296
- } else if (/架/.test(point)) {
1297
- await session.send("书架大部分是空的,只有一层放满了白色的文件夹。每个文件夹的背面都写着一个字。");
1298
- if (!state.doneTasks.includes("书架")) {
1299
- if (state.inventory.includes("文本文档")) {
1300
- await session.send("你意识到这可能是个谜题。");
1301
- if (state.inventory.includes("白色文件夹")) {
1302
- await session.send("看着手中刚得道的白色文件夹,你想起了一道线索。(输入你觉得正确的线索文字)");
1303
- const choice = await session.prompt(15e3);
1304
- if (choice === "我记得在此处发生的一切") {
1305
- response += "你按照线索的文字排列了书架上的文件夹。";
1306
- response += "\n\n房间里轰隆作响,发出一阵机械运作的声音。似乎某处的机关打开了。";
1307
- await addTaskToDoneTasks(session, "书架");
1308
- } else if (!choice) {
1309
- return "你迟疑着,没有动作。";
1310
- } else {
1311
- response += "你按照线索的文字排列了书架上的文件夹。";
1312
- response += "\n\n并没有发生任何变化。";
1313
- }
1314
- } else {
1315
- response += "你思考许久,可能缺少了什么道具。";
1316
- }
1317
- } else {
1318
- response += "你观察了一会,并没有什么特别的发现。";
1319
- }
1320
- } else {
1321
- response += "你观察了一会,并没有什么特别的发现。";
1322
- }
1323
- } else if (/海报/.test(point) || /画/.test(point)) {
1324
- await session.send("墙上挂着一张海报,上面有一串数字:\n\n099174190");
1325
- await addTaskToDoneTasks(session, "电话号码");
1326
- if (!state.doneTasks.includes("破墙")) {
1327
- await session.send("你无意间敲了敲海报,墙内竟然传出回响,似乎是空心的。要用扳手砸开墙壁看看吗?(是/否)");
1328
- const choice = await session.prompt(5e3);
1329
- if (choice === "是") {
1330
- await session.send("你用扳手砸开墙壁,发现了一个金属盒子,挂着一把小锁。");
1331
- await addTaskToDoneTasks(session, "破墙");
1332
- if (state.inventory.includes("金属小钥匙")) {
1333
- await session.send("你只有一把没用过的钥匙了,要试试开锁吗?(是/否)");
1334
- const choice2 = await session.prompt(5e3);
1335
- if (choice2 === "是") {
1336
- response += "你打开了盒子,里面只有一张软盘。\n(可在物品指令中查看)";
1337
- await addItemToInventory(session, "软盘");
1338
- } else {
1339
- return "你迟疑着,没有动作。";
1340
- }
1341
- } else {
1342
- response += "你观察了一会,并没有什么特别的发现。";
1343
- }
1344
- } else {
1345
- return "你迟疑着,没有动作。";
1346
- }
1347
1233
  } else {
1348
- if (!state.inventory.includes("软盘")) {
1349
- await session.send("海报后面藏着一个一个金属盒子,挂着一把小锁。");
1350
- if (state.inventory.includes("金属小钥匙")) {
1351
- await session.send("你只有一把没用过的钥匙了,要试试开锁吗?(是/否)");
1352
- const choice = await session.prompt(5e3);
1353
- if (choice === "是") {
1354
- response += "你打开了盒子,里面只有一张软盘。\n(可在物品指令中查看)";
1355
- await addItemToInventory(session, "软盘");
1356
- } else {
1357
- return "你迟疑着,没有动作。";
1358
- }
1359
- } else {
1360
- response += "你观察了一会,并没有什么特别的发现。";
1361
- }
1362
- } else {
1363
- response += "你观察了一会,并没有什么特别的发现。";
1364
- }
1234
+ response += "你按照线索的文字排列了书架上的文件夹。";
1235
+ response += "\n\n并没有发生任何变化。";
1365
1236
  }
1366
- } else if (/通风/.test(point)) {
1367
- response += "天花板上有一个小通风口,位置很高。";
1368
- response += "\n\n你站在高处往里看,但没有任何发现。";
1369
1237
  } else {
1370
- return "你观察了一会,并没有什么特别的发现。";
1238
+ response += "你思考许久,可能缺少了什么道具。";
1371
1239
  }
1372
- } else if (currentRoom.id === "hide") {
1373
- if (/机器/.test(point) || /门/.test(point)) {
1374
- if (!state.doneTasks.includes("进入机器")) {
1375
- response += "这台机器嵌入墙体里,一直延伸到天花板,有一个开放的门通入机器舱内。";
1376
- response += "\n\n舱内有足够的空间来容纳所有玩家。";
1377
- if (state.doneTasks.includes("机器电")) {
1378
- response += "\n\n现在机器已通电,舱内的灯亮了起来。旁边的屏幕上出现一行消息:\n\n“运行 记忆-提取.exe”";
1379
- } else {
1380
- response += "\n\n机器外面有一个带屏幕的面板,旁边的屏幕上显示着信息:\n\n电力不足。";
1381
- }
1240
+ } else {
1241
+ response += "你观察了一会,并没有什么特别的发现。";
1242
+ }
1243
+ } else {
1244
+ response += "你观察了一会,并没有什么特别的发现。";
1245
+ }
1246
+ } else if (/海报/.test(point) || /画/.test(point)) {
1247
+ await session.send("墙上挂着一张海报,上面有一串数字:\n\n099174190");
1248
+ await addTaskToDoneTasks(ctx, session, "电话号码");
1249
+ if (!state.doneTasks.includes("破墙")) {
1250
+ await session.send("你无意间敲了敲海报,墙内竟然传出回响,似乎是空心的。要用扳手砸开墙壁看看吗?(是/否)");
1251
+ const choice = await session.prompt(Config2.timeout);
1252
+ if (choice === "是") {
1253
+ await session.send("你用扳手砸开墙壁,发现了一个金属盒子,挂着一把小锁。");
1254
+ await addTaskToDoneTasks(ctx, session, "破墙");
1255
+ if (state.inventory.includes("金属小钥匙")) {
1256
+ await session.send("你只有一把没用过的钥匙了,要试试开锁吗?(是/否)");
1257
+ const choice2 = await session.prompt(Config2.timeout);
1258
+ if (choice2 === "是") {
1259
+ response += "你打开了盒子,里面只有一张软盘。\n(可在物品指令中查看)";
1260
+ await addItemToInventory(ctx, session, "软盘");
1382
1261
  } else {
1383
- await session.send("机器运继续转着,旁边的屏幕上写着:“进入舱内”。");
1384
- await session.send("走进机器舱内,机器开始轻微嗡鸣。你想起自己的记忆:(输入你应该说的东西)");
1385
- const choice = await session.prompt(15e3);
1386
- if (/思维/.test(choice) && /灵魂/.test(choice) && /记忆/.test(choice) && /视力/.test(choice) && /大门/.test(choice)) {
1387
- let msg = "";
1388
- msg += "你反复念着这些词语,房间内的光线变得更明亮了。";
1389
- msg += "\n\n机器的舱门猛地关上,将你彻底困在里面。";
1390
- msg += "\n\n舱室开始摇晃,你感到一股巨大的能量在你体内涌动,此时一道白光在你眼前闪过,突然万籁俱寂。";
1391
- msg += "\n\n机器停止运转,灯光熄灭,但舱门依旧紧闭。";
1392
- msg += "\n\n。你注意到脚边有什么东西,于是望向地面——是个黑方块。";
1393
- await session.send(msg);
1394
- await new Promise((resolve2) => setTimeout(resolve2, 1e4));
1395
- let msg1 = "";
1396
- msg1 += "你用双手拾起方块,它比你想象得要轻。方块表面光滑、触感冰凉。";
1397
- msg1 += "\n\n你仔细检查了一下,发现它的材质就像玻璃一样通透。\n\n你看向方块内部,发现里面有一个小房间,墙壁上铺着白色的瓷砖。";
1398
- msg1 += "\n\n定睛一看,你发现自己正在那房间里面 。";
1399
- await session.send(msg1);
1400
- await new Promise((resolve2) => setTimeout(resolve2, 1e4));
1401
- let msg2 = "";
1402
- msg2 += "你呢喃着\n\n“是时候醒来了。”";
1403
- msg2 += "\n\n你说出这些词语后,感觉身体被拽进了方块里。周遭的一切都变得黑暗起来,你坠入到自己熟睡中的深层意识里。";
1404
- msg2 += "\n\n你的记忆开始衰退,就如逐渐消弭的梦境,你所见到的一切也开始消失。";
1405
- msg2 += "\n\n最后萦绕在你脑海中的,只有那句话:";
1406
- await session.send(msg2);
1407
- await new Promise((resolve2) => setTimeout(resolve2, 1e4));
1408
- await session.send("“是时候醒来了。”");
1409
- } else {
1410
- return "你迟疑着,没有动作。";
1411
- }
1262
+ return "你迟疑着,没有动作。";
1412
1263
  }
1413
- } else if (/海报/.test(point) || /画/.test(point) || /墙/.test(point)) {
1414
- response += "墙上钉着一张海报,上面有的图案看起来很眼熟。";
1415
- response += "\n\n用来钉住海报的图钉在海报中间,海报略微有些晃动。";
1416
- } else if (/按钮/.test(point)) {
1417
- await session.send("墙上有一个小面板,上面有一个巨大的红色按钮。要按下去吗?(是/否)");
1418
- const choice = await session.prompt(5e3);
1264
+ } else {
1265
+ response += "你观察了一会,并没有什么特别的发现。";
1266
+ }
1267
+ } else {
1268
+ return "你迟疑着,没有动作。";
1269
+ }
1270
+ } else {
1271
+ if (!state.inventory.includes("软盘")) {
1272
+ await session.send("海报后面藏着一个一个金属盒子,挂着一把小锁。");
1273
+ if (state.inventory.includes("金属小钥匙")) {
1274
+ await session.send("你只有一把没用过的钥匙了,要试试开锁吗?(是/否)");
1275
+ const choice = await session.prompt(Config2.timeout);
1419
1276
  if (choice === "是") {
1420
- response += "你选择按下按钮。";
1421
- response += "\n\n按下按钮的一瞬间,你听到了墙内传来沉重的机械运转声。";
1422
- response += "\n\n按钮旁边的墙面变成了一扇方形的大门,朝着你的方向缓缓开启。";
1423
- response += "\n\n门的另一侧上写着你熟悉的那句话:";
1424
- response += "\n\n“是时候醒来了。”";
1425
- response += "\n\n你看向门外,认出这是走廊。";
1426
- await addTaskToDoneTasks(session, "隐藏门");
1277
+ response += "你打开了盒子,里面只有一张软盘。\n(可在物品指令中查看)";
1278
+ await addItemToInventory(ctx, session, "软盘");
1427
1279
  } else {
1428
1280
  return "你迟疑着,没有动作。";
1429
1281
  }
1430
- } else if (/纸/.test(point) || /地/.test(point)) {
1431
- response += "地上散落着一堆纸张。所有的纸张都是空白的。";
1432
- if (!state.inventory.includes("金属小钥匙")) {
1433
- response += "\n\n你在纸张下面找到了一把金属小钥匙。\n(可在物品指令中查看)";
1434
- await addItemToInventory(session, "金属小钥匙");
1435
- } else {
1436
- response += "\n\n你观察了一会,并没有什么特别的发现。";
1437
- }
1438
- } else if (/监控/.test(point) || /摄像/.test(point)) {
1439
- response += "摄像头静止地悬挂在天花板上,以一种令人不安的姿态注视着你。";
1440
- response += "\n\n你试着拨弄它,但它坚固的金属框架可以使它免受任何损害。";
1441
1282
  } else {
1442
- return "你观察了一会,并没有什么特别的发现。";
1283
+ response += "你观察了一会,并没有什么特别的发现。";
1443
1284
  }
1285
+ } else {
1286
+ response += "你观察了一会,并没有什么特别的发现。";
1444
1287
  }
1445
1288
  }
1446
- await session.send(response);
1289
+ } else if (/通风/.test(point)) {
1290
+ response += "天花板上有一个小通风口,位置很高。";
1291
+ response += "\n\n你站在高处往里看,但没有任何发现。";
1292
+ } else {
1293
+ return "你观察了一会,并没有什么特别的发现。";
1294
+ }
1295
+ return response;
1296
+ }
1297
+ __name(handleOffice, "handleOffice");
1298
+
1299
+ // src/rooms/index.ts
1300
+ var specialItemHandlers = {
1301
+ "上锁的盒子": handleLockedBox,
1302
+ "实验说明": handleExperimentNote,
1303
+ "软盘": handleFloppyDisk
1304
+ };
1305
+ var roomHandlers = {
1306
+ "bedroom": handleBedroom,
1307
+ "corridor": handleCorridor,
1308
+ "electrical": handleElectrical,
1309
+ "hide": handleHide,
1310
+ "kitchen": handleKitchen,
1311
+ "laboratory": handleLaboratory,
1312
+ "office": handleOffice
1313
+ };
1314
+ async function handleRoomPoint(ctx, session, Config2, point) {
1315
+ if (!point) {
1316
+ return "请指定要查看的对象。";
1317
+ }
1318
+ const state = await getState(ctx, session);
1319
+ if (!state) {
1320
+ return "获取游戏状态失败。";
1321
+ }
1322
+ if (specialItemHandlers[point]) {
1323
+ return await specialItemHandlers[point](ctx, session, state, Config2);
1324
+ }
1325
+ const currentRoom = rooms.find((room) => room.id === state.currentRoom);
1326
+ const roomHandler = roomHandlers[currentRoom.id];
1327
+ try {
1328
+ const response = await roomHandler(ctx, session, state, Config2, point);
1329
+ ctx.logger.info(response);
1330
+ return response || `你查看了${point},但没有发现特别的东西。`;
1331
+ } catch (error) {
1332
+ console.error(`处理${point}时出错:`, error);
1333
+ return `查看${point}时出现了问题,请稍后再试。`;
1334
+ }
1335
+ }
1336
+ __name(handleRoomPoint, "handleRoomPoint");
1337
+
1338
+ // src/index.ts
1339
+ var inject = ["database"];
1340
+ var name = "rusty-lake-lizard";
1341
+ var usage = `
1342
+ # 🦎 rusty-lake-lizard
1343
+ ### 这是一个交互式解谜游戏插件。在游戏中,玩家将置身于一个神秘的房间中,通过探索、收集物品、解锁谜题和机关,逐步揭开真相。
1344
+
1345
+ ---
1346
+
1347
+ ## ✨ 游戏简介
1348
+ ### 玩家以第一人称视角探索一个复杂而神秘的房间系统。
1349
+ - ### 每个房间都有独特的描述、物品和谜题。
1350
+ - ### 需要通过逻辑推理和物品交互解锁通往其他房间的通路。
1351
+ - ### 游戏记录会自动保存,方便随时中断和继续游戏。
1352
+
1353
+ ---
1354
+
1355
+ <details>
1356
+ <summary><strong><span>使用方法</span></strong></summary>
1357
+
1358
+ ### 📜 游戏数据记录
1359
+ <pre>锈湖 新建 // 新建游戏房间</pre>
1360
+ <pre>锈湖 加入 // 加入现有游戏房间</pre>
1361
+ <pre>锈湖 删除 // 清除游戏房间</pre>
1362
+
1363
+ ### 📍 位置查看、移动
1364
+ <pre>锈湖 房间 // 查看已访问的房间环境</pre>
1365
+ <pre>锈湖 移动 // 移动到另一个场景</pre>
1366
+
1367
+ ### 🔍 探索场景或物品
1368
+ <pre>锈湖 查看 <point> // 探索当前场景或拥有的物品</pre>
1369
+ <pre>锈湖 物品 // 查看你拥有的物品</pre>
1370
+ </details>
1371
+
1372
+ <details>
1373
+ <summary><strong><span>如果要反馈建议或报告问题</span></strong></summary>
1374
+
1375
+ <strong>可以[点这里](https://github.com/lizard0126/rusty-lake-lizard/issues)创建议题~</strong>
1376
+ </details>
1377
+
1378
+ <details>
1379
+ <summary><strong><span>如果喜欢我的插件</span></strong></summary>
1380
+
1381
+ <strong>可以[请我喝可乐](https://ifdian.net/a/lizard0126),没准就有动力更新新功能了~</strong>
1382
+ </details>
1383
+ `;
1384
+ var Config = import_koishi8.Schema.object({
1385
+ timeout: import_koishi8.Schema.number().max(6e4).default(15e3).description("选择超时时长(秒数*1000)")
1386
+ });
1387
+ function apply(ctx, Config2) {
1388
+ const logger = ctx.logger("rusty-lake");
1389
+ ctx.model.extend("rusty_lake_games", {
1390
+ id: "string",
1391
+ gameId: "string",
1392
+ gameName: "string",
1393
+ currentRoom: "string",
1394
+ inventory: "json",
1395
+ visitedRooms: "json",
1396
+ doneTasks: "json"
1397
+ }, {
1398
+ primary: "id"
1447
1399
  });
1448
- command.subcommand(".物品", "查看你拥有的物品").action(async ({ session }) => {
1449
- const state = await getPlayerState(session);
1450
- if (state.inventory.length === 0) {
1451
- return "你没有物品。";
1452
- }
1453
- const itemList = state.inventory.map((item, index2) => `${index2 + 1}: ${item}`).join("\n");
1454
- await session.send(`你拥有的物品有:
1455
- ${itemList}
1456
- 请输入物品的编号查看详细信息,输入 0 取消。`);
1457
- const selected = await session.prompt(15e3);
1458
- if (!selected) {
1459
- return "输入超时,操作失败。";
1460
- }
1461
- const index = parseInt(selected.trim(), 10) - 1;
1462
- if (index === -1) {
1463
- return "操作取消。";
1464
- }
1465
- if (isNaN(index) || index < 0 || index >= state.inventory.length) {
1466
- return "无效的选择,请重新输入。";
1467
- }
1468
- const selectedItem = state.inventory[index];
1469
- const itemDetail = itemsDetails[selectedItem];
1470
- if (itemDetail) {
1471
- const { image, description } = itemDetail;
1472
- let message = `${selectedItem}:
1473
- ${description}`;
1474
- if (image) {
1475
- message += `
1476
- ${import_koishi.h.image(image)}`;
1477
- }
1478
- return message;
1479
- } else {
1480
- return `${selectedItem} 没有更多详情。`;
1481
- }
1400
+ ctx.model.extend("rusty_lake_players", {
1401
+ id: "string",
1402
+ gameId: "string",
1403
+ userId: "string"
1404
+ }, {
1405
+ primary: "id"
1482
1406
  });
1407
+ const command = ctx.command("锈湖", "锈湖桌游").alias("rl");
1483
1408
  command.subcommand(".说明", "玩法介绍").action(async ({ session }) => {
1484
1409
  await session.send(`
1485
- 这是一个交互式解谜游戏插件。在游戏中,玩家将置身于一个神秘的房间中,通过探索、收集物品、解锁谜题和机关,逐步揭开真相。
1486
- ---
1487
- ✨ 游戏简介
1488
- 玩家以第一人称视角探索一个复杂而神秘的房间系统。
1489
- 每个房间都有独特的描述、物品和谜题。
1490
- 需要通过逻辑推理和物品交互解锁通往其他房间的通路。
1491
- 游戏记录会自动保存,方便随时中断和继续游戏。
1492
- ---
1493
- 🕹️ Tips
1494
- 加入房间自动同步房间进度,请谨慎选择!
1495
- 删除房间会一并删除房间内所有成员的记录,请谨慎操作!
1496
- 加入房间后使用指令“锈湖 房间”查看当前场景信息。
1497
- 游戏内文本较多,包含重要信息,请仔细阅读。
1498
- 感谢游玩!
1499
- ---
1500
- 📘 开发信息
1501
- 如果要反馈建议或报告问题请点击https://github.com/lizard0126/rusty-lake-lizard/issues来创建议题。
1502
- 如果喜欢我的插件可以请我喝可乐~https://ifdian.net/a/lizard0126
1410
+ 这是一个交互式解谜游戏插件。玩家将探索神秘房间,通过收集物品、解开谜题逐步揭开真相。
1411
+
1412
+ ✨ 游戏简介
1413
+ 以第一人称视角探索复杂的神秘房间系统。
1414
+ 每个房间都有独特的描述、物品和谜题。
1415
+ 通过逻辑推理和物品交互解锁通路。
1416
+ 游戏进度会自动保存。
1417
+
1418
+ 🕹️ 温馨提示
1419
+ 加入房间后会自动同步进度,请谨慎选择!
1420
+ 删除房间会一并删除所有成员记录!
1421
+ 加入房间后使用“锈湖 房间”查看当前场景。
1422
+ 游戏文本包含重要信息,请仔细阅读。
1423
+ 感谢游玩!
1424
+ `);
1425
+ });
1426
+ command.subcommand(".新建", "新建游戏房间").action(async ({ session }) => {
1427
+ const existing = await ctx.database.get("rusty_lake_players", { userId: session.userId });
1428
+ if (existing.length > 0) return "你已经加入了一个房间,无法重复创建。";
1429
+ await session.send("请输入新房间的名称:");
1430
+ const gameName = (await session.prompt(Config2.timeout))?.trim();
1431
+ if (!gameName) return "输入超时或名称为空。";
1432
+ const existingGame = await ctx.database.get("rusty_lake_games", { gameName });
1433
+ if (existingGame.length > 0) return "已经存在同名的房间。";
1434
+ const gameId = `game-${Date.now()}`;
1435
+ const players = await ctx.database.get("rusty_lake_players", {});
1436
+ const id = (players.reduce((max, p) => Math.max(max, parseInt(p.id, 10)), 0) + 1).toString();
1437
+ await ctx.database.create("rusty_lake_games", {
1438
+ id,
1439
+ gameId,
1440
+ gameName,
1441
+ currentRoom: "bedroom",
1442
+ inventory: [],
1443
+ visitedRooms: ["bedroom"],
1444
+ doneTasks: []
1445
+ });
1446
+ await ctx.database.create("rusty_lake_players", { id, gameId, userId: session.userId });
1447
+ logger.info(`用户 ${session.userId} 创建了房间 ${gameName}`);
1448
+ const state = await getState(ctx, session);
1449
+ const current = rooms.find((r) => r.id === state.currentRoom);
1450
+ await session.send([
1451
+ `成功创建房间:${gameName},已自动为您加入`,
1452
+ `当前所在场景:${current.name}`,
1453
+ `使用"锈湖 查看"指令查看当前场景。例如:"锈湖 查看 监控"`,
1454
+ import_koishi8.h.image(current.image)
1455
+ ]);
1456
+ });
1457
+ command.subcommand(".删除", "清除游戏房间").action(async ({ session }) => {
1458
+ const games = await ctx.database.get("rusty_lake_games", {});
1459
+ if (games.length === 0) return "当前没有任何房间记录可以删除。";
1460
+ const gameList = games.map((game, i) => `${i + 1}: ${game.gameName}`).join("\n");
1461
+ await session.send(`输入序号选择要删除的房间:
1462
+ ${gameList}
1503
1463
 
1504
- `);
1464
+ 输入 0 删除所有房间`);
1465
+ const input = (await session.prompt(Config2.timeout))?.trim();
1466
+ if (!input) return "输入超时。";
1467
+ const index = parseInt(input, 10);
1468
+ if (index === 0) {
1469
+ for (const game of games) {
1470
+ await ctx.database.remove("rusty_lake_games", { gameId: game.gameId });
1471
+ await ctx.database.remove("rusty_lake_players", { gameId: game.gameId });
1472
+ logger.info(`删除了游戏 ${game.gameName} 的记录。`);
1473
+ }
1474
+ return "所有房间记录已成功删除。";
1475
+ }
1476
+ if (isNaN(index) || index < 1 || index > games.length) {
1477
+ return "选择无效。";
1478
+ }
1479
+ const { gameId, gameName } = games[index - 1];
1480
+ await ctx.database.remove("rusty_lake_games", { gameId });
1481
+ await ctx.database.remove("rusty_lake_players", { gameId });
1482
+ await session.send(`游戏 ${gameName} 的记录已成功删除。`);
1483
+ });
1484
+ command.subcommand(".加入", "加入现有游戏房间").action(async ({ session }) => {
1485
+ const games = await ctx.database.get("rusty_lake_games", {});
1486
+ if (games.length === 0) return "当前没有任何房间可以加入。";
1487
+ const existing = await ctx.database.get("rusty_lake_players", { userId: session.userId });
1488
+ if (existing.length > 0) return "你已经加入了一个房间,无法重复加入。";
1489
+ const gameList = games.map((game, i) => `${i + 1}: ${game.gameName}`).join("\n");
1490
+ await session.send(`以下是可加入的房间,请输入序号选择:
1491
+ ${gameList}`);
1492
+ const input = (await session.prompt(1e4))?.trim();
1493
+ if (!input) return "输入超时。";
1494
+ const index = parseInt(input, 10) - 1;
1495
+ if (isNaN(index) || index < 0 || index >= games.length) {
1496
+ return "选择无效。";
1497
+ }
1498
+ const { gameId, gameName } = games[index];
1499
+ const players = await ctx.database.get("rusty_lake_players", {});
1500
+ const id = (players.reduce((max, p) => Math.max(max, parseInt(p.id, 10)), 0) + 1).toString();
1501
+ await ctx.database.create("rusty_lake_players", { id, gameId, userId: session.userId });
1502
+ await session.send(`你成功加入了房间:${gameName}!`);
1503
+ const state = await getState(ctx, session);
1504
+ const current = rooms.find((r) => r.id === state.currentRoom);
1505
+ await session.send([
1506
+ `当前所在场景:${current.name}
1507
+ `,
1508
+ `使用"锈湖 查看"指令查看当前场景。例如:"锈湖 查看 监控"`,
1509
+ import_koishi8.h.image(current.image)
1510
+ ]);
1511
+ });
1512
+ command.subcommand(".移动 <room>", "移动到另一个场景").action(async ({ session }) => {
1513
+ await session.send(await move(ctx, session, Config2));
1514
+ });
1515
+ command.subcommand(".房间", "查看已访问的房间环境").action(async ({ session }) => {
1516
+ await session.send(await visitedRooms(ctx, session, Config2));
1517
+ });
1518
+ command.subcommand(".物品", "查看你拥有的物品").action(async ({ session }) => {
1519
+ await session.send(await ownedItems(ctx, session, Config2));
1520
+ });
1521
+ command.subcommand(".查看 <point>", "探索当前场景或拥有的物品").action(async ({ session }, point) => {
1522
+ await session.send(await handleRoomPoint(ctx, session, Config2, point));
1505
1523
  });
1506
1524
  }
1507
1525
  __name(apply, "apply");