Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 501 lines (433 sloc) 12.454 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml version="1.0">

<!-- "Cloak of Darkness" game implementation, by C. Scott Ananian. -->

<!-- quirks: "put the cloak on the hook", some oddity in how "the <noun>"
     is handled. Should investigate. Maybe a pyaiml bug?
     We don't support the full set of synonyms for put/drop.
     We don't allow you to pick up the cloak after you hang/drop it. -->

<category>
<pattern>DARKNESS</pattern>
<template>
<think>
<set name="topic">DARKNESS</set>
<set name="dark">YES</set>
<set name="message">OK</set>
<set name="havecloak">YES</set>
<set name="wearingcloak">YES</set>
<set name="cloakonhook">NO</set>
</think>
Hurrying through the rainswept November night, you're glad to see the bright
lights of the Opera House. It's surprising that there aren't more people about
but, hey, what do you expect in a cheap demo game...?
<br/>
<srai>XFOYER</srai>
</template>
</category>

<topic name="DARKNESS">

<category>
<pattern>XWINGAME</pattern>
<template>
You have won!
<think><set name="topic"></set></think>
</template>
</category>

<category>
<pattern>XLOSEGAME</pattern>
<template>
You have lost.
<think><set name="topic"></set></think>
</template>
</category>

<category>
<pattern>QUIT</pattern>
<template>
Ok. What do you want to talk about now?
<think><set name="topic"></set></think>
</template>
</category>

<category>
<pattern>* PEG</pattern>
<template><srai><star/> HOOK</srai></template>
</category>

<category>
<pattern>* BRASS HOOK</pattern>
<template><srai><star/> HOOK</srai></template>
</category>

<category>
<pattern>* SMALL HOOK</pattern>
<template><srai><star/> HOOK</srai></template>
</category>

<category>
<pattern>* THE HOOK</pattern>
<template><srai><star/> HOOK</srai></template>
</category>

<category>
<pattern>* VELVET CLOAK</pattern>
<template><srai><star/> CLOAK</srai></template>
</category>

<category>
<pattern>* BLACK CLOAK</pattern>
<template><srai><star/> CLOAK</srai></template>
</category>

<category>
<pattern>* HANDSOME CLOAK</pattern>
<template><srai><star/> CLOAK</srai></template>
</category>

<category>
<pattern>* SATIN CLOAK</pattern>
<template><srai><star/> CLOAK</srai></template>
</category>

<category>
<pattern>* THE CLOAK</pattern>
<template><srai><star/> CLOAK</srai></template>
</category>

<category>
<pattern>* SAWDUST</pattern>
<template><srai><star/> MESSAGE</srai></template>
</category>

<category>
<pattern>* SCRAWLED MESSAGE</pattern>
<template><srai><star/> MESSAGE</srai></template>
</category>

<category>
<pattern>* THE MESSAGE</pattern>
<template><srai><star/> MESSAGE</srai></template>
</category>

<category>
<pattern>LOOK</pattern>
<template><srai>LOOK <get name="location"/></srai></template>
</category>

<category>
<pattern>XFOYER</pattern>
<template>
<think><set name="location">FOYER</set></think>
Foyer of the Opera House

<srai>LOOK</srai>
</template>
</category>

<category>
<pattern>LOOK FOYER</pattern>
<template>
You are standing in a spacious hall, splendidly decorated in red
and gold, with glittering chandeliers overhead. The entrance from
the street is to the north, and there are doorways south and west.
</template>
</category>

<category>
<pattern>XBAR</pattern>
<template>
<think><set name="location">BAR</set></think>
<condition name="dark">
<li value="NO">Foyer bar</li>
<li>Darkness <think><set name="topic">INTHEDARK</set></think></li>
</condition>

<srai>LOOK</srai>
</template>
</category>

<category>
<pattern>LOOK BAR</pattern>
<template>
<condition name="dark">
<li value="NO">
The bar, much rougher than you'd have guessed after the opulence
of the foyer to the north, is completely empty. There seems to
be some sort of message scrawled in the sawdust on the floor.
</li>
<li>
It is pitch dark, and you can't see a thing.
</li>
</condition>
</template>
</category>

<category>
<pattern>XCLOAKROOM</pattern>
<template>
<think><set name="location">CLOAKROOM</set></think>
Cloakroom.
<srai>LOOK</srai>
</template>
</category>

<category>
<pattern>LOOK CLOAKROOM</pattern>
<template>
The walls of this small room were clearly once lined with hooks,
though now only one remains. The exit is a door to the east.
<think><set name="it">the hook</set></think>
</template>
</category>

