To start, I havn't touched the mental_state code, but it seems that without eating, avatars still loose their mental_state for some reason. Code follows:
case COND_FULL:
if( ch->level < LEVEL_AVATAR && ch->Class != CLASS_VAMPIRE )
{
set_char_color( AT_HUNGRY, ch );
send_to_char( "You are STARVING!\n\r", ch );
act( AT_HUNGRY, "$n is starved half to death!", ch, NULL, NULL, TO_ROOM );
if( !IS_PKILL( ch ) || number_bits( 1 ) == 0 )
worsen_mental_state( ch, 1 );
retcode = damage( ch, ch, 1, TYPE_UNDEFINED );
}
break;
case COND_THIRST:
if( ch->level < LEVEL_AVATAR && ch->Class != CLASS_VAMPIRE )
{
set_char_color( AT_THIRSTY, ch );
send_to_char( "You are DYING of THIRST!\n\r", ch );
act( AT_THIRSTY, "$n is dying of thirst!", ch, NULL, NULL, TO_ROOM );
worsen_mental_state( ch, IS_PKILL( ch ) ? 1 : 2 );
retcode = damage( ch, ch, 2, TYPE_UNDEFINED );
}
break;
case COND_BLOODTHIRST:
if( ch->level < LEVEL_AVATAR )
{
set_char_color( AT_BLOOD, ch );
send_to_char( "You are starved to feast on blood!\n\r", ch );
act( AT_BLOOD, "$n is suffering from lack of blood!", ch, NULL, NULL, TO_ROOM );
worsen_mental_state( ch, 2 );
retcode = damage( ch, ch, ch->max_hit / 20, TYPE_UNDEFINED );
}
break;
help. I don't see the problem in the code. The ch->level < Avatar seems to be right, I just don't see what could be causing the loss of mst |