Refactor player and room to support adding effects.

This commit is contained in:
2021-05-25 16:02:06 -07:00
parent b3058097b4
commit ccd4974266
13 changed files with 198 additions and 79 deletions

View File

@ -1,8 +1,22 @@
import { GameData } from "./data.ts";
import { GameData, SceneProperties } from "../types.ts";
export const hall: GameData = {
description:
"You are standing in a big hall. There's lots of nooks, crannies, and" +
"room for general testing. Aw yeah... sweet testing!",
items: [{ name: "flashlight" }],
export const hall: GameData<SceneProperties> = {
properties: {
description: "It's very dark",
items: [{ name: "flashlight" }],
},
conditions: {
effects: [
{
name: "lights-on",
properties: {
description:
"You are standing in a big hall. There's lots of nooks, " +
"crannies, and room for general testing. Aw yeah... sweet testing!",
shortDescription: "You are in a big hall.",
},
source: "player",
},
],
},
};