var AdventureGame = new adventurejs.Game( "AdventureGame", "GameDisplay" )
.set({
title: "Adventure Game",
author: "Ivan Cockrum",
description: "Welcome... to Adventure!" ,
version: "0.0.1",
if_input_is_empty_print_this: [
{randomize: true},
"I didn't get what you want. ",
"I don't understand. ",
"Silent type, eh?",
],
}); // AdventureGame
AdventureGame.settings.set({
print_debug_messages: false,
if_input_is_empty_print_room_description: false,
if_input_is_an_asset_name_examine_it: true,
}); // settings
AdventureGame.createAsset({
class: "Room",
article: "the",
name: "Adventure Room",
descriptions: {
look: "This room is empty... FOR NOW. ",
brief: "This room is empty... FOR NOW. ",
verbose: "You find yourself in a featureless open space. The distance recedes into hazy obscurity. It doesn't appear there's anywhere to go. Yet. ",
},
}); // Adventure Room
AdventureGame.createAsset({
class: "Pedestal",
name: "obsidian pedestal",
place: { in: "Adventure Room" },
description: "The pedestal is roughly hewn from volcanic glass. ",
adjectives: "volcanic, glass",
indefinite_article: "an",
can_put:{
on: {
player_can_nest: false,
maxcount: 1,
},
},
}) // pedestal
AdventureGame.createAsset({
class: "Liquid",
name: "godsmead",
description: "Like liquid gold. ",
mixwith:
{
"blood": "health potion",
},
}); // godsmead
AdventureGame.createAsset({
class: "Liquid",
name: "blood",
description: "It's a deep dark crimson. ",
mixwith:
{
"godsmead": "health potion",
},
}); // blood
AdventureGame.createAsset({
class: "Chalice",
name: "glowing chalice",
place: { on: "obsidian pedestal" },
description: "The chalice glows enticingly, continuously shifting color across the visible spectrum. You've never wanted anything so much in your life. ",
contains: "godsmead",
verb_hooks: {
take:
{
doBeforeTry: function()
{
if( AdventureGame.$("glowing chalice").$is("on", "obsidian pedestal")
{
AdventureGame.prependToOutput( "Your hand trembles as you reach for the chalice. " );
}
return true;
},
doAfterSuccess: function()
{
AdventureGame.print( "Something unseen rumbles deep within the ground. " );
return true;
},
},
},
}); // chalice