koishi-plugin-rusty-lake-lizard 0.0.5 → 0.0.6
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 +56 -48
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -645,15 +645,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
645
645
|
const choice = await session.prompt(5e3);
|
|
646
646
|
if (choice === "是") {
|
|
647
647
|
await addTaskToDoneTasks(session, "走廊锁");
|
|
648
|
+
const newState = await getPlayerState(session);
|
|
648
649
|
await ctx.database.upsert("rusty_lake_games", [
|
|
649
650
|
{
|
|
650
|
-
id:
|
|
651
|
-
gameId:
|
|
652
|
-
gameName:
|
|
651
|
+
id: newState.id,
|
|
652
|
+
gameId: newState.gameId,
|
|
653
|
+
gameName: newState.gameName,
|
|
653
654
|
currentRoom: "corridor",
|
|
654
|
-
inventory:
|
|
655
|
-
visitedRooms: [...
|
|
656
|
-
doneTasks:
|
|
655
|
+
inventory: newState.inventory,
|
|
656
|
+
visitedRooms: [...newState.visitedRooms, "corridor"],
|
|
657
|
+
doneTasks: newState.doneTasks
|
|
657
658
|
}
|
|
658
659
|
]);
|
|
659
660
|
response += "你小心翼翼地打开门,迈步走了出去。";
|
|
@@ -703,15 +704,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
703
704
|
response += "\n\n你艰难地从桌子下面爬出来,然后就看到了嵌入进墙体里的巨型机器矗立在你眼前,一个小屏幕发出红光,显示着闪烁的消息。“";
|
|
704
705
|
response += import_koishi.h.image(images.hide);
|
|
705
706
|
await addTaskToDoneTasks(session, "隐藏房间锁");
|
|
707
|
+
const newState = await getPlayerState(session);
|
|
706
708
|
await ctx.database.upsert("rusty_lake_games", [
|
|
707
709
|
{
|
|
708
|
-
id:
|
|
709
|
-
gameId:
|
|
710
|
-
gameName:
|
|
710
|
+
id: newState.id,
|
|
711
|
+
gameId: newState.gameId,
|
|
712
|
+
gameName: newState.gameName,
|
|
711
713
|
currentRoom: "hide",
|
|
712
|
-
inventory:
|
|
713
|
-
visitedRooms: [...
|
|
714
|
-
doneTasks:
|
|
714
|
+
inventory: newState.inventory,
|
|
715
|
+
visitedRooms: [...newState.visitedRooms, "hide"],
|
|
716
|
+
doneTasks: newState.doneTasks
|
|
715
717
|
}
|
|
716
718
|
]);
|
|
717
719
|
} else {
|
|
@@ -741,15 +743,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
741
743
|
response += "\n\n你听到角落的垃圾桶周围萦绕着嗡嗡作响的苍蝇声。";
|
|
742
744
|
response += import_koishi.h.image(images.kitchen);
|
|
743
745
|
await addTaskToDoneTasks(session, "厨房锁");
|
|
746
|
+
const newState = await getPlayerState(session);
|
|
744
747
|
await ctx.database.upsert("rusty_lake_games", [
|
|
745
748
|
{
|
|
746
|
-
id:
|
|
747
|
-
gameId:
|
|
748
|
-
gameName:
|
|
749
|
+
id: newState.id,
|
|
750
|
+
gameId: newState.gameId,
|
|
751
|
+
gameName: newState.gameName,
|
|
749
752
|
currentRoom: "kitchen",
|
|
750
|
-
inventory:
|
|
751
|
-
visitedRooms: [...
|
|
752
|
-
doneTasks:
|
|
753
|
+
inventory: newState.inventory,
|
|
754
|
+
visitedRooms: [...newState.visitedRooms, "kitchen"],
|
|
755
|
+
doneTasks: newState.doneTasks
|
|
753
756
|
}
|
|
754
757
|
]);
|
|
755
758
|
} else {
|
|
@@ -764,15 +767,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
764
767
|
response += "\n\n然而一股令人不安的寒意掠过你的脊背,你总感觉有什么东西在注视着你。";
|
|
765
768
|
response += import_koishi.h.image(images.laboratory);
|
|
766
769
|
await addTaskToDoneTasks(session, "实验室锁");
|
|
770
|
+
const newState = await getPlayerState(session);
|
|
767
771
|
await ctx.database.upsert("rusty_lake_games", [
|
|
768
772
|
{
|
|
769
|
-
id:
|
|
770
|
-
gameId:
|
|
771
|
-
gameName:
|
|
773
|
+
id: newState.id,
|
|
774
|
+
gameId: newState.gameId,
|
|
775
|
+
gameName: newState.gameName,
|
|
772
776
|
currentRoom: "laboratory",
|
|
773
|
-
inventory:
|
|
774
|
-
visitedRooms: [...
|
|
775
|
-
doneTasks:
|
|
777
|
+
inventory: newState.inventory,
|
|
778
|
+
visitedRooms: [...newState.visitedRooms, "laboratory"],
|
|
779
|
+
doneTasks: newState.doneTasks
|
|
776
780
|
}
|
|
777
781
|
]);
|
|
778
782
|
} else {
|
|
@@ -789,15 +793,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
789
793
|
response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
|
|
790
794
|
response += import_koishi.h.image(images.electrical);
|
|
791
795
|
await addTaskToDoneTasks(session, "电锁");
|
|
796
|
+
const newState = await getPlayerState(session);
|
|
792
797
|
await ctx.database.upsert("rusty_lake_games", [
|
|
793
798
|
{
|
|
794
|
-
id:
|
|
795
|
-
gameId:
|
|
796
|
-
gameName:
|
|
799
|
+
id: newState.id,
|
|
800
|
+
gameId: newState.gameId,
|
|
801
|
+
gameName: newState.gameName,
|
|
797
802
|
currentRoom: "electrical",
|
|
798
|
-
inventory:
|
|
799
|
-
visitedRooms: [...
|
|
800
|
-
doneTasks:
|
|
803
|
+
inventory: newState.inventory,
|
|
804
|
+
visitedRooms: [...newState.visitedRooms, "electrical"],
|
|
805
|
+
doneTasks: newState.doneTasks
|
|
801
806
|
}
|
|
802
807
|
]);
|
|
803
808
|
} else if (choice === "身份证" && state.inventory.includes("身份证")) {
|
|
@@ -806,15 +811,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
806
811
|
response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
|
|
807
812
|
response += import_koishi.h.image(images.electrical);
|
|
808
813
|
await addTaskToDoneTasks(session, "电锁");
|
|
814
|
+
const newState = await getPlayerState(session);
|
|
809
815
|
await ctx.database.upsert("rusty_lake_games", [
|
|
810
816
|
{
|
|
811
|
-
id:
|
|
812
|
-
gameId:
|
|
813
|
-
gameName:
|
|
817
|
+
id: newState.id,
|
|
818
|
+
gameId: newState.gameId,
|
|
819
|
+
gameName: newState.gameName,
|
|
814
820
|
currentRoom: "electrical",
|
|
815
|
-
inventory:
|
|
816
|
-
visitedRooms: [...
|
|
817
|
-
doneTasks:
|
|
821
|
+
inventory: newState.inventory,
|
|
822
|
+
visitedRooms: [...newState.visitedRooms, "electrical"],
|
|
823
|
+
doneTasks: newState.doneTasks
|
|
818
824
|
}
|
|
819
825
|
]);
|
|
820
826
|
} else if (/力/.test(choice)) {
|
|
@@ -823,15 +829,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
823
829
|
response += "\n\n你看到天花板上布满了管道和电线,房间中央有一个大型保险丝盒,旁边是一个近乎空荡的货架,上面积满了灰尘。";
|
|
824
830
|
response += import_koishi.h.image(images.electrical);
|
|
825
831
|
await addTaskToDoneTasks(session, "电锁");
|
|
832
|
+
const newState = await getPlayerState(session);
|
|
826
833
|
await ctx.database.upsert("rusty_lake_games", [
|
|
827
834
|
{
|
|
828
|
-
id:
|
|
829
|
-
gameId:
|
|
830
|
-
gameName:
|
|
835
|
+
id: newState.id,
|
|
836
|
+
gameId: newState.gameId,
|
|
837
|
+
gameName: newState.gameName,
|
|
831
838
|
currentRoom: "electrical",
|
|
832
|
-
inventory:
|
|
833
|
-
visitedRooms: [...
|
|
834
|
-
doneTasks:
|
|
839
|
+
inventory: newState.inventory,
|
|
840
|
+
visitedRooms: [...newState.visitedRooms, "electrical"],
|
|
841
|
+
doneTasks: newState.doneTasks
|
|
835
842
|
}
|
|
836
843
|
]);
|
|
837
844
|
} else {
|
|
@@ -855,15 +862,16 @@ ${targetRoom.description}${targetRoom.image ? "\n" + import_koishi.h.image(targe
|
|
|
855
862
|
response += "\n\n房间中央有一张桌子,上面放着一台电脑,发出轻微的电流声。";
|
|
856
863
|
response += import_koishi.h.image(images.office);
|
|
857
864
|
await addTaskToDoneTasks(session, "办公室锁");
|
|
865
|
+
const newState = await getPlayerState(session);
|
|
858
866
|
await ctx.database.upsert("rusty_lake_games", [
|
|
859
867
|
{
|
|
860
|
-
id:
|
|
861
|
-
gameId:
|
|
862
|
-
gameName:
|
|
868
|
+
id: newState.id,
|
|
869
|
+
gameId: newState.gameId,
|
|
870
|
+
gameName: newState.gameName,
|
|
863
871
|
currentRoom: "office",
|
|
864
|
-
inventory:
|
|
865
|
-
visitedRooms: [...
|
|
866
|
-
doneTasks:
|
|
872
|
+
inventory: newState.inventory,
|
|
873
|
+
visitedRooms: [...newState.visitedRooms, "office"],
|
|
874
|
+
doneTasks: newState.doneTasks
|
|
867
875
|
}
|
|
868
876
|
]);
|
|
869
877
|
} else {
|