/
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/
#pragma save_binary
/*
   ** enchanment stuff.  You can enchant up to a maximun of 50.
   ** This will raise the ac of the armour by 50 over its start value
   ** and raise the price by the amount of enchantment it has.
 */

int     enchanted;

string  enchant_string()
{
    if( !enchanted )
	return "";
    return "It is surrounded by a " +
	({ "very faint", "faint", "quite faint", "pale",
	   "dull", "medium", "quite strong", "strong",
	   "very strong", "extremely strong" })[ enchanted / 5 ]
	+ " magical field.\n";
}

void    set_enchant( int i )
{
    if( i > 50 )
	i = 50;
    if( !i )
	this_object()->set_value( (int)this_object()->query_value() / enchanted );
    else
	if( enchanted )
	    this_object()->set_value( ((int)this_object()->query_value() * i) / enchanted );
	else
	    this_object()->set_value( (int)this_object()->query_value() * i );
    enchanted = i;
}

int     add_enchant( int i )
{
    if( i + enchanted > 50 )
	i = 50 - enchanted;
    if( enchanted )
	this_object()->set_value( ((int)this_object()->query_value() * (i + enchanted)) / enchanted );
    else
	if( i )
	    this_object()->set_value( (int)this_object()->query_value() * i );
    enchanted += i;
    return i;
}

int     query_enchant()
{
    return enchanted;
}