<category><pattern>N</pattern><template><srai>NORTH</srai></template></category>
<category><pattern>S</pattern><template><srai>SOUTH</srai></template></category>
<category><pattern>E</pattern><template><srai>EAST</srai></template></category>
<category><pattern>W</pattern><template><srai>WEST</srai></template></category>
<category><pattern>GO *</pattern><template><srai><star/></srai></template></category>

<category><pattern>X</pattern><template><srai>LOOK</srai></template></category>
<category><pattern>L</pattern><template><srai>LOOK</srai></template></category>
<category><pattern>X *</pattern><template><srai>EXAMINE <star/></srai></template></category>

<category>
<pattern>NORTH</pattern>
<template>
<condition name="location">
<li value="FOYER">
You've only just arrived, and besides, the weather outside
seems to be getting worse.</li>
<li value="BAR"><srai>XFOYER</srai></li>
<li>Sorry, you can't go that way.</li>
</condition>
</template>
</category>

<category>
<pattern>SOUTH</pattern>
<template>
<condition name="location">
<li value="FOYER"><srai>XBAR</srai></li>
<li>Sorry, you can't go that way.</li>
</condition>
</template>
</category>

<category>
<pattern>EAST</pattern>
<template>
<condition name="location">
<li value="CLOAKROOM"><srai>XFOYER</srai></li>
<li>Sorry, you can't go that way.</li>
</condition>
</template>
</category>

<category>
<pattern>WEST</pattern>
<template>
<condition name="location">
<li value="FOYER"><srai>XCLOAKROOM</srai></li>
<li>Sorry, you can't go that way.</li>
</condition>
</template>
</category>

<category>
<pattern>EXAMINE ME</pattern>
<template>
As good-looking as ever.
</template>
</category>

<category>
<pattern>EXAMINE IT</pattern>
<template><srai>EXAMINE <get name="it"/></srai></template>
</category>

<category>
<pattern>EXAMINE HOOK</pattern>
<template>
<condition name="location">
<li value="CLOAKROOM">
It's just a small brass <set name="it">hook</set>,
<condition name="cloakonhook">
<li value="YES">with a cloak hanging on it.</li>
<li>screwed to the wall.</li>
</condition>
</li>
<li>What hook?</li>
</condition>
</template>
</category>

<category>
<pattern>EXAMINE CLOAK</pattern>
<template>
<condition name="havecloak">
<li value="YES">
A handsome cloak, of velvet trimmed with satin, and slightly spattered with
raindrops. Its blackness is so deep that it almost seems to suck light from the
room.
</li>
<li>You don't have the cloak.</li>
</condition>
</template>
</category>

<category>
<pattern>EXAMINE MESSAGE</pattern>
<template>
<condition name="location">
<li value="BAR">
<condition name="message">
<li value="TRAMPLED">
The message has been carelessly trampled, making it difficult to read.
You can just distinguish the words...
<srai>XLOSEGAME</srai>
</li>
<li>
The message, neatly marked in the sawdust, reads...
<srai>XWINGAME</srai>
</li>
</condition>
</li>
<li>I don't see that here.</li>
</condition>
</template>
</category>

<category>
<pattern>READ MESSAGE</pattern>
<template><srai>EXAMINE MESSAGE</srai></template>
</category>

<category>
<pattern>READ THE MESSAGE</pattern>
<template><srai>EXAMINE MESSAGE</srai></template>
</category>

<category>
<pattern>INVENTORY</pattern>
<template>
You are carrying:
<condition name="havecloak">
<li value="YES">
a velvet cloak
<condition name="wearingcloak">
<li value="YES">(being worn)</li>
</condition>
</li>
</condition>
</template>
</category>

<category>
<pattern>REMOVE CLOAK</pattern>
<template>
<think><set name="it">the velvet cloak</set></think>
<condition name="havecloak">
<li value="YES">
<condition name="wearingcloak">
<li value="YES">
You take off the velvet cloak.
<think><set name="wearingcloak">NO</set></think>
</li>
<li>You're not wearing the velvet cloak.</li>
</condition>
</li>
<li>You don't have the velvet cloak.</li>
</condition>
</template>
</category>

<category>
<pattern>TAKE THE * OFF</pattern>
<template><srai>REMOVE <star/></srai></template>
</category>

<category>
<pattern>TAKE OFF *</pattern>
<template><srai>REMOVE <star/></srai></template>
</category>

<category>
<pattern>TAKE * OFF</pattern>
<template><srai>REMOVE <star/></srai></template>
</category>

