UNPKG

doggo-quest-logic

Version:

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

26 lines (25 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const GameObjectBase_1 = require("../GameObjectBase"); class TrashcanObject extends GameObjectBase_1.GameObjectBase { constructor() { super('trashcan'); this.smell = 'Smells an awful lot like food. I like food.'; this.lick = 'Isn\'t it a bit boring to just lick the trash can when there\'s more interesting things inside of it?'; this.eat = 'Your teeth are too small to puncture the trash can and there\'s a better way to get to the food.'; this.think = 'This can of goodness is where the humans put food they don\'t want to give me.'; this.pull = 'It would be far easier just to push it.'; this.push = context => { context.addText('You push over the trash can and spill food all over the floor. It is GLORIOUS!'); }; } matches(reduced, room) { return super.matches(reduced, room) || reduced === 'trash' || reduced === 'can' || reduced === 'waste' || reduced === 'wastebasket' || reduced === 'bin'; } } exports.TrashcanObject = TrashcanObject;