The gender for the word liche(for the undead sorcerer) is seemingly feminine(une) and therefore you have:
La liche (f) est un type de sorcier (m).
Ce sorcier (m) est une liche (f) : sauve qui peut !
Is this gender setup typical or supernatural? "I'm" thinking shouldn't the gender for the attribute agree with the subject here? Does the (attribute) function of this noun change its gender in this context? Possibly the relationship between the subject and the attribute can have some bearing on whether their gender would agree or not? For instance whether either or both are referring to a person or to an object, whether this is about the subject being part of a category referenced by or being equal to the attribute etc.? I read that "on remarquera que l’adjectif (et parfois le nom) en fonction attribut du sujet s’accorde en genre et en nombre avec le sujet"(BDL), [the adjective (and sometimes the noun) used as an attribute agrees with the gender and number of the subject] .
Can you briefly expand on the parfois (i.e. those cases where there is agreement) and does that mean that most of the times there is no agreement? Why would these examples with liche and sorcier fall in this or that category?