UNPKG

doggo-quest-logic

Version:

The game logic for the Doggo Quest text-based game sample project

31 lines (30 loc) 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const GameObjectBase_1 = require("../GameObjectBase"); const Room_1 = require("../Room"); const BlanketObject_1 = require("./BlanketObject"); const CrateDoorObject_1 = require("./CrateDoorObject"); class CrateObject extends GameObjectBase_1.GameObjectBase { constructor(room) { super('crate'); this.room = room; if (room === Room_1.Room.InCrate) { this.look = 'The crate is big enough for you to fit comfortably in and not too much bigger. You do not like it in here.'; this.push = 'The crate rocks slightly, but not significantly. Maybe try pushing the door instead?'; this.smell = 'It smells like you!'; } else { this.look = `It's your crate. You don't like it, but you can go back in it if you want by going south.`; this.push = `The crate is fine where it is and you don't want to shut the door to it either.`; this.smell = `To really smell the crate, you need to be inside it.`; } this.children = [ new CrateDoorObject_1.CrateDoorObject(room), new BlanketObject_1.BlanketObject(), ]; this.take = `It's too big to pull along with you. Besides, it's fine where it is.`; this.eat = 'Yuck. No thank you.'; this.lick = 'It\'s plastic and boring. I don\'t want to lick that.'; } } exports.CrateObject = CrateObject;