1 /*
2  * This is just the facade to a castle. If you want to enable the
3  * "enter" command, move the player to a hall or something (which
4  * you have to design yourself).
5  * The predefined string DEST is where a player should come when he
6  * leaves the castle.
7  *
8  * This file is loaded automatically from "init_file". We have to move
9  * ourself to where we are supposed to be.
10  */
11 
id(str)12 id(str) { return str == "castle"; }
13 
14 short() {
15     return "Castle of " + NAME;
16 }
17 
18 long() {
19     write("This is the " + short() + ".\n");
20     write(NAME + " is a rather new wizard, but it is an amazing castle\n");
21     write("just the same. However, the gates are closed.\n");
22 }
23 
init()24 init() {
25     add_action("enter", "enter");
26 }
27 
enter(str)28 enter(str) {
29     if (!id(str))
30 	return 0;
31     write("It is not an open castle.\n");
32     return 1;
33 }
34 
reset(arg)35 reset(arg) {
36     if (arg)
37 	return;
38     move_object(this_object(), DEST);
39 }
40