I have a system of immunity to devastation critical that I use in my bosses but I can't use this in a player because I don't have the same events that I have in a NPC.
the variable for dev immunity works for PCs as well, so either you give it OnEnter, OnLevelUp or OnEquip depending whether the immunity for devast is a result of some kind of subrace, class or item