},
"exits": {
"north": { "id": "bossdoor", "name": "Big double door", "status": "locked", "details": "A aig, wooden double door. It seems like something big usually comes through here."}
},
"items": [] },
"leftwing": {
"description": {
"default": "Another dark room. It doesn't look like it's that big, but you can't really tell what's inside. You do, however, smell rotten meat somewhere inside.",
"conditionals": {
"has light": "You appear to have found the kitchen. There are tables full of meat everywhere, and a big knife sticking out of what appears to be the head of a cow."
}
},
"items": [
{ "id": "bigknife", "name": "Big knife", "destination": "inventory", "damage": 10}
] },
"rightwing": {
"description": {
"default": "This appear to be some sort of office. There is a wooden desk in the middle, torches lighting every wall, and a single key resting on top of the desk."
},
"items": [
{ "id": "key",
"name": "Golden key",
"details": "A small golden key. What use could you have for it?",
"destination": "inventory",
"triggers": [{
"action": "use", //use on north exit (contextual)
"target": {
"room": "bigroom",
"exit": "north"
},
"effect": {
"statusUpdate": "unlocked",
"target": {
"room": "bigroom",
"exit": "north"
}
}
}
] }
] },
"bossroom": {
"description": {
"default": "You appear to have reached the end of the dungeon. There are no exits other than the one you just came in through. The only other thing that bothers you is the hulking giant looking like it's going to kill you, standing about 10 feet from you."
},
"npcs": [
{
"id": "finalboss",
"name": "Hulking Ogre",
"details": "A huge, green, muscular giant with a single eye in the middle of his forehead. It doesn't just look bad, it also smells like hell.",
"stats": {
"hp": 10,
"damage": 3
}
}
] }
}
}
它看起来有很多内容,但是如果你把它视为一个简单的游戏描述,就会明白这是一个含有六个房间的地牢,每个房间都与其他房间相互连接,如上图所示。
你的任务是穿越并探索它。你会发现有两个地方可以找到武器(无论是在厨房还是在黑暗的房间,只要破坏掉椅子就能得到)。你也将面对一扇上锁的门,所以,一旦找到钥匙(位于类似办公室的房间内),就可以打开并用你收集到的武器和BOSS展开一场大战。
你可以干掉它而获胜,也可以被它杀死而输掉。
现在让我们更详细地了解整个 JSON 结构及其中的三个部分。
Graph
这里包含节点之间的关系。基本上这一部分会直接转换为我们之前看到的图。
这部分的结构非常简单。它是一个节点列表,其中每个节点都包含以下属性:









