src/magic.c
/* co-routine for dispel magic and cancellation */
co-routine for dispel magic and cancellation
co - routine for dispel magic and cancellation
bool check_dispel( int dis_level, CHAR_DATA *victim, int sn)
{
    AFFECT_DATA *af;
    if (is_affected(victim, sn))
    {
        for ( af = victim->affected; af != NULL; af = af->next )
        {
            if ( af->type == sn )
            {
                if (!saves_dispel(dis_level,af->level,af->duration))
                {
                    affect_strip(victim,sn);
        	    if ( skill_table[sn].msg_off )
        	    {
            		send_to_char( skill_table[sn].msg_off, victim );
            		send_to_char( "\n\r", victim );
        	    }
		    return TRUE;
		}
		else
		    af->level--;
            }
        }
    }
    return FALSE;
}
bool check_dispel ( int dis_level , CHAR_DATA * victim , int sn ) { AFFECT_DATA * af ; if ( is_affected ( victim , sn ) ) { for ( af = victim -> affected ; af != NULL ; af = af -> next ) { if ( af -> type == sn ) { if ( ! saves_dispel ( dis_level , af -> level , af -> duration ) ) { affect_strip ( victim , sn ) ; if ( skill_table [ sn ] . msg_off ) { send_to_char ( skill_table [ sn ] . msg_off , victim ) ; send_to_char ( " \n \r " , victim ) ; } return TRUE ; } else af -> level -- ; } } } return FALSE ; }
co-routine for dispel magic and cancellation
co - routine for dispel magic and cancellation