/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
inherit "/std/effects/basic";

/* It's alcohol. It gets you drunk. */

create()
{
    set_boundaries( 
		       ({ -7, 2 }), ({ -2, 5 }) );
}

int     query_pass_through( int *coord )
{
    return 40;
}


query_coordinate()
{
    return({ -4, 3 });
}

action_drunk( ob, coord, quantity )
{
    int     total, effect;
    string  desc;
    int     old_vol;

    total = distance_within_region( coord ) * 100 / 6;

    effect = (400 + random( 300 )) * total * quantity / 100 / 100;
    old_vol = ob->query_volume( 0 );
    ob->adjust_volume( 0, effect );

    switch( effect )
    {
	case 0..100:
	    desc = "ever so slightly dizzy";
	    break;
	case 101..200:
	    desc = "slightly dizzy";
	    break;
	case 201..300:
	    desc = "noticeably drunk";
	    break;
	case 301..400:
	    desc = "significantly drunk";
	    break;
	case 401..600:
	    desc = "very drunk";
	    break;
	case 601..800:
	    desc = "a great deal drunk";
	    break;
	default:
/* this effect is not intended to effect > 800 drunk points */
	    desc = "so drunk your brain has turned to coffee";
	    break;
    }
    tell_object( ob, "You feel " + desc + ".\n" );
}

action_smell( ob, coord, quantity )
{
    tell_object( ob, "Your nose tingles pleasantly.\n" );
}