/
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/
#include "snowball.h";
inherit "/std/object";

int    *snowballarr;

void    setup()
{
    set_name( "whatsie" );
    add_adjective( "snow" );
    add_alias( SNOW_THING );
    set_short( 0 );
    snowballarr = ({ });
}

void    snowball( int i )
{
    snowballarr += ({ i });
    set_heart_beat( 1 );
}

string  extra_look()
{
    int     num, i;
    string  snowy;

    num = 0;
    if( sizeof( snowballarr ) > 0 )
	for( i = 0; i < sizeof( snowballarr ); i++ )
	    if( snowballarr[ i ] > 0 )
		num++;
    if( num > 0 )
    {
	if( num > 7 )
	    snowy = "Is plastered in snowballs.\n";
	else
	    snowy = "Has " + ({ "one", "two", "three", "four", "five", "six", "seven"
				 })[ num - 1 ] + " snowballs on " +
		environment()->query_possessive() + " face.\n";
    }
    else
	snowy = "";
    return snowy;
}

void    heart_beat()
{
    int     i;

    for( i = 0; i < sizeof( snowballarr ); i++ )
	if( (--snowballarr[ i ]) <= 0 )
	    snowballarr = delete( snowballarr, i--, 1 );
    if( !sizeof( snowballarr ) )
	dest_me();
}

move( object dest, string msgin, string msgout )
{
    int     i;

    if( environment() )
	environment()->remove_extra_look( this_object() );
    i =::move( dest, msgin, msgout );
    if( environment() )
	environment()->add_extra_look( this_object() );
    return i;
}

void    dest_me()
{
    if( environment() )
	environment()->add_extra_look( this_object() );
    ::dest_me();
}