<category>
<pattern>HANG IT ON HOOK</pattern>
<template><srai>XHANGUP <get name="it"/></srai></template>
</category>

<category>
<pattern>HANG IT ON THE HOOK</pattern>
<template><srai>XHANGUP <get name="it"/></srai></template>
</category>

<category>
<pattern>HANG * ON HOOK</pattern>
<template><srai>XHANGUP <star/></srai></template>
</category>

<category>
<pattern>HANG * ON THE HOOK</pattern>
<template><srai>XHANGUP <star/></srai></template>
</category>

<category>
<pattern>PUT IT ON HOOK</pattern>
<template><srai>XHANGUP <get name="it"/></srai></template>
</category>

<category>
<pattern>PUT IT ON THE HOOK</pattern>
<template><srai>XHANGUP <get name="it"/></srai></template>
</category>

<category>
<pattern>PUT * ON HOOK</pattern>
<template><srai>XHANGUP <star/></srai></template>
</category>

<category>
<pattern>PUT * ON THE HOOK</pattern>
<template><srai>XHANGUP <star/></srai></template>
</category>

<category>
<pattern>XHANGUP CLOAK</pattern>
<template>
<condition name="location">
<li value="CLOAKROOM">
<condition name="havecloak">
<li value="YES">
<think>
<set name="havecloak"><set name="wearingcloak"><set name="dark">NO</set></set></set>
<set name="cloakonhook">YES</set>
</think>
You put the velvet cloak on the small brass hook.

Your score has just gone up by one point.
</li>
<li>You don't have the cloak.</li>
</condition></li>
<li>This isn't the best place to leave a smart cloak lying around.</li>
</condition>
</template>
</category>

<category>
<pattern>DROP CLOAK</pattern>
<template>
<condition name="location">
<li value="CLOAKROOM">
<condition name="havecloak">
<li value="YES">
<think>
<set name="cloakonhook"><set name="havecloak"><set name="wearingcloak"><set name="dark">NO</set></set></set></set>
</think>
You drop the velvet cloak on the floor of the cloak room.
</li>
<li>You don't have the cloak.</li>
</condition></li>
<li>This isn't the best place to leave a smart cloak lying around.</li>
</condition>
</template>
</category>

<category><pattern>*</pattern><template>What?</template></category>

</topic>

<topic name="INTHEDARK">
<category>
<pattern>LOOK</pattern>
<template>It is pitch dark, and you can't see a thing.</template>
</category>

<category><pattern>N</pattern><template><srai>NORTH</srai></template></category>
<category><pattern>S</pattern><template><srai>SOUTH</srai></template></category>
<category><pattern>E</pattern><template><srai>EAST</srai></template></category>
<category><pattern>W</pattern><template><srai>WEST</srai></template></category>
<category><pattern>GO *</pattern><template><srai><star/></srai></template></category>
<category><pattern>X</pattern><template><srai>LOOK</srai></template></category>
<category><pattern>L</pattern><template><srai>LOOK</srai></template></category>
<category><pattern>X *</pattern><template><srai>EXAMINE <star/></srai></template></category>

<category>
<pattern>NORTH</pattern>
<template>
<think><set name="topic">DARKNESS</set></think>
<srai>XFOYER</srai>
</template>
</category>

<category><pattern>SOUTH</pattern><template><srai>XGOBLUNDER</srai></template></category>
<category><pattern>EAST</pattern><template><srai>XGOBLUNDER</srai></template></category>
<category><pattern>WEST</pattern><template><srai>XGOBLUNDER</srai></template></category>
<category><pattern>UP</pattern><template><srai>XGOBLUNDER</srai></template></category>
<category><pattern>DOWN</pattern><template><srai>XGOBLUNDER</srai></template></category>

<category><pattern>XGOBLUNDER</pattern>
<template>
<think><set name="message">TRAMPLED</set></think>
Blundering around in the dark isn't a good idea!
</template>
</category>

<category><pattern>XSTUMBLE</pattern>
<template>
In the dark? You could easily disturb something!
<think>
<condition name="message">
<li value="ENDANGERED"><set name="message">TRAMPLED</set></li>
<li><set name="message">ENDANGERED</set></li>
</condition>
</think>
</template>
</category>

<category><pattern>EXAMINE *</pattern><template><srai>XSTUMBLE</srai></template></category>

<category><pattern>*</pattern><template><srai>XSTUMBLE</srai></template></category>

</topic>
</aiml>
Something went wrong with that request. Please try again.