ADL Scenario Source Code

    INCLUDE "stdproc.adl";

    NOUN startrm, brightroom;		/* Locations in the dungeon */
    startrm(LIGHT) = TRUE;		brightroom(LIGHT) = TRUE;

    cg = Proc() {"You can't go that way.\n";}

    startrm(LDESC) = Proc()
    {
        "You are in a small but comfortable room.  You hardly want ";
        "to leave, but there is a door leading east, if you insist.\n";
    }
    startrm (SDESC) = Proc() {"Comfortable room.\n";}
    startrm(ACTION) = Proc()
    {
        $miss(    cg, cg, 0,          cg, 0, 0, 0, 0, 0, 0);
        $hit($ME, 0,  0,  brightroom, 0,  0, 0, 0, 0, 0, 0);
    }

    brightroom(LDESC) = Proc()
    {
        "You are in a brightly lit room.  The walls sparkle with ";
        "scintillating lights.  There is a darker room to the west.\n";
    }
    brightroom(SDESC) = Proc() {"Bright room.\n";}
    brightroom(ACTION) = Proc()
    {
        $miss(    cg, cg, cg, 0,       0, 0, 0, 0, 0, 0);
        $hit($ME, 0,  0,  0,  startrm, 0, 0, 0, 0, 0, 0);
    }

    ADJEC red, blue;

    NOUN red pillow(startrm), blue pillow(startrm);

    red pillow(LDESC) = Proc() {"There is a red pillow here.\n";}
    red pillow(SDESC) = Proc() {"A red pillow";}

    blue pillow(LDESC) = Proc() {"There is a blue pillow here.\n";}
    blue pillow(SDESC) = Proc() {"A blue pillow";}

    NOUN platinum(brightroom);		bar = platinum;
    platinum(LDESC) = Proc() {"There is a bar of platinum here!\n";}
    platinum(SDESC) = Proc() {"A platinum bar";}
    platinum(ACTION) =  Proc()
    {
        If (($verb() == drop) & ($loc($ME) == $loc(<red pillow>))) {
    	"The bar falls onto the red pillow, breaking it!  The symbolism ";
    	"impresses itself upon you, and you go back to work instead of ";
    	"playing these silly games!\n";
    	$spec(QUIT);
        }
    }

    NOUN SELF(startrm);		SELF(NOTAKE) = TRUE;

    START = Proc ()
    {
        StdInit(SELF);
    }

    DWIMD = Proc() {Return Dwimmer($arg(1));}
    DWIMI = Proc() {Return Dwimmer($arg(1));}