LOOK = Proc()
{
    If (GOVERB & !GO) {
	cg();
    }
    GOVERB = FALSE;
    GO = FALSE;
    If (IncFlag) {
	$incturn();
    }
    IncFlag = TRUE;
}


PROMPT = Proc()
{
    $spec(HEADER, $sdesc($loc($ME))(1), SCORE, $turns());
    "> ";
}


GrowX = Proc(obj)
{
    If (obj.SHRNK) {
	obj.SHRNK = FALSE;
	If ($cont(obj)) {
	    GrowX($cont(obj));
	}
	If ($link(obj)) {
	    GrowX($link(obj));
	}
    }
}


Grow = Proc()
{
    If ($ME.SHRNK) {
	$ME.SHRNK = FALSE;
	If ($cont($ME)) {
	    GrowX($cont($ME));
	}
    }
}


ShrnX = Proc(obj)
{
    If (!obj.SHRNK) {
	obj.SHRNK = TRUE;
	If ($cont(obj)) {
	    ShrnX($cont(obj));
	}
	If ($link(obj)) {
	    ShrnX($link(obj));
	}
    }
    Else {
	"You hear a tiny POP as the " $name(obj) " vanishes completely!\n";
	If ($link(obj)) {
	    ShrnX($link(obj));
	}
	$move(obj, $ALL);
    }
}


Shrink = Proc()
{
    If (!$ME.SHRNK) {
	$ME.SHRNK = TRUE;
	If ($cont($ME)) {
	    ShrnX($cont($ME));
	}
    }
}

WzTgl = Proc() // Toggle the Wizard flag
{
    Wizrd = !Wizrd;
    If (Wizrd) {
        "You hear a low rumble of thunder, shaking the very ground on "
        "which you stand.  Suddenly, there is a blazing flash of light!! "
        "You are unharmed, but feal great power flowing in your body.\n";
    }
    Else {
	"Your wizardly powers unceremoniously fade away.\n";
    }
}


TakeAct = Proc()
{
    If (Dobj.WEIGH == CAPAC) {
	"You can't move ";
	$sdesc(Dobj)();
	".\n";
	$exit(1);
    }
    Else If ($ME.SHRNK & !Dobj.SHRNK) {
	"Right now, the " $name(Dobj) " is too big for you to deal with.\n";
	$exit(1);
    }
    Else If (($ME.HAS + Dobj.WEIGH) > $ME.HOLDS) {
	"You can't carry that much more!\n";
	$exit(1);
    }
    Else {
	$ME.HAS = $ME.HAS + Dobj.WEIGH;
    }
}


DropAct = Proc()
{
    $ME.HAS = $ME.HAS - Dobj.WEIGH;
    If ($loc($ME) == cel13) {
	If (!cel13.HOLED) {
	    If (Dobj.WEIGH > 75) {
		"The " $name(Dobj) " breaks through the ice and sinks!\n";
		cel13.HOLED = TRUE;
		$move(hole, cel13);
		$move(Dobj, $ALL);
		Skip = TRUE;
            }
	    Else {
		"The ice chips a bit, but does not break.\n";
	    }
	}
    }
    Else If ($loc($ME) == cel19) {
	If (!goblet.FREED) {
	    If (Dobj.WEIGH > 75) {
	    	"The " $name(Dobj)
                        " cracks the ice, and the goblet is freed!\n";
	   	goblet.FREED = TRUE;
            }
	    Else {
		"The ice chips a bit, but does not break.\n";
	    }
	}
    }
}

ShowScore = Proc() {
    "   \"Your account is now at $" $str(SCORE) ".";
    If (SCORE < GMAX)
        "  You need $" $str(GMAX-SCORE) " more to qualify "
        "for your free gift.  Thank you for letting Arpa-Citizen's "
        "be your host.\"\n";
    Else If (!Given)
        "  Congratulations, preferred customer! "
        "You have qualified for a free gift, compliments of Arpa-"
        "Citizen's Savings!\"\n";
    Else
        "\"\n";
}
