Fixed up the immunity system.
Added config support for immunity